[pkg-gnupg-maint] Bug#1079696: Bug#1079696: gpgconf: "gpgconf --kill all" infinite loop when /proc/fd is not available

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Jan 7 22:18:25 GMT 2025


Control: forwarded 1079696 https://dev.gnupg.org/T7478
Control: reassign 1079696 libgpg-error0 1.51-3

Hi Russell--

On Mon 2024-08-26 22:48:02 +1000, Russell Coker wrote:
> openat(AT_FDCWD, "/proc/self/fd", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
> prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=1024, rlim_max=1073741816}) = 0
> close(3)                                = 0
> close(4)                                = 0
> [...]
> close(21599889)                         = -1 EBADF (Bad file descriptor)

Thanks for identifying this.  I think the issue is in libgpg-error (aka
gpgrt)'s mechanism for spawningn a POSIX subprocess.

I've reported it upstream to see whether they have any preferred
solution to the problem.

As for gpgconf itself, it's not even clear to me why `gpgconf --kill
all` would need to spawn a subprocess, except that the *_runtime_change
functions in tools/gpgconf-comp.c seem to expect it as an abstraction
layer, but this is more a question about the engineering choices around
process management happens in the gpg ecosystem. i'm frequently baffled
by process management in this suite, so i'm probably not the best person
to debug it directly.

Hopefully upstream can shed some light on it!

Regards,

         --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 324 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-gnupg-maint/attachments/20250107/f1ebe496/attachment.sig>


More information about the pkg-gnupg-maint mailing list