Repository navigation
Conversation
A Cancel that arrives while match_finger() waits for the match interrupt made the cleanup command (0x62) go out mid-match. On 138a:0097 the sensor then drops off the USB bus and the service is left with a dead handle. wait_int() gets a non-cancellable mode that gives up after max_wait seconds, and match_finger() uses it so the match always finishes first. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Cancelling a verify while
match_finger()waits for the match interrupt (a GDM orsudofingerprint timeout, or typing the password instead) sends the cleanup command0x62mid-match. On 138a:0097 (ThinkPad T470s) the sensor then drops off the USB bus and re-enumerates. The service keeps the dead handle, the atexit reboot fails with[Errno 19] No such device, and the service exits.Trace:
wait_int()→CancelledException→finally: tls.app('6200000000')→USBError: [Errno 19].Fix
wait_int()gets a non-cancellable mode with amax_waitlimit, andmatch_finger()uses it, so the match always finishes before cleanup. Cancelling while the sensor is still waiting for a finger behaves as before.Testing (138a:0097, Debian 13, 0.15)
🤖 Generated with Claude Code