From owner-freebsd-current@FreeBSD.ORG Thu Apr 12 06:42:35 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0C2B106566C for ; Thu, 12 Apr 2012 06:42:35 +0000 (UTC) (envelope-from taku@tackymt.homeip.net) Received: from basalt.tackymt.homeip.net (unknown [IPv6:2001:3e0:577:0:20d:61ff:fecc:2253]) by mx1.freebsd.org (Postfix) with ESMTP id 27BE18FC08 for ; Thu, 12 Apr 2012 06:42:35 +0000 (UTC) Received: from basalt.tackymt.homeip.net (localhost [127.0.0.1]) by basalt.tackymt.homeip.net (Postfix) with ESMTP id BC4EC83A0; Thu, 12 Apr 2012 15:42:33 +0900 (JST) X-Virus-Scanned: amavisd-new at tackymt.homeip.net Received: from localhost by basalt.tackymt.homeip.net (amavisd-new, unix socket) with ESMTP id pCx6X7Jz6BST; Thu, 12 Apr 2012 15:42:31 +0900 (JST) Received: from biotite.tackymt.homeip.net (biotite.tackymt.homeip.net [IPv6:2001:3e0:577:0:216:cfff:febc:1472]) by basalt.tackymt.homeip.net (Postfix) with ESMTPSA; Thu, 12 Apr 2012 15:42:31 +0900 (JST) Date: Thu, 12 Apr 2012 15:42:32 +0900 From: Taku YAMAMOTO To: Konstantin Belousov Message-Id: <20120412154232.354fed8c.taku@tackymt.homeip.net> In-Reply-To: <20120411194239.GN2358@deviant.kiev.zoral.com.ua> References: <20120410063153.GA1458@mole.fafoe.narf.at> <20120411113400.GA1399@mole.fafoe.narf.at> <20120411125338.GK2358@deviant.kiev.zoral.com.ua> <20120412031919.be6c584e.taku@tackymt.homeip.net> <20120412040411.03ee34dd.taku@tackymt.homeip.net> <20120411194239.GN2358@deviant.kiev.zoral.com.ua> X-Mailer: Sylpheed 3.1.0 (GTK+ 2.22.1; i386-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: Follow-up: Re: recent update breaks some ports X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Apr 2012 06:42:36 -0000 I'm glad to report that your patch fixes not only wlock-within-wlock cases but also rlock-within-wlock cases properly! On Wed, 11 Apr 2012 22:42:39 +0300 Konstantin Belousov wrote: > On Thu, Apr 12, 2012 at 04:04:11AM +0900, Taku YAMAMOTO wrote: (snip) > > The following is the first occurence of rlock-within-wlock incident. > > > > Hardware watchpoint 2: lock_place[0].count_rw > > > > Old value = 0 > > New value = 1 > > 0x28f526fd in _thr_rtld_rlock_acquire (lock=0x28f63600) > > at /usr/src/lib/libthr/thread/thr_rtld.c:133 > > 133 HANDLE_NESTED_ACQ(count_rw); > > (gdb) bt > > #0 0x28f526fd in _thr_rtld_rlock_acquire (lock=0x28f63600) > > at /usr/src/lib/libthr/thread/thr_rtld.c:133 > > #1 0x28071291 in rlock_acquire () from /libexec/ld-elf.so.1 > > #2 0x2806fccb in _rtld_bind () from /libexec/ld-elf.so.1 > > #3 0x28069dc9 in _rtld_bind_start () from /libexec/ld-elf.so.1 > > #4 0x290c3000 in ?? () > > #5 0x00000148 in ?? () > > #6 0x29356318 in ?? () from /usr/lib/libsupc++.so.1 > > #7 0x28f503e0 in _thr_once_init () > > from /home/taku/work/build/biotite/usr/src/lib/libthr/libthr.so.3 > > #8 0xffffffff in ?? () > > #9 0x00200202 in ?? () > > #10 0x290c3000 in ?? () > > #11 0x00000148 in ?? () > > #12 0x2935eae0 in __gxx_personality_v0 () from /usr/lib/libsupc++.so.1 > > #13 0x2935f5c5 in __cxa_get_globals () from /usr/lib/libsupc++.so.1 > > #14 0x290c2710 in ?? () > > #15 0xbfbfdc48 in ?? () > > #16 0x29356325 in ?? () from /usr/lib/libsupc++.so.1 > > #17 0x280714c9 in lock_release () from /libexec/ld-elf.so.1 > > Previous frame inner to this frame (corrupt stack?) > Unortunately, this trace is not usefule, it seems that you need > to recompile rtld/libc/libthr with debugging symbols to get the issue > fixed. I retook the latter execution path with debugging symbols, without your patch for the record. Hardware watchpoint 3: lock_place[0].count_rw Old value = 0 New value = 1 0x28f5275d in _thr_rtld_rlock_acquire (lock=0x28f63680) at /usr/src/lib/libthr/thread/thr_rtld.c:133 133 HANDLE_NESTED_ACQ(count_rw); (gdb) bt #0 0x28f5275d in _thr_rtld_rlock_acquire (lock=0x28f63680) at /usr/src/lib/libthr/thread/thr_rtld.c:133 #1 0x28071291 in rlock_acquire (lock=0x2807efbc, lockstate=0xbfbfdb70) at /usr/src/libexec/rtld-elf/rtld_lock.c:197 #2 0x2806fccb in _rtld_bind (obj=0x290c3000, reloff=328) at /usr/src/libexec/rtld-elf/rtld.c:642 #3 0x28069dc9 in _rtld_bind_start () at /usr/src/libexec/rtld-elf/i386/rtld_start.S:81 #4 0x290c3000 in ?? () #5 0x00000148 in ?? () #6 0x29356318 in .rel.plt () from /home/taku/lib/debug/libsupc++.so.1 #7 0xffffffff in ?? () #8 0x00200206 in ?? () #9 0x290c3000 in ?? () #10 0x00000148 in ?? () #11 0x2935eae0 in __static_initialization_and_destruction_0 (__initialize_p=Variable "__initialize_p" is not available. ) at gthr-default.h:188 #12 0x2935f5c5 in __cxa_get_globals () from /home/taku/lib/debug/libsupc++.so.1 #13 0x290c2710 in ?? () #14 0xbfbfdc48 in ?? () #15 0x29356325 in _init () from /home/taku/lib/debug/libsupc++.so.1 #16 0x280714c9 in lock_release (lock=0x280714c9, lockstate=0x2807d2a4) at /usr/src/libexec/rtld-elf/rtld_lock.c:219 Previous frame inner to this frame (corrupt stack?) (gdb) c Continuing. Hardware watchpoint 3: lock_place[0].count_rw Old value = 1 New value = 2 0x28f5275d in _thr_rtld_rlock_acquire (lock=0x28f63680) at /usr/src/lib/libthr/thread/thr_rtld.c:133 133 HANDLE_NESTED_ACQ(count_rw); (gdb) bt #0 0x28f5275d in _thr_rtld_rlock_acquire (lock=0x28f63680) at /usr/src/lib/libthr/thread/thr_rtld.c:133 #1 0x28071291 in rlock_acquire (lock=0x2807efbc, lockstate=0xbfbfdb70) at /usr/src/libexec/rtld-elf/rtld_lock.c:197 #2 0x2806fccb in _rtld_bind (obj=0x290c3000, reloff=64) at /usr/src/libexec/rtld-elf/rtld.c:642 #3 0x28069dc9 in _rtld_bind_start () at /usr/src/libexec/rtld-elf/i386/rtld_start.S:81 #4 0x290c3000 in ?? () #5 0x00000040 in ?? () #6 0x00018747 in ?? () #7 0x00018747 in ?? () #8 0x29362f8c in __new_handler () from /home/taku/lib/debug/libsupc++.so.1 #9 0x00200246 in ?? () #10 0x290c3000 in ?? () #11 0x00000040 in ?? () #12 0x2935eaf8 in __static_initialization_and_destruction_0 (__initialize_p=Variable "__initialize_p" is not available. ) at gthr-default.h:189 #13 0x2935f5c5 in __cxa_get_globals () from /home/taku/lib/debug/libsupc++.so.1 #14 0x290c2710 in ?? () #15 0xbfbfdc48 in ?? () #16 0x29356325 in _init () from /home/taku/lib/debug/libsupc++.so.1 #17 0x280714c9 in lock_release (lock=0x280714c9, lockstate=0x2807d2a4) ---Type to continue, or q to quit--- at /usr/src/libexec/rtld-elf/rtld_lock.c:219 Previous frame inner to this frame (corrupt stack?) (gdb) c Continuing. Hardware watchpoint 3: lock_place[0].count_rw Old value = 2 New value = 3 0x28f5275d in _thr_rtld_rlock_acquire (lock=0x28f63680) at /usr/src/lib/libthr/thread/thr_rtld.c:133 133 HANDLE_NESTED_ACQ(count_rw); (gdb) bt #0 0x28f5275d in _thr_rtld_rlock_acquire (lock=0x28f63680) at /usr/src/lib/libthr/thread/thr_rtld.c:133 #1 0x28071291 in rlock_acquire (lock=0x2807efbc, lockstate=0xbfbfdb70) at /usr/src/libexec/rtld-elf/rtld_lock.c:197 #2 0x2806fccb in _rtld_bind (obj=0x290c3000, reloff=80) at /usr/src/libexec/rtld-elf/rtld.c:642 #3 0x28069dc9 in _rtld_bind_start () at /usr/src/libexec/rtld-elf/i386/rtld_start.S:81 #4 0x290c3000 in ?? () #5 0x00000050 in ?? () #6 0x29362e44 in .got () from /home/taku/lib/debug/libsupc++.so.1 #7 0x00000001 in ?? () #8 0x00000000 in ?? () #9 0x00200246 in ?? () #10 0x290c3000 in ?? () #11 0x00000050 in ?? () #12 0x2935eb00 in __static_initialization_and_destruction_0 (__initialize_p=Variable "__initialize_p" is not available. ) at gthr-default.h:190 #13 0x2935f5c5 in __cxa_get_globals () from /home/taku/lib/debug/libsupc++.so.1 #14 0x290c2710 in ?? () #15 0xbfbfdc48 in ?? () #16 0x29356325 in _init () from /home/taku/lib/debug/libsupc++.so.1 #17 0x280714c9 in lock_release (lock=0x280714c9, lockstate=0x2807d2a4) ---Type to continue, or q to quit--- at /usr/src/libexec/rtld-elf/rtld_lock.c:219 Previous frame inner to this frame (corrupt stack?) (gdb) c Continuing. -- -|-__ YAMAMOTO, Taku | __ < - A chicken is an egg's way of producing more eggs. -