pinentry-gnome3: (libgcrypt): Cannot allocate memory

Andreas Stieger Andreas.Stieger at gmx.de
Fri Jun 5 09:47:04 CEST 2015


Hello,

> > As I was packaging pinentry 0.9.3 with the new /usr/bin/pinentry-gnome3
> 
> You don't say what platform you're packaging this for, but please note
> that pinentry-gnome3 is already available in debian unstable :)

This is for SUSE/openSUSE. Keeping pinentry and all packages of the project current was never an issue, but obviously as binary vendors we would like to make sure this is working properly.

> > $ /usr/bin/pinentry-gnome3
> > OK Your orders please
> > getpin
> > couldn't lock 16384 bytes of memory (libgcrypt): Cannot allocate memory
> > ERR 83886179 canceled
> >
> > strace:
> >
> > mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
> > = 0x7efc75498000
> > mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
> > 0) = 0x7efc75494000
> > mlock(0x7efc75494000, 16384)            = -1 ENOMEM (Cannot allocate memory)
> > write(2, "couldn't lock 16384 bytes of mem"..., 72couldn't lock 16384
> > bytes of memory (libgcrypt): Cannot allocate memory
> >
> > This is on a system with a fairly standard limit:
> > max locked memory       (kbytes, -l) 64
> >
> > Where would we start looking to debug and look for a possible solution?
> > Do you think the gnome3 variant could receive a change to stay below a
> > 64k lock limit?
> 
> I can't reproduce this on debian:
> 
> 0 dkg at alice:~$ ulimit  -a | grep locked
> max locked memory       (kbytes, -l) 64
> 0 dkg at alice:~$ pinentry-gnome3 
> OK Your orders please
> getpin
> D abc123
> OK
> 0 dkg at alice:~$
> 
> > openSUSE tracks this in:
> > https://bugzilla.opensuse.org/show_bug.cgi?id=933687
> 
> Sounds like this might be platform specific.  What version of libgcrypt
> are you running?

This is occurring with libgcrypt 1.6.1 and 1.6.3, in this case on openSUSE 13.2.

I have seen different behaviour in this area before. I will look into this some more, let's see if this can be debugged. If you know anything that would point me in the right direction that would be appreciated.

Andreas



More information about the Gnupg-devel mailing list