classification
Title: configure script hangs on pthread verification and PTHREAD_SCOPE_SYSTEM verification on Ubuntu
Type: compile error Stage: resolved
Components: Installation Versions: Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Raphael.Cruzeiro, barry, neologix
Priority: normal Keywords:

Created on 2012-04-18 07:40 by Raphael.Cruzeiro, last changed 2012-04-29 16:08 by neologix. This issue is now closed.

Files
File name Uploaded Description Edit
output_sh Raphael.Cruzeiro, 2012-04-23 20:29 output of sh -x ./configure
strace.output.txt Raphael.Cruzeiro, 2012-04-23 20:55 output of strace -f ./configure
pthread_strace.txt Raphael.Cruzeiro, 2012-04-27 00:50 Output of the pthread test program's strace
Messages (8)
msg158597 - (view) Author: Raphael Cruzeiro (Raphael.Cruzeiro) Date: 2012-04-18 07:40
While installing Python 2.7.3 on my Ubuntu server the configure script hanged on the verification for pthread, I then proceded to alter the script to aways return true for pthread and it hanged again checking for PTHREAD_SCOPE_SYSTEM, which I also bypassed by altering the script and only then was I able to successfully install Python 2.7.3
msg158953 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2012-04-22 08:20
Could you please run:
$ sh -x ./configure

to see what's going on.

It might also be interesting to have the output of
$ strace -f ./configure

Thanks.
msg159073 - (view) Author: Raphael Cruzeiro (Raphael.Cruzeiro) Date: 2012-04-23 20:29
Here is the output of sh -x ./configure
msg159075 - (view) Author: Raphael Cruzeiro (Raphael.Cruzeiro) Date: 2012-04-23 20:55
Posting the strac output
msg159187 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2012-04-24 18:44
Your strace output looks strange :-)
Unless it's truncated, we see that the wait4() doesn't return when the
test pthread executable exits...

Could you try building this code :
"""
#include <pthread.h>

void* routine(void* p){return NULL;}

int main(){
  pthread_t p;
  if(pthread_create(&p,NULL,routine,NULL)!=0)
    return 1;
  (void)pthread_detach(p);
  return 0;
}
"""

(with gcc -o test test.c -lpthread)

And running it from the command line, to see your shell hangs (you
might also want to try 'strace -f sh -c "test"').
msg159436 - (view) Author: Raphael Cruzeiro (Raphael.Cruzeiro) Date: 2012-04-27 00:50
Yes, this code is hanging in my system. I'm posting the strace output.

If there's any other information that may be helpful I'll happily provide it.
msg159445 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2012-04-27 07:38
> Yes, this code is hanging in my system. I'm posting the strace output.
>
> If there's any other information that may be helpful I'll happily provide it.

Well, in that case it's a bug in your pthread implementation:
returning from main() with detached threads should terminate the
process.

You should report this to your distribution bug tracker.
msg159621 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2012-04-29 16:08
I'm closing as invalid.
If you decide to fill a bug report to your distribution (or directly to the libc in this case), it'd be interesting to post a link to the bug report here.

Thanks.
History
Date User Action Args
2012-04-29 16:08:25neologixsetstatus: open -> closed
type: crash -> compile error
messages: + msg159621

resolution: not a bug
stage: resolved
2012-04-27 07:38:21neologixsetmessages: + msg159445
2012-04-27 00:50:34Raphael.Cruzeirosetfiles: + pthread_strace.txt

messages: + msg159436
2012-04-24 18:44:07neologixsetmessages: + msg159187
2012-04-23 20:55:34Raphael.Cruzeirosetfiles: + strace.output.txt

messages: + msg159075
2012-04-23 20:29:19Raphael.Cruzeirosetfiles: + output_sh

messages: + msg159073
2012-04-22 08:20:59neologixsetnosy: + neologix
messages: + msg158953
2012-04-18 10:51:24pitrousetnosy: + barry
2012-04-18 07:40:09Raphael.Cruzeirocreate