From owner-freebsd-sparc64@FreeBSD.ORG Tue Jun 24 02:40:07 2003 Return-Path: Delivered-To: freebsd-sparc64@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C4D2537B401 for ; Tue, 24 Jun 2003 02:40:07 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4AB843FA3 for ; Tue, 24 Jun 2003 02:40:06 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h5O9e6Up021115 for ; Tue, 24 Jun 2003 02:40:06 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h5O9e6OK021114; Tue, 24 Jun 2003 02:40:06 -0700 (PDT) Resent-Date: Tue, 24 Jun 2003 02:40:06 -0700 (PDT) Resent-Message-Id: <200306240940.h5O9e6OK021114@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-sparc64@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Steven Haywood Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E2EEC37B401 for ; Tue, 24 Jun 2003 02:34:23 -0700 (PDT) Received: from natural.keybaud.org (natural.keybaud.org [81.23.208.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B4AB43F75 for ; Tue, 24 Jun 2003 02:34:23 -0700 (PDT) (envelope-from steven@natural.keybaud.org) Received: by natural.keybaud.org (Postfix, from userid 1002) id 8774C2F; Tue, 24 Jun 2003 10:34:17 +0100 (BST) Message-Id: <20030624093417.8774C2F@natural.keybaud.org> Date: Tue, 24 Jun 2003 10:34:17 +0100 (BST) From: Steven Haywood To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: sparc64/53670: pthreads implementation on 5.1-Release sparc64 not working X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Steven Haywood List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2003 09:40:08 -0000 >Number: 53670 >Category: sparc64 >Synopsis: pthreads implementation on 5.1-Release sparc64 not working >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-sparc64 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jun 24 02:40:05 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Steven Haywood >Release: FreeBSD 5.1-RELEASE sparc64 >Organization: >Environment: System: FreeBSD natural.keybaud.org 5.1-RELEASE FreeBSD 5.1-RELEASE #1: Mon Jun 23 21:24:47 BST 2003 root@natural.keybaud.org:/usr/obj/usr/src/sys/KEYBAUD sparc64 Sun ultra 5, UltraSparc IIi 333Mhz 8 MB Ecache 256 MB ram >Description: Code that uses pthreads hangs (mysql, python etc) >How-To-Repeat: -bash-2.05b$ cat conftest.c ########################################## #include 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; } ########################################### -bash-2.05b$ gcc -o test -lc_r conftest.c -bash-2.05b$ truss ./test mmap(0x0,7056,0x3,0x1000,-1,0x0) = 1075978240 (0x40222000) munmap(0x40222000,0x1b90) = 0 (0x0) __sysctl(0x7fdfffff4f0,0x2,0x40323110,0x7fdfffff4e8,0x0,0x0) = 0 (0x0) mmap(0x0,32768,0x3,0x1002,-1,0x0) = 1075978240 (0x40222000) geteuid() = 1002 (0x3ea) getuid() = 1002 (0x3ea) getegid() = 1001 (0x3e9) getgid() = 1001 (0x3e9) mmap(0x0,40960,0x3,0x1002,-1,0x0) = 1076011008 (0x4022a000) open("/var/run/ld-elf.so.hints",0x0,010010540070) = 3 (0x3) read(0x3,0x7fdfffff780,0x80) = 128 (0x80) lseek(3,0x80,-1) = 128 (0x80) read(0x3,0x4022e000,0x57) = 87 (0x57) close(3) = 0 (0x0) access("/usr/lib/libc_r.so.5",0) = 0 (0x0) open("/usr/lib/libc_r.so.5",0x0,07) = 3 (0x3) fstat(3,0x7fdfffff840) = 0 (0x0) read(0x3,0x7fdffffd780,0x2000) = 8192 (0x2000) mmap(0x0,1220608,0x5,0x20002,3,0x0) = 1077043200 (0x40326000) mprotect(0x40342000,0x2000,0x7) = 0 (0x0) mprotect(0x40342000,0x2000,0x5) = 0 (0x0) mmap(0x40442000,16384,0x7,0x12,3,0x0) = 1078206464 (0x40442000) mmap(0x40446000,40960,0x7,0x1012,-1,0x0) = 1078222848 (0x40446000) close(3) = 0 (0x0) access("/usr/lib/libc.so.5",0) = 0 (0x0) open("/usr/lib/libc.so.5",0x0,0137) = 3 (0x3) fstat(3,0x7fdfffff840) = 0 (0x0) read(0x3,0x7fdffffd780,0x2000) = 8192 (0x2000) mmap(0x0,2154496,0x5,0x20002,3,0x0) = 1078263808 (0x40450000) mprotect(0x40538000,0x2000,0x7) = 0 (0x0) mprotect(0x40538000,0x2000,0x5) = 0 (0x0) mmap(0x40638000,73728,0x7,0x12,3,0x0) = 1080262656 (0x40638000) mmap(0x4064a000,81920,0x7,0x1012,-1,0x0) = 1080336384 (0x4064a000) close(3) = 0 (0x0) mmap(0x0,304,0x3,0x1000,-1,0x0) = 1076051968 (0x40234000) munmap(0x40234000,0x130) = 0 (0x0) mmap(0x0,9456,0x3,0x1000,-1,0x0) = 1076051968 (0x40234000) munmap(0x40234000,0x24f0) = 0 (0x0) mmap(0x0,43072,0x3,0x1000,-1,0x0) = 1076051968 (0x40234000) munmap(0x40234000,0xa840) = 0 (0x0) __sysctl(0x7fdfffff550,0x2,0x4065b218,0x7fdfffff548,0x0,0x0) = 0 (0x0) getpid() = 33200 (0x81b0) fcntl(0x0,0x3,0x0) = 2 (0x2) fcntl(0x1,0x3,0x0) = 2 (0x2) fcntl(0x2,0x3,0x0) = 2 (0x2) pipe() = 3 (0x3) fcntl(0x3,0x3,0x0) = 2 (0x2) fcntl(0x3,0x4,0x6) = 0 (0x0) fcntl(0x4,0x3,0x0) = 2 (0x2) fcntl(0x4,0x4,0x6) = 0 (0x0) readlink("/etc/malloc.conf",0x7fdfffff380,63) ERR#2 'No such file or directory' issetugid() = 0 (0x0) getuid() = 1002 (0x3ea) getgid() = 1001 (0x3e9) mmap(0x0,8192,0x3,0x1002,-1,0x0) = 1076051968 (0x40234000) break(0x200d68) = 0 (0x0) break(0x200d68) = 0 (0x0) break(0x204000) = 0 (0x0) break(0x204000) = 0 (0x0) break(0x206000) = 0 (0x0) break(0x206000) = 0 (0x0) break(0x208000) = 0 (0x0) break(0x208000) = 0 (0x0) break(0x20a000) = 0 (0x0) break(0x20a000) = 0 (0x0) break(0x20c000) = 0 (0x0) __sysctl(0x7fdfffff670,0x2,0x40443370,0x7fdfffff628,0x0,0x0) = 0 (0x0) mmap(0x7fdffefe000,8192,0x0,0x1000,-1,0x0) = -1056768 (0xffefe000) break(0x20c000) = 0 (0x0) break(0x20e000) = 0 (0x0) gettimeofday(0x40443390,0x0) = 0 (0x0) sysarch(0x2,0x4063e100) = 0 (0x0) sigaction(SIGHUP,0x0,0x40449420) = 0 (0x0) sigaction(SIGINT,0x0,0x40449440) = 0 (0x0) sigaction(SIGQUIT,0x0,0x40449460) = 0 (0x0) sigaction(SIGILL,0x0,0x40449480) = 0 (0x0) sigaction(SIGTRAP,0x0,0x404494a0) = 0 (0x0) sigaction(SIGABRT,0x0,0x404494c0) = 0 (0x0) sigaction(SIGEMT,0x0,0x404494e0) = 0 (0x0) sigaction(SIGFPE,0x0,0x40449500) = 0 (0x0) sigaction(SIGBUS,0x0,0x40449540) = 0 (0x0) sigaction(SIGSEGV,0x0,0x40449560) = 0 (0x0) sigaction(SIGSYS,0x0,0x40449580) = 0 (0x0) sigaction(SIGPIPE,0x0,0x404495a0) = 0 (0x0) sigaction(SIGALRM,0x0,0x404495c0) = 0 (0x0) sigaction(SIGTERM,0x0,0x404495e0) = 0 (0x0) sigaction(SIGURG,0x0,0x40449600) = 0 (0x0) sigaction(SIGTSTP,0x0,0x40449640) = 0 (0x0) sigaction(SIGCONT,0x0,0x40449660) = 0 (0x0) sigaction(SIGCHLD,0x0,0x40449680) = 0 (0x0) sigaction(SIGTTIN,0x0,0x404496a0) = 0 (0x0) sigaction(SIGTTOU,0x0,0x404496c0) = 0 (0x0) sigaction(SIGIO,0x0,0x404496e0) = 0 (0x0) sigaction(SIGXCPU,0x0,0x40449700) = 0 (0x0) sigaction(SIGXFSZ,0x0,0x40449720) = 0 (0x0) sigaction(SIGVTALRM,0x0,0x40449740) = 0 (0x0) sigaction(SIGPROF,0x0,0x40449760) = 0 (0x0) sigaction(SIGWINCH,0x0,0x40449780) = 0 (0x0) sigaction(SIGINFO,0x0,0x404497a0) = 0 (0x0) sigaction(SIGUSR1,0x0,0x404497c0) = 0 (0x0) sigaction(SIGUSR2,0x0,0x404497e0) = 0 (0x0) sigaction(SIGPROF,0x7fdfffff630,0x0) = 0 (0x0) sigaction(SIGINFO,0x7fdfffff630,0x0) = 0 (0x0) sigaction(SIGCHLD,0x7fdfffff630,0x0) = 0 (0x0) sigprocmask(0x3,0x0,0x40443418) = 0 (0x0) __sysctl(0x7fdfffff670,0x2,0x7fdfffff650,0x7fdfffff628,0x0,0x0) = 0 (0x0) getdtablesize() = 3405 (0xd4d) break(0x20e000) = 0 (0x0) break(0x216000) = 0 (0x0) break(0x216000) = 0 (0x0) break(0x21e000) = 0 (0x0) break(0x21e000) = 0 (0x0) break(0x220000) = 0 (0x0) fcntl(0x0,0x4,0x6) = 0 (0x0) fcntl(0x1,0x4,0x6) = 0 (0x0) fcntl(0x2,0x4,0x6) = 0 (0x0) sigprocmask(0x1,0x40322f40,0x7fdfffff8b0) = 0 (0x0) sigprocmask(0x3,0x40322f50,0x0) = 0 (0x0) sysarch(0x1,0x40639390) = 0 (0x0) mmap(0x7fdffeee000,65536,0x3,0x400,-1,0x0) = -1122304 (0xffeee000) setitimer(0x2,0x7fdfffff930,0x0) = 0 (0x0) SIGNAL 27 SIGNAL 27 gettimeofday(0x40443390,0x0) = 0 (0x0) sigprocmask(0x3,0x40443418,0x0) = 0 (0x0) sigreturn(0x7fdfffff250) = 1076043776 (0x40232000) poll(0x216000,0x0,0x0) = 0 (0x0) Nothing else happens until I Ctrl-C it. Note that in this case I waited about 3 minutes. ^CSIGNAL 2 poll(0x216000,0x1,0xffffffffffffffff) ERR#4 'Interrupted system call' SIGNAL 2 SIGNAL 2 process exit, rval = 2 >Fix: Unknown >Release-Note: >Audit-Trail: >Unformatted: