pinentry-gnome3: (libgcrypt): Cannot allocate memory

Daniel Kahn Gillmor dkg at fifthhorseman.net
Fri Jun 5 01:46:13 CEST 2015


Hi Andreas--

On Thu 2015-06-04 18:06:01 -0400, Andreas Stieger wrote:

> 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 :)

> $ /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?

    --dkg




More information about the Gnupg-devel mailing list