The error is fixed with "disable-check-own-socket"
If someone is interested for next times, the log-file "gpg-agent.log" is on the path "C:\Users\<my user>\AppData\Local\VirtualStore\Program Files (x86)\Mozilla Thunderbird\".
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
Dec 1 2017
Adding Windows again because on Unix it is unlikley that our close will block. A documented blocking behavior is only defined for STREAMS
Yeah, that looks correct. Good catch. The bug exhibits itself when gpg-agent checks its own socket. In this case gpg-agent is both, client and server, and due to our userland multi-threading we get blocked. The suspend/resume things makes the deadlock more likely. Note that we have the same problem on Unix.
Thanks everyone. I think that the problem is identified and fixed in libassuan.
Nov 30 2017
Update: It was my mistake (typical beginners failure): I had to create gpg-agent.conf instead of usig gpg.conf.
Adding disable-check-own-socket resulted in the right behavior, till now:
After some time-out, GpgOL asks for password again and decrypts the content as expected.
Suppose a client which connects stopped task of server on Windows. In this situation, if the client blocks on closesocket, that is, some user space work is needed for server side for closing socket of client side, this bug can be explained.
If disable-check-own-socket can stop hanging, D454: assuan_close with nPth could be related.
Nov 29 2017
I have created the file "gpg-agent.conf" in the path "C:\Users\<my user>\AppData\Roaming\gnupg\" with the following content:
It's working for me now with that config file as well so far. I'll keep watching too.
I added "disable-check-own-socket" to gpg-agent.conf .
Since 8 hours no "hanging".
I will watch it furthermore...
Could confirm a similar behavior with Windows 7 and Outlook 2010 using GPG4Win 3.0.1.
Time frame for loosing the decryption ability is about one hour or more.
Setting disable-check-own-socket in gpg.conf (didn't find gpg-agent.conf) resulted in "no data" error on all
encrypted e-mails.
In T3378#106503, @raysatiro wrote:I assume it goes in %APPDATA%\gnupg\gpg-agent.conf.
In T3378#106440, @werner wrote:Can someone please add
disable-check-own-socketto gpg-agent.conf to test whether this is the cause for the problem. ( note that I asked for this also in T3401)
Nov 28 2017
Can someone please add
I introduce GnuPG to my friend, yesterday. I saw this problem. It's on Windows 7, gpg4win 3.0.1 and enigmail.
Looking through this report, Windows 7 is common factor.
Nov 24 2017
Somehow I expected such a report (too many open fds). We will need to replace our select based code by poll. However, I think this is more related to T3529.
THANK YOU! Once you push those changes, I'll see about back-porting the patches to Debian stable/Ubuntu LTS.
Nov 23 2017
Thanks for your patches. I decided to do this similar but I need to take several branches in account.
The attached patches make the necessary changes to libgcrypt and gpg-agent. A word about my change to libgcrypt. Since all of the *_secure allocation operations were hardcoded to set xhint to zero, I simply replaced that hardcoded value with a static variable. In the patches I have some sample documentation for both changes. My scheme skills are quite old, so I did not write a test case.
Here is the test case that I wrote a while back (Follow-up to Crashes with gpg-agent 2.1.18). It is written with bash in mind and creates a stand-alone GNUPGHOME directory with a pinentry routine that supplies the password (I guess I could have preset the passphrase) and then starts 200 concurrent gpg decryption requests. With GPG 2.1.18 and up, this usually exposes the out of memory situation very fast.
Nov 22 2017
Nov 21 2017
In T3056#95172, @wiz wrote:Oh, to make it clear - I was testing the pkgsrc version with the additional patches used by pkgsrc, see http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/security/gpgme/patches/
Testing it without patches does not work because:
get-env.c:57:2: error: #error Use of getenv_r not implemented. #error Use of getenv_r not implemented.
There are multiple problems. I fixed one Makefile portability issue today.
Fixed in 2.2.3, too. Closing.
Nov 20 2017
Not yet located or identified the bug, but some information.
Nov 17 2017
Shall we close this?
Nov 13 2017
This might be a reason that we got multiple reports for Kleopatra since 3.0 was released that it hangs on keylisting: https://bugs.kde.org/show_bug.cgi?id=381910
Nov 9 2017
Both my coworker and I have the same issue. We just started using gpg for git commit signing. Works the first time. Then sometime later, no window pops up and will hang git indefinitely because it's waiting on the agent. Kill the agent and gpg process let git error out. try again, gpg-agent window prompting for password shows up and works.
Nov 8 2017
The thing is that I don't see this bug with verbose logging enabled. So we need to do more code starring or instrument the code
Is there a more detailed logging that i can switch on? Perhaps i can help you to get diagnostic files. Nearly every day i notice this bug. In the log (with "verbose" in gpg-agent.conf) are the same entries i already posted.
Nov 7 2017
I built gnupg 2.2.1 with the patch from D450, but that didn't help.
I even got an additional error:
Yes, it will be in 2.2.3. It's too late for 2.2.2.
So is 380bce13d94f the correct fix? If so, I will update the OpenBSD port including this as a local patch.
I believe this is due to the bug of gpg-agent. So, I put this report as a sub task under T3276: the calibrate_get_time() function depends on a system that has a non-tickless kernel.
This is a bug in gpg-agent.
Nov 6 2017
Also failed to replicate on Windows-7 using a dedicated laptop.
Nov 3 2017
I tested for several days with logging enabled but was not able to replicate it again. Then I tried again w/o logging and couldn't replicate it either.
Nov 2 2017
Oct 20 2017
We can't change that anymore. So the question is how and whether to fix it. Right now gpgconf --list-dirs has no need to ask gpg-agent for the actual socket and it would be a catch-22 anyway. Thus to fix this we need to parse the gpg-agent.conf in gpg.conf directly.
I can replicate this now. Unfortunately without logging enabled.
Oct 19 2017
Here is a part of the log inline:
Oct 17 2017
Hello.
I am having the same problem with my Yubikey v4.
Oct 11 2017
... gpg-agent hangs. After cancelling the process it works again ...
Oct 10 2017
Sorry, I haven't waited long enough.
It's happened again. After leaving Thunderbird open for a while, when consulting another encrypted email, the window asking for the password does not appear and does nothing.
I need Gpg4Win, I'm going back to Gpg4Win 2.3.4
I think it might be a cleanup problem.
If you uninstall Gpg4Win 2.3.4, restart the computer, and then install Gpgp4Win 3.0.0, everything works correctly.
gpg-agent.conf actual content:
Does anyone of you have a gpg-agent.conf and if so, what options are set?
It works correctly when installed and executed.
After a period of inactivity and with Thunderbird still open, it stops working.
With Gpg4Win 2.3.4 it works correctly.
Sep 29 2017
For context, here's what the wisdom of the crowd is rigging together around GPG to get this single-sign-on feature:
Sep 22 2017
Just to inform that it is not a single problem.
I recognized exactly the same behaviour.
After terminating the gpg-agent task everything works as aspected (up to the next non-activity phase).
64-bit Windows 7 Enterprise, Outlook 2010, GPG4Win Version 3.0.0-gpg4win-3.0.0.
Sep 12 2017
Sep 9 2017
I think this is now resolved, as of rG926d07c5fa05
Sep 8 2017
The only mitigation I can see for this is a better error message.
Sep 7 2017
Aug 31 2017
Given no feedback, I'm closing this issue.
If there is still problem, please reopen.
Aug 15 2017
Aug 8 2017
In fact, on Windows you would need to have a system service. We did this in the past for the dirmngr but remove that feature due to possible security problems and problems during installation.
That is correct, gpg-agent does not daemonize on Windows if --daemon is given, it is simply not implemented.
Aug 4 2017
Jul 31 2017
GnuPG 2.1.22 in Homebrew is out: https://github.com/Homebrew/homebrew-core/commit/39a392ffd6ac20a36ea8a4aec5c4dc5febcfc1d6
Please check it out.
Jul 25 2017
I am not to familiar with the gnome keyring but from looking it up on the arch wiki, it seems to have this single sign on capability.
So this is basically 0what GNOME does with its keyring daemon and pinentry-gnome.
Btw, this was envoy: https://github.com/vodik/envoy
what I mean by unlocking is the act of using the passphrase to load the gpg and ssh keys and hence not needing to tip the phrase again afterwards.
I don't understand what you mean by unlocking gpg-agent. Can you please explain in detail what you try to achieve.
Jul 24 2017
Jul 21 2017
Jul 17 2017
Sorry, I went through considerable length to reproduce this, but failed.
Jul 16 2017
@marcus sure, but I am currently away on vacation and won't be back until mid August. Also, I'd need some detailed build instructions (I'm on mac os) since I'm not very familiar with building C code - I brew installed gpg.
Jul 14 2017
Another reoccurring concern is lingering agents spawned in test suites. See, e.g. a discussion from this week: https://github.com/pazz/alot/pull/1081#issuecomment-315131053
Well, we always have to weigh the costs with the benefits. From the description of the task, the benefit was to satisfy "people [who] really don't like having idle processes lying around", which is not a strong motivation to take implementation and maintenance cost of any solution.
This is a disappointing resolution. There are many other reasons for having a daemon, which include keeping a sensitive piece of data in memory (and not on disk) for a limited period of time, while providing controlled access to it. This is exactly what gpg-agent does.
Jul 13 2017
@landro Would you like to do one more round of testing?
Werner's comments indicate that this is expected behavior. Also, concerns were raised that this is difficult to implement correctly, and it is difficult to test. So, I am closing as wontfix.
Jun 30 2017
I don't think we want any behavioral changes to gpg 1.4 anymore. And in gpg2 all of this is different (use-agent is mandatory, passphrase-fd only used with batch).
Jun 28 2017
No response.
Jun 27 2017
Jun 23 2017
FWIW, I ran a make check today and got several failed tests when using the extended key format. Checking out master to see whether this was caused by another patch I am working on, showed that it worked on master. Checking out my local branch again, then passed the test.
Jun 13 2017
Still, looks totally fine to me:
Jun 12 2017
In T3187#98531, @werner wrote:I will try to reproduce it. It might be that --passwd also trigerred the conversion to the new format.