From owner-freebsd-alpha Wed Dec 5 16:44: 9 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by hub.freebsd.org (Postfix) with ESMTP id 7590A37B417 for ; Wed, 5 Dec 2001 16:44:02 -0800 (PST) Received: (from uucp@localhost) by srv1.cosmo-project.de (8.11.0/8.11.0) with UUCP id fB60htZ33068 for freebsd-alpha@freebsd.org; Thu, 6 Dec 2001 01:43:55 +0100 (CET) Received: from mail.cicely.de (cicely20.cicely.de [10.1.1.22]) by cicely5.cicely.de (8.12.1/8.12.1) with ESMTP id fB60iEAD058450 for ; Thu, 6 Dec 2001 01:44:14 +0100 (CET)?g (envelope-from ticso@cicely8.cicely.de) Received: from cicely8.cicely.de (cicely8.cicely.de [10.1.2.10]) by mail.cicely.de (8.11.0/8.11.0) with ESMTP id fB60iDL08470 for ; Thu, 6 Dec 2001 01:44:14 +0100 (CET) Received: (from ticso@localhost) by cicely8.cicely.de (8.11.4/8.11.4) id fB60iDc87312 for freebsd-alpha@freebsd.org; Thu, 6 Dec 2001 01:44:13 +0100 (CET) (envelope-from ticso) Date: Thu, 6 Dec 2001 01:44:13 +0100 From: Bernd Walter To: freebsd-alpha@freebsd.org Subject: -pthread problems on -current Message-ID: <20011206014412.G84086@cicely8.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.23i X-Operating-System: FreeBSD cicely8.cicely.de 5.0-CURRENT i386 Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org ticso@cicely9# cat test2.c #include 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