Bug 3061

Summary: strace hangs on simple pthread program
Product: Sisyphus Reporter: Sergei Dolmatov <saint>
Component: straceAssignee: Dmitry V. Levin <ldv>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: major    
Priority: P2 CC: ldv, placeholder
Version: unstable   
Hardware: all   
OS: Linux   
Attachments:
Description Flags
src.rpm без собственно ipcad-2.9
none
stracetest.c
none
stracetest.c [2]
none
stracetest.c none

Description Sergei Dolmatov 2003-09-28 14:48:59 MSD
buildreq вешается после запуска программы проверки наличия работоспособного
pthreads. Текст программы из ./configure:

$ cat conftest.c
#line 4164 "configure"
#include "confdefs.h"

#include <unistd.h>
#include <pthread.h>
int pid;
void
testpid(void *ignore) {
	int mypid = getpid();
	(void)ignore;
	/* All threads should have the same PID! */
	if(mypid != pid)
		exit(1);
	else
		exit(0);
}
int
main(void) {
	pthread_t child;
	pid = getpid();
	pthread_create(&child, NULL, testpid, NULL);
	pthread_join(child, NULL);
	return 1;
}

При запуске этой откомпилированной программы вручную и при обычном ./configure
все проходит нормально, возвращает 1.

Ядро: 2.4.20-alt10-up
rpm-utils-0.7.3-alt1
strace-4.4.99-alt1

Steps to Reproduce:
1. Взять и установить ipcad-2.9-alt1.src.rpm
2. Запустить buildreq ipcad.spec
Comment 1 Sergei Dolmatov 2003-09-28 15:08:08 MSD
Created attachment 282 [details]
src.rpm без собственно ipcad-2.9
Comment 2 Dmitry V. Levin 2003-09-28 16:47:31 MSD
This simple pthread test fails. 
$ gcc -Wall -Werror stracetest.c -lpthread -o stracetest 
$ strace -fF ./stracetest 
 
Tested on: 
glibc-2.2.6-alt0.10 + kernel-2.2.25-alt1-smp-secure + strace-4.4-alt6 
glibc-2.2.6-alt0.10 + 2.4.20-alt10-up + strace-4.4.99-alt1 
 
Comment 3 Dmitry V. Levin 2003-09-28 16:48:45 MSD
Created attachment 283 [details]
stracetest.c
Comment 4 Dmitry V. Levin 2003-09-28 16:56:55 MSD
Created attachment 284 [details]
stracetest.c [2]
Comment 5 Dmitry V. Levin 2003-09-28 17:06:21 MSD
Created attachment 285 [details]
stracetest.c
Comment 6 Dmitry V. Levin 2003-09-30 15:57:14 MSD
Waiting for upstream: 
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=105994 
Comment 7 Dmitry V. Levin 2003-10-06 11:59:40 MSD
Между прочим, хоть проблема и в strace'е, тест в ipcad-2.9-alt1.src.rpm всё равно 
кривой. 
 
Comment 8 Dmitry V. Levin 2003-12-15 02:55:25 MSK
Fixed in strace-4.5.1-alt1