gpg-agent does not anymore restart a killed scdaemon
Closed, ResolvedPublic


In case scdaemon is killed or crashed, gpg-agent does not restart scdaemon but attempts to send commands and waits indefinitely for responses. That used to work. Reproducer is obvious. Not tested with 2.2.

Related Objects

werner created this task.Feb 26 2019, 12:41 PM

Does not happen in 2.2. Additional requirement to test this bug in master: Another connection to the scdaemon must be open. For example running scute or, easier, call "gpg --card-edit" and keep it open.

gniibe added a subscriber: gniibe.Mar 6 2019, 3:05 AM

That's my badness. In wait_child_thread, assuan_release may cause thread context switch to agent_reset_scd which accesses scd_local_list; This access should be serialized.
And... in start_scd, calling unlock_scd should be after unlocking start_scd_lock.

gniibe claimed this task.Mar 6 2019, 3:05 AM
gniibe changed the task status from Open to Testing.
werner added a comment.Mar 6 2019, 8:05 AM

Thanks for fixing that.

werner closed this task as Resolved.Apr 5 2019, 5:07 PM

I did lot of tests in the last weeks while working on gpg-card.