Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 605806

Summary: app-crypt/gnupg-2.1.{17-r1,19}: test hangs
Product: Gentoo Linux Reporter: Harri Nieminen (Moiman) <moiman>
Component: Current packagesAssignee: Kristian Fiskerstrand (RETIRED) <k_f>
Status: RESOLVED WORKSFORME    
Severity: normal CC: alonbl, crypto+disabled, pr.gentoo-acct
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=595808
https://bugs.gentoo.org/show_bug.cgi?id=605260
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info gnupg
emerge.log with FEATURES="test"
strace "emerge -1 gnupg"
strace gpg-agent
gdb gpg-agent
gdb t-protect

Description Harri Nieminen (Moiman) 2017-01-15 19:00:38 UTC
When trying to build gnupg with FEATURES=test tests hang.

Reproducible: Always

Steps to Reproduce:
1. FEATURES="test" emerge -1 gnupg
Comment 1 Harri Nieminen (Moiman) 2017-01-15 19:01:31 UTC
Created attachment 460214 [details]
emerge --info gnupg
Comment 2 Harri Nieminen (Moiman) 2017-01-15 19:06:04 UTC
Created attachment 460216 [details]
emerge.log with FEATURES="test"
Comment 3 Kristian Fiskerstrand (RETIRED) gentoo-dev 2017-01-15 19:48:06 UTC
(In reply to moikkis from comment #2)
> Created attachment 460216 [details]
> emerge.log with FEATURES="test"

This doesn't really show a failure, can you strace the process to look at what is happening?
Comment 4 Harri Nieminen (Moiman) 2017-01-16 07:56:34 UTC
Created attachment 460254 [details]
strace "emerge -1 gnupg"

Here is strace file
Comment 5 Kristian Fiskerstrand (RETIRED) gentoo-dev 2017-01-16 08:31:56 UTC
(In reply to moikkis from comment #4)
> Created attachment 460254 [details]
> strace "emerge -1 gnupg"
> 
> Here is strace file

double gzipped... curious approach to things. But I'm more curious about the gpg-agent you say is halted than emerge..
Comment 6 Harri Nieminen (Moiman) 2017-01-16 08:42:51 UTC
Created attachment 460300 [details]
strace gpg-agent
Comment 7 Harri Nieminen (Moiman) 2017-01-16 10:08:44 UTC
Created attachment 460304 [details]
gdb gpg-agent
Comment 8 Kristian Fiskerstrand (RETIRED) gentoo-dev 2017-01-16 10:30:31 UTC
(In reply to moikkis from comment #7)
> Created attachment 460304 [details]
> gdb gpg-agent

Thanks, this is useful. Will look into it when more time - no immediate thoughts, although with this info it does look to underlying cause could be related to bug 595808 after all (but in any case better to track as separate bug).
Comment 9 Kristian Fiskerstrand (RETIRED) gentoo-dev 2017-01-30 14:08:49 UTC
Setting see also, although this bug happens with smartcard support off
Comment 10 Kristian Fiskerstrand (RETIRED) gentoo-dev 2017-01-31 11:33:38 UTC
Upstream response: 
"""
Err.  From the log it doesn't seem like a test is run at all.  Please
ask the reporter to figure out what is actually happening.  The log ends
in

make  check-TESTS
make[2]: Entering directory
'/var/tmp/portage/app-crypt/gnupg-2.1.17-r1/work/gnupg-2.1.17/agent'

however, there are no tests in agent/ that actually spawn the agent.
So, what agent process are we even looking at?

Further,  from the stack trace I see that npth is trying to acquire the
global npth lock.  This suggests that more threads are running.  Please
ask the reporter to do 'thread apply all bt'.


Justus
"""
Comment 11 Harri Nieminen (Moiman) 2017-02-03 12:33:06 UTC
(In reply to Kristian Fiskerstrand from comment #10)
> Upstream response: 
> """
> Err.  From the log it doesn't seem like a test is run at all.  Please
> ask the reporter to figure out what is actually happening.  The log ends
> in
> 
> make  check-TESTS
> make[2]: Entering directory
> '/var/tmp/portage/app-crypt/gnupg-2.1.17-r1/work/gnupg-2.1.17/agent'
> 
> however, there are no tests in agent/ that actually spawn the agent.
> So, what agent process are we even looking at?
> 
> Further,  from the stack trace I see that npth is trying to acquire the
> global npth lock.  This suggests that more threads are running.  Please
> ask the reporter to do 'thread apply all bt'.
> 
> 
> Justus
> """

Ohh, I confused two bugs. Strace and gdb output are for gpg-agent that hang after pinentry when generating new keys.
Comment 12 Kristian Fiskerstrand (RETIRED) gentoo-dev 2017-03-02 19:51:46 UTC
Does the issue persist in 2.1.19?
Comment 13 Harri Nieminen (Moiman) 2017-03-03 18:09:46 UTC
Created attachment 465812 [details]
gdb t-protect

Yes, issue still persist in 2.1.19 .
I attached the right gdb trace now.

Test passes if I am compiling something while tests run. But if I'm not compiling while test runs it hangs. If I start compiling something after test has hanged it doesn't help.
Comment 14 Harri Nieminen (Moiman) 2017-03-03 18:44:04 UTC
(In reply to moikkis from comment #13)

> Test passes if I am compiling something while tests run. But if I'm not
> compiling while test runs it hangs. If I start compiling something after
> test has hanged it doesn't help.

Okay I given enough time and compiling in background test passes. Maybe I just have some entropy problems or something.
Comment 15 Alon Bar-Lev (RETIRED) gentoo-dev 2017-03-03 19:32:16 UTC
thanks, please reopen if you still experience this.
Comment 16 Petre Rodan 2017-07-12 13:25:00 UTC
(In reply to Alon Bar-Lev from comment #15)
> thanks, please reopen if you still experience this.

I ended up having this problem myself for the last few months. today I decided to look into it.

long story short a tickless kernel will make the agent wrongly detect the speed of encryption and thus it keeps incrementing the number of iterations sent to gcrypt lib function.

an upstream bug has been filed here: https://dev.gnupg.org/T3276