First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 165493
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Crypto team <crypto@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Maurice van der Pot <griffon26@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
pinentry-0.7.2-debug.patch pinentry-0.7.2-debug.patch patch Alon Bar-Lev (RETIRED) 2007-02-05 20:49 0000 629 bytes Details | Diff
pinentry-0.7.2-debug.patch pinentry-0.7.2-debug.patch patch Alon Bar-Lev (RETIRED) 2007-02-06 17:48 0000 660 bytes Details | Diff
0.7.2-grab_keyboard.patch fix patch Vincent Pit 2007-06-15 14:09 0000 658 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 165493 depends on: Show dependency tree
Show dependency graph
Bug 165493 blocks: 159851
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-02-05 20:19 0000
Some kind of race condition is causing my gpg to fail.
I can run gpg --sign several times and it will sometimes succeed.

When it succeeds, I get a dialog asking for a passphrase. When it fails I can
sometimes see the dialog for a fraction of a second, but then it aborts.

This is the output when it fails:

  griffon26@griffon27 ~> gpg --sign

  You need a passphrase to unlock the secret key for
  user: "Maurice van der Pot (Griffon26) <griffon26@gentoo.org>"
  1024-bit DSA key, ID B79A871C, created 2004-07-17


  ** ERROR **: could not grab keyboard
  aborting...
  gpg-agent[5940]: command get_passphrase failed: End of file
  gpg: problem with the agent: IPC write error
  gpg: Invalid passphrase; please try again ...

  You need a passphrase to unlock the secret key for
  user: "Maurice van der Pot (Griffon26) <griffon26@gentoo.org>"
  1024-bit DSA key, ID B79A871C, created 2004-07-17

  gpg: problem with the agent: IPC write error
  gpg: no default secret key: General error
  gpg: signing failed: General error

This has been happening since my upgrade to gnupg 2.0.

It's currently preventing me from signing manifests.

[ebuild   R   ] app-crypt/pinentry-0.7.2-r3  USE="gtk ncurses -caps -qt3" 390
kB 
[ebuild   R   ] app-crypt/gnupg-2.0.2  USE="X bzip2 -doc -ldap -nls -openct
-pcsc-lite (-selinux) -smartcard" 0 kB

------- Comment #1 From Alon Bar-Lev (RETIRED) 2007-02-05 20:49:56 0000 -------
Created an attachment (id=109261) [edit]
pinentry-0.7.2-debug.patch

Hmmm.... It seems that gdk_keyboard_grab is failing in pinentry.
Have you used the same pinentry with gpg-1.4.X?

Can you please try to apply the following patch so we know what is the error
code?

Thanks!

------- Comment #2 From Maurice van der Pot 2007-02-05 21:04:09 0000 -------
And the winner is...

** ERROR **: could not grab keyboard (3)

------- Comment #3 From Alon Bar-Lev (RETIRED) 2007-02-05 21:07:52 0000 -------
GDK_GRAB_NOT_VIEWABLE  the grab window or the confine_to window are not
viewable.

You did not answer, have you used the same pinentry with previous version?

------- Comment #4 From Alon Bar-Lev (RETIRED) 2007-02-05 21:12:17 0000 -------
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=401957

------- Comment #5 From Maurice van der Pot 2007-02-05 21:19:15 0000 -------
It doesn't look like it. According to emerge.log pinentry was first installed
in january 2007 and my last successful signing was done in october 2006.

------- Comment #6 From Alon Bar-Lev (RETIRED) 2007-02-06 07:17:40 0000 -------
Have you tried the solution in comment#4?

------- Comment #7 From Alon Bar-Lev (RETIRED) 2007-02-06 17:48:13 0000 -------
Created an attachment (id=109354) [edit]
pinentry-0.7.2-debug.patch

Please try this one, it is the patch from comment#4.

------- Comment #8 From Maurice van der Pot 2007-02-06 18:36:30 0000 -------
I tried it. It didn't change anything afaics.

------- Comment #9 From Alon Bar-Lev (RETIRED) 2007-03-09 19:21:55 0000 -------
Hello gnome,
I will appreciate any thought regardging this issue.

------- Comment #10 From Robin Johnson 2007-03-09 19:37:54 0000 -------
Here's the relevant portion of code from pinentry:
 88 /* Grab the keyboard for maximum security */
 89 static void
 90 grab_keyboard (GtkWidget *win, GdkEvent *event, gpointer data)
 91 {
 92   if (!pinentry->grab)
 93     return;
 94 
 95   if (gdk_keyboard_grab (win->window, FALSE, gdk_event_get_time (event)))
 96     g_error ("could not grab keyboard");
 97 }

------- Comment #11 From Daniel Gryniewicz 2007-03-09 20:29:43 0000 -------
Looking at it, the patch in comment #7 should probably work.  Without more info
(does the error code change with that patch?) I can't help more...

------- Comment #12 From Alon Bar-Lev (RETIRED) 2007-03-09 20:37:44 0000 -------
(In reply to comment #11)
> Looking at it, the patch in comment #7 should probably work.  Without more info
> (does the error code change with that patch?) I can't help more...
> 

Thanks!
As per comment#8, it seems that the same error code is produced...
Maurice: Can you please re-verify that?

------- Comment #13 From Maurice van der Pot 2007-03-10 10:52:45 0000 -------
Done. There is no change. It still fails sometimes with the same error code.

------- Comment #14 From Alon Bar-Lev (RETIRED) 2007-05-18 21:56:26 0000 -------
Finally, can open bugs in upstream.

------- Comment #15 From Vincent Pit 2007-06-15 14:09:42 0000 -------
Created an attachment (id=122155) [edit]
fix

This patch changes the map/unmap events, that seem to occur too early, with
expose/no-expose events. This seems to fix the bug.

------- Comment #16 From Maurice van der Pot 2007-06-15 15:41:14 0000 -------
Yes, it looks like this patch solves the problem. Thanks!

------- Comment #17 From Alon Bar-Lev (RETIRED) 2007-06-15 16:26:07 0000 -------
Thank you!!!

------- Comment #18 From Alon Bar-Lev (RETIRED) 2007-12-20 20:20:58 0000 -------
Please check 0.7.4, werner reverted this patch with something else...
Thanks!

------- Comment #19 From Maurice van der Pot 2007-12-20 20:31:26 0000 -------
Thanks for the heads-up. And you were right to be concerned; the problem is
back again. 

Pinentry 0.7.4 is broken:

/pinentry> pinentry 
OK Your orders please
GETPIN

** ERROR **: could not grab keyboard
aborting...
Aborted
/pinentry>

------- Comment #20 From Alon Bar-Lev (RETIRED) 2007-12-20 20:43:23 0000 -------
Thanks!
I don't know how you can reproduce this.
Patch readded.

First Last Prev Next    No search results available      Search page      Enter new bug