Date: Thu, 6 Dec 2001 01:44:13 +0100 From: Bernd Walter <ticso@cicely8.cicely.de> To: freebsd-alpha@freebsd.org Subject: -pthread problems on -current Message-ID: <20011206014412.G84086@cicely8.cicely.de>
index | next in thread | raw e-mail
ticso@cicely9# cat test2.c
#include <stdlib.h>
int
main() {
system("ls");
}
ticso@cicely9# gcc -o test2 test2.c -pthread
ticso@cicely9# ./test2
cbackup-0.3 confdefs.h conftest.c ktrace.out test.c test2.c
conf.glibtest conftest delme test test2
[here it hangs forever]
Without -pthread or on i386 it runs fine.
This is the end of ktrace output (alpha with -pthread):
[...]
42225 ls RET write 57/0x39
42225 ls CALL exit(0)
42224 sh RET wait4 42225/0xa4f1
42224 sh CALL exit(0)
42223 test2 PSIG SIGCHLD caught handler=0x16005c1c0 mask=0x0 code=0x0
42223 test2 RET poll -1 errno 4 Interrupted system call
42223 test2 CALL write(0x4,0x120026cb0,0x1)
42223 test2 GIO fd 4 wrote 1 byte
"\^T"
42223 test2 RET write 1
42223 test2 CALL sigreturn(0x120026cd8)
42223 test2 RET sigreturn JUSTRETURN
42223 test2 CALL read(0x3,0x12001bec8,0x80)
42223 test2 GIO fd 3 read 1 byte
"\^T"
42223 test2 RET read 1
42223 test2 CALL read(0x3,0x12001bec8,0x80)
42223 test2 RET read -1 errno 35 Resource temporarily unavailable
42223 test2 CALL fcntl(0,0x4,0x6)
42223 test2 RET fcntl 0
42223 test2 CALL fcntl(0x1,0x4,0x6)
42223 test2 RET fcntl 0
42223 test2 CALL fcntl(0x2,0x4,0x6)
42223 test2 RET fcntl 0
42223 test2 CALL fcntl(0x5,0x4,0x4)
42223 test2 RET fcntl 0
42223 test2 CALL gettimeofday(0x16007bd60,0)
42223 test2 RET gettimeofday 0
42223 test2 CALL poll(0x12002c000,0x1,0xffffffffffffffff)
On i386 after gettimeofday wait4 is called:
[...]
56231 ls RET write 26/0x1a
56231 ls CALL exit(0)
56230 sh RET wait4 56231/0xdba7
56230 sh CALL exit(0)
56229 test2 PSIG SIGCHLD caught handler=0x28072690 mask=0x0 code=0x0
56229 test2 RET poll -1 errno 4 Interrupted system call
56229 test2 CALL write(0x4,0x805765f,0x1)
56229 test2 GIO fd 4 wrote 1 byte
"\^T"
56229 test2 RET write 1
56229 test2 CALL sigreturn(0x805767c)
56229 test2 RET sigreturn JUSTRETURN
56229 test2 CALL read(0x3,0x804dec8,0x80)
56229 test2 GIO fd 3 read 1 byte
"\^T"
56229 test2 RET read 1
56229 test2 CALL read(0x3,0x804dec8,0x80)
56229 test2 RET read -1 errno 35 Resource temporarily unavailable
56229 test2 CALL fcntl(0,0x4,0x6)
56229 test2 RET fcntl 0
56229 test2 CALL fcntl(0x1,0x4,0x6)
56229 test2 RET fcntl 0
56229 test2 CALL fcntl(0x2,0x4,0x6)
56229 test2 RET fcntl 0
56229 test2 CALL gettimeofday(0x2807fa88,0)
56229 test2 RET gettimeofday 0
56229 test2 CALL wait4(0xdba6,0xbfbff8e8,0x1,0)
56229 test2 RET wait4 56230/0xdba6
56229 test2 CALL sigaction(0x2,0xbfbff89c,0)
56229 test2 RET sigaction 0
56229 test2 CALL sigaction(0x3,0xbfbff88c,0)
56229 test2 RET sigaction 0
56229 test2 CALL sigprocmask(0x1,0x2805dba0,0xbfbff940)
56229 test2 RET sigprocmask 0
56229 test2 CALL sigprocmask(0x3,0x2805dbb0,0)
56229 test2 RET sigprocmask 0
56229 test2 CALL setitimer(0x2,0xbfbff960,0)
56229 test2 RET setitimer 0
56229 test2 CALL close(0x3)
56229 test2 RET close 0
56229 test2 CALL close(0x4)
56229 test2 RET close 0
56229 test2 CALL fcntl(0,0x3,0)
56229 test2 RET fcntl 6
56229 test2 CALL fcntl(0,0x4,0x2)
56229 test2 RET fcntl 0
56229 test2 CALL fcntl(0x1,0x3,0)
56229 test2 RET fcntl 2
56229 test2 CALL fcntl(0x1,0x4,0x2)
56229 test2 RET fcntl 0
56229 test2 CALL fcntl(0x2,0x3,0)
56229 test2 RET fcntl 2
56229 test2 CALL fcntl(0x2,0x4,0x2)
56229 test2 RET fcntl 0
56229 test2 CALL exit(0)
--
B.Walter COSMO-Project http://www.cosmo-project.de
ticso@cicely.de Usergroup info@cosmo-project.de
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011206014412.G84086>
