Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent use of the poed system lock #9

Open
rothcar opened this issue Nov 16, 2021 · 2 comments
Open

Inconsistent use of the poed system lock #9

rothcar opened this issue Nov 16, 2021 · 2 comments

Comments

@rothcar
Copy link
Contributor

rothcar commented Nov 16, 2021

Poed maintains a system-wide exclusive lock for access to the PoE chipset communications channel. This lock is maintained poorly and the error recovery for failed lock attempts is incorrect. This can lead invalid poed state.

  1. the try/except code that manages the exclusive lock includes the safe code path inside the lock exception handler. Meaning, the safe code path can throw an exception similar to the lock syscall and poed cannot tell the difference.
  2. Exception handling for a failed lock attempt does not provide adequate context to the user as to the failure cause or location
  3. Failed lock attempts are ignored (the safe code path result skipped).
@leonchiang
Copy link
Contributor

leonchiang commented Nov 30, 2021

  1. Change Lock flow to prevent mixing of lock/function exceptions.
  2. Will show the calling function name.
  3. Will retry 5 times every 0.1s, then execute function (lock acquired) or abort(lock failed).

@leonchiang
Copy link
Contributor

leonchiang commented Dec 2, 2021

Please check devel-0001 branch tag:
https://github.com/leonchiang/poed/releases/tag/issue_fix_0001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants