[pkg-gnupg-maint] Bug#841143: Bug#841143: Suspected race in gpg1 to gpg2 conversion or agent startup
Ian Jackson
ijackson at chiark.greenend.org.uk
Sun Jan 8 18:35:48 UTC 2017
Ian Jackson writes ("Re: Bug#841143: [pkg-gnupg-maint] Bug#841143: Suspected race in gpg1 to gpg2 conversion or agent startup"):
> The variable `active_connectionis' in gpg-agent.c seems to be updated
> by multiple threads without any locking. If it were to get corrupted,
> I think gpg-agent might get stuck trying to exit, with clients which
> had successfully connected at the syscall level.
I fixed this but it didn't help. I now have a gdb onto a stuck agent,
which has shutdown_pending but is stuck in select. I think
shutdown_pending must have become 1 between the main loop test and the
entry to select.
This approach to programming is a quite a rich seam of opportunities
for threading bugs.
For example, I think the variables `check_own_socket_running' and
`shutdown_pending' are both accessed willy-nilly on multiple threads
without locking.
Ian.
--
Ian Jackson <ijackson at chiark.greenend.org.uk> These opinions are my own.
If I emailed you from an address @fyvzl.net or @evade.org.uk, that is
a private address which bypasses my fierce spamfilter.
More information about the pkg-gnupg-maint
mailing list