b4 review silently freezes on patatt fail
Hi Konstantin,
I noticed a bug in b4 review (as pinged on fedi but better to send the bug report properly :)
So I had an incorrect configuration locally - my signing key in git (git config user.signingKey) was set to the wrong one (the old, revoked one, the one I... err... lost the private key for :P).
And with this in place, I was using b4 review tui --email-dry-run to experiment with composing a reply.
The replying bit worked fine. But when I hit 'S' to send it froze up. No error shown, just frozen.
Some strace's later and I identified that gpg (of course) was to blame - it seems the python code just hangs waiting forever (idle event loop looks like).
And it seems to be when it tried to use patatt to sign my reply to a mail, gpg failed with exit code 2:
execve("/usr/bin/gpg", ["gpg", "--batch", "--no-auto-key-retrieve", "--no-auto-check-trustdb", "-s", "-u", "130EC0891A27271B"]) = 0 exit_group(2)
(I can give you a full strace if you need!)
I confirmed this was the signing for sure as passing --no-sign fixed it.
Once I updated my signing key to the correct one, everything worked fine.
$ b4 --version 0.15.2
Cheers, Lorenzo
Quoted 25 lines · Lorenzo Stoakes
Hi Konstantin,
I noticed a bug in b4 review (as pinged on fedi but better to send the bug report properly :)
So I had an incorrect configuration locally - my signing key in git (git config user.signingKey) was set to the wrong one (the old, revoked one, the one I... err... lost the private key for :P).
And with this in place, I was using b4 review tui --email-dry-run to experiment with composing a reply.
The replying bit worked fine. But when I hit 'S' to send it froze up. No error shown, just frozen.
Some strace's later and I identified that gpg (of course) was to blame - it seems the python code just hangs waiting forever (idle event loop looks like).
And it seems to be when it tried to use patatt to sign my reply to a mail, gpg failed with exit code 2:
execve("/usr/bin/gpg", ["gpg", "--batch", "--no-auto-key-retrieve", "--no-auto-check-trustdb", "-s", "-u", "130EC0891A27271B"]) = 0
exit_group(2)
Quoted 8 lines
(I can give you a full strace if you need!)
I confirmed this was the signing for sure as passing --no-sign fixed it.
Once I updated my signing key to the correct one, everything worked fine.
$ b4 --version 0.15.2
This was more of a rabbit hole than I was expecting and required a new patatt version release. The underlying issue was actually that gpg invokes gpg-agent, and non-zero exits from it caused a hang due to how we were handling pipes.
Anyway, I believe this is now fixed and shouldn't resurface.
Thanks for the report!
Signature · 1 line
Konstantin Ryabitsev <[email protected]>