pinentry hangs in read()

Mike Kelly pioto at pioto.org
Tue Aug 3 01:07:35 CEST 2010


(This was originally reported as issue 1199[1], but I was referred to
this list instead).

Pinentry seems to always hang for me, when invoked by keychain[2] in my
.bash_profile.

Keychain seems to be invoking pinentry indirectly by doing:

  gpg --no-options --use-agent --no-tty --sign --local-user "$k" -o- >/dev/null 2>&1

where $k is the name of my gpg key.

It seems to be hanging while doing a read. If I kill -9 the process (a
regular SIGTERM doesn't work), then a new pinentry starts, and this time
it actually displays the dialog.

I am using gnupg-2.0.14, pinentry-0.8.0, and keychain-2.6.8.

A full backtrace of the hanging process is attached.

 [1] https://bugs.g10code.com/gnupg/issue1199
 [2] http://agriffis.n01se.net/keychain/

-- 
Mike Kelly
-------------- next part --------------
(gdb) thread apply all bt full

Thread 1 (process 24814):
#0  0x00007fcd8aa9f2e0 in __read_nocancel () from /lib/libc.so.6
No symbol table info available.
#1  0x00007fcd8ad4af4a in _nc_wgetch () from /lib/libncurses.so.5
No symbol table info available.
#2  0x00007fcd8ad4b667 in wgetch () from /lib/libncurses.so.5
No symbol table info available.
#3  0x00000000004125ec in dialog_run (pinentry=0x6181c0, tty_name=<value optimized out>, tty_type=<value optimized out>)
    at pinentry-curses.c:700
        c = -512
        diag = {pos = DIALOG_POS_PIN, pin_y = 14, pin_x = 16, pin_size = 58, pin_loc = 0, pin = 0x7fcd8d5f7188 "", pin_max = 2048, 
          pin_len = 0, ok_y = 16, ok_x = 14, ok = 0x19dfe40 "<OK>", cancel_y = 16, cancel_x = 59, cancel = 0x19dfe60 "<Cancel>", 
          notok_y = 0, notok_x = 0, notok = 0x0}
        ttyfi = 0x0
        ttyfo = 0x0
        screen = 0x0
        done = <value optimized out>
        pin_utf8 = <value optimized out>
#4  0x0000000000413219 in curses_cmd_handler (pinentry=0x0) at pinentry-curses.c:869
        rc = <value optimized out>
#5  0x000000000040defe in cmd_getpin (ctx=0x7fcd8d5f6008, line=<value optimized out>) at pinentry.c:872
        result = 83918934
        set_prompt = 0
#6  0x00000000004106d1 in dispatch_command (ctx=0x7fcd8d5f6008) at assuan-handler.c:435
        s = 0x415008 "NOP"
        i = -1963461760
#7  process_request (ctx=0x7fcd8d5f6008) at assuan-handler.c:458
        rc = <value optimized out>
#8  0x00000000004109b0 in assuan_process (ctx=0x7fcd8d5f6008) at assuan-handler.c:526
        rc = <value optimized out>
#9  0x000000000040d865 in pinentry_loop () at pinentry.c:1089
        rc = <value optimized out>
        filedes = {0, 1}
        ctx = 0x7fcd8d5f6008
#10 0x0000000000408022 in main (argc=1, argv=0x7fff00fb1628) at pinentry-gtk-2.c:571
        secure_mem = {malloc = 0x40d5f0 <secentry_malloc>, realloc = 0x40d640 <secentry_realloc>, free = 0x40d5b0 <secentry_free>, 
          calloc = 0, try_malloc = 0, try_realloc = 0}



More information about the Gnupg-devel mailing list