Re: Follow-up: Re: recent update breaks some ports

From: Taku YAMAMOTO <taku_at_tackymt.homeip.net>
Date: Thu, 12 Apr 2012 15:42:32 +0900
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 <kostikbel_at_gmail.com> 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 <return> to continue, or q <return> 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 <return> to continue, or q <return> 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
 | __ <     <taku_at_tackymt.homeip.net>

      - A chicken is an egg's way of producing more eggs. -
Received on Thu Apr 12 2012 - 04:42:35 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:25 UTC