From nobody@FreeBSD.org Wed Jan 18 20:55:43 2006 Return-Path: Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1F6BB16A420 for ; Wed, 18 Jan 2006 20:55:43 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9990943D48 for ; Wed, 18 Jan 2006 20:55:42 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k0IKtgjc029995 for ; Wed, 18 Jan 2006 20:55:42 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k0IKtgZa029994; Wed, 18 Jan 2006 20:55:42 GMT (envelope-from nobody) Message-Id: <200601182055.k0IKtgZa029994@www.freebsd.org> Date: Wed, 18 Jan 2006 20:55:42 GMT From: Joe Bishop To: freebsd-gnats-submit@FreeBSD.org Subject: perl segfaults in pthread init code X-Send-Pr-Version: www-2.3 >Number: 91972 >Category: threads >Synopsis: perl segfaults in pthread init code >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-threads >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jan 18 21:00:15 GMT 2006 >Closed-Date: Thu Jan 19 14:56:21 GMT 2006 >Last-Modified: Thu Jan 19 14:56:21 GMT 2006 >Originator: Joe Bishop >Release: 6.0 >Organization: >Environment: FreeBSD Vigor11 6.0-STABLE FreeBSD 6.0-STABLE #0: Tue Jan 17 23:07:09 PST 2006 root@Vigor11:/usr/src/sys/i386/compile/GENERIC i386 >Description: Installed from CD 6.0-RELEASE. After install, tried 'startx'. Console went to video mode, but announced kdeinit had failed. Main terminal showed problems launching X, specifically X getconfig had Segfaulted and passed bad data to X. cvsup'd the kernel and recompiled with only I686_CPU and with -O2 -march=pentiumpro. No change. Investigation showed that perl segfaulted when run from the command line. gdb helped show that it was crashing in pthread code. Fetched perl-5.8.7_2 from FTP server, no change. cvsup'd src-lib and src-libexec and src-contrib. Rebuilt libc, libcrypt, libpthread. No change. Built libpthread with debug data and ran gdb again. Output is below. Is this a bizarre bug, or a possible hardware issue? Hardware is Gigabyte NForce 2/3/4 chipset with Athlon CPU. Was previously running WinXP+games without indications of hardware glitchiness. =================== [New LWP 100069] Program received signal SIGSEGV, Segmentation fault. [Switching to LWP 100069] _tcb_ctor (thread=0x8054000, initial=1) at /usr/src/lib/libpthread/arch/i386/i386/pthread_md.c:51 51 __asm __volatile("movl %%gs:0, %0" : "=r" (oldtls)); (gdb) bt #0 _tcb_ctor (thread=0x8054000, initial=1) at /usr/src/lib/libpthread/arch/i386/i386/pthread_md.c:51 #1 0x281bc3c8 in _thr_alloc (curthread=0x0) at /usr/src/lib/libpthread/thread/thr_kern.c:2373 #2 0x281bd4ed in _libpthread_init (curthread=0x0) at /usr/src/lib/libpthread/thread/thr_init.c:280 #3 0x281c167d in _thread_init_hack () at /usr/src/lib/libpthread/thread/thr_autoinit.c:50 #4 0x281c31d5 in _lockuser_setactive () from /usr/lib/libpthread.so.2 #5 0x281a29a5 in _init () from /usr/lib/libpthread.so.2 #6 0x2806e000 in ?? () #7 0x28068cd8 in ?? () from /libexec/ld-elf.so.1 #8 0xbfbfebf4 in ?? () #9 0x2804fc69 in find_symdef () from /libexec/ld-elf.so.1 #10 0x2804e923 in _rtld () from /libexec/ld-elf.so.1 #11 0x2804e386 in .rtld_start () from /libexec/ld-elf.so.1 (gdb) info registers eax 0x0 0 ecx 0x804b080 134525056 edx 0x0 0 ebx 0x281c54bc 672945340 esp 0xbfbfeb1c 0xbfbfeb1c ebp 0xbfbfeb34 0xbfbfeb34 esi 0x8054000 134561792 edi 0x0 0 eip 0x281c16a8 0x281c16a8 eflags 0x10202 66050 cs 0x33 51 ss 0x3b 59 ds 0x3b 59 es 0x3b 59 fs 0x3b 59 gs 0x3b 59 >How-To-Repeat: Install 6.0-RELEASE, run perl. >Fix: >Release-Note: >Audit-Trail: From: Joe Bishop To: bug-followup@FreeBSD.org, joe@merced.com Cc: Subject: Re: threads/91972: perl segfaults in pthread init code Date: Wed, 18 Jan 2006 20:22:42 -0800 Same behavior is seen with artsshell, dcop, kcheckrunning, kde- config, kdeinit, kradconfig, ksmserver, ksplash. Each seg faults in the same place. Tried running perl with libthr instead, same crash in the corresponding line of code. Tried with ULE scheduler, no change. State-Changed-From-To: open->closed State-Changed-By: deischen State-Changed-When: Thu Jan 19 14:55:46 UTC 2006 State-Changed-Why: It was CLFAGS that caused the problem. http://www.freebsd.org/cgi/query-pr.cgi?pr=91972 >Unformatted: