ERROR: _gpgme_io_set_close_notify: error: Invalid argument

Marcus Brinkmann marcus.brinkmann at
Fri Apr 8 22:56:41 CEST 2011

On 02/08/2011 02:55 PM, mbo wrote:
> If we run this python script direcly in the command line, everything works fine. If we call the python script within freeswitch ( using the mod_python module, we receive the following debug output, when the environment variable GPGME_DEBUG is set to „9:/tmp“:
> ...
> gpgme_op_keylist_start: enter: ctx=0x7fcd8c2078c0, pattern=B9F2747A, secret_only=0
> GPGME 2011-02-07 21:40:58 <0x3b06>      _gpgme_io_pipe: enter: filedes=0x7fcd8c1e5bc8, inherit_idx=1 (GPGME uses it for reading)
> GPGME 2011-02-07 21:40:58 <0x3b06>      _gpgme_io_pipe: leave: read=0x1a5, write=0x1a6
> GPGME 2011-02-07 21:40:58 <0x3b06>      _gpgme_io_set_close_notify: enter: fd=0x1a5, close_handler=0x7fcd84074420/0x7fcd8c1e5ba0
> GPGME 2011-02-07 21:40:58 <0x3b06>      _gpgme_io_set_close_notify: error: Invalid argument

This looks bogus.  Looking at the code path, _gpgme_io_set_close_notify on
POSIX systems (as opposed to Windows) can only fail on calloc.  And we
allocate in 64 table entry incrementals which is not big at all.

The other thing that is looking a bit unconventional is the number of open fds
you have.  With 0x1a6 that's 423, which is a bit on the largish side.  Still,
_gpgme_io_set_close_notify doesn't allocate fds, so that can't be it.

Maybe strace/ltrace or gdb trace it to see why/where it's failing in the calloc.


More information about the Gnupg-devel mailing list