gpg.exe sometimes hangs solidly under Win2K

gnupg.org at salvisberg.com gnupg.org at salvisberg.com
Sun Apr 23 04:01:26 CEST 2006


Thank you for your reply!

Werner Koch wrote:
> On Fri, 21 Apr 2006 03:35:46 -0400, Hans Salvisberg said:
> 
>> Email to submit at bugs.guug.de bounces, so I'll try my luck here:
> 
> You may use the web interface at http://bugs.gnupg.org (account
> guest/guest).

Ok, I will, but since I already have your attention, I'll reply here for now, if I may.

>> When one instance of gpg.exe hangs, then it becomes mostly unusable.
>> Trivial commands like --version still work in another console window,
>> but an attempt to do --list-keys or any other non-trivial command will
>> hang, too. Here's a ProcExp stack trace of such a hanging instance:
> 
> There seems to be a problem with file locking.  Please try using the
> option --lock-never or use Sysinternals file monitor to checkout the
> list of open files.

I'm scared of disabling file locking, because I have Thunderbird and Enigmail open most of the time and run gpg.exe in a console window. 

 --lock-never
   Disable locking entirely.  This option should be used only in
   very special environments, where it can be assured that  only
   one process is accessing those files.  A bootable floppy with
   a stand-alone  encryption  system  will  probably  use  this.
   Improper  usage  of this option may lead to data and key cor-
   ruption.

This is definitely not the case here and I don't want to risk data or key corruption.

I started FileMon and did --edit-keys, selected a uid, did delsig and save, at which point it hung again.

FileMon showed the following three interesting lines just before the hang:
   OPEN  ...\pubring.tmp                   Options:OpenIf Access:All
   OPEN  ...\pubring.tmp  FILE NOT FOUND   Options:Open Access:All
   OPEN  ...\pubring.tmp  FILE NOT FOUND   Options:Open Access:All

There was one more line (I failed to write that down) and then it hung, more solidly than ever, locking up the desktop so that I couldn't even bring ProcExp to the top anymore.

After a hard reset, I find pubring.tmp on the disk, length 0, and I'm able to run the same sequence of commands. FileMon does show some odd records again though:

   QUERY INFO  ...\pubring.tmp  SUCCESS         Attributes:A
   OPEN        ...\pubring.gpg  SUCCESS         Options:Open Access:All
   OPEN        ...\pubring.gpg  FILE NOT FOUND  Options:Open Access:All
   OPEN        ...\pubring.gpg  FILE NOT FOUND  Options:Open Access:All

and right before terminating (19 lines omitted)

   CLOSE       ...\trustdb.gpg  SUCCESS
   OPEN        ...\trustdb.gpg  ACCESS DENIED   HS
   OPEN        ...\trustdb.gpg  ACCESS DENIED   HS

These are the very last lines before terminating, but it does terminate normally. However, trying to run --edit-keys again causes it to hang very quickly, after successful OPEN, QUERY INFO, and CLOSE of ...\trustdb.gpg.

This run has not produced any errors in FileMon, and the open handles in ProcExp are
   Desktop       \Default
   Directory     \BaseNamedObjects
   Directory     \Windows
   Directory     \KnownDlls
   File          C:\Program Files\GNU\GnuPG      (actually a directory!)
   Key           HKCU
   Key           HKLM
   Semaphore     \BaseNamedObjects\shell.{210A4BA0-3AEA-1069-A2D9-08002B30309D}
   WindowStation \Windows\WindowStations\WinSta0
   WindowStation \Windows\WindowStations\WinSta0

Does this help?

Hans

P.S. I'll be away from my computer next week and won't be able to reply before the weekend.



More information about the Gnupg-devel mailing list