Re: Fatal error 'mutex is on list' at line 139 in file /usr/src/lib/libthr/thread/thr_mutex.c (errno = 35)

From: Konstantin Belousov <kostikbel_at_gmail.com>
Date: Sat, 19 Mar 2016 12:32:56 +0200
On Sat, Mar 19, 2016 at 12:24:11PM +0200, Oleg V. Nauman wrote:
> On Saturday 19 March 2016 12:14:33 Konstantin Belousov wrote:
> > On Sat, Mar 19, 2016 at 09:03:56AM +0200, Oleg V. Nauman wrote:
> > > On Friday 18 March 2016 11:55:31 Konstantin Belousov wrote:
> > > > On Fri, Mar 18, 2016 at 08:14:57AM +0200, Konstantin Belousov wrote:
> > > > > Yes, please.  It would be significantly easier to diagnose the problem
> > > > > if
> > > > > the minimal example is provided.  If not, please pack one crashing app
> > > > > and all it non-system libraries and provide the tarball to me.
> > > > 
> > > > Meantime you could also try the following change.  I doubt that it would
> > > > fix your issue, but it is possibly related.  Only libthr needs to be
> > > > rebuilt.
> > > > 
> > > > diff --git a/lib/libthr/thread/thr_fork.c b/lib/libthr/thread/thr_fork.c
> > > > index 7256b68..531e09c 100644
> > > > --- a/lib/libthr/thread/thr_fork.c
> > > > +++ b/lib/libthr/thread/thr_fork.c
> > >  
> > >  No it is still coredumping.
> > > 
> > > The only positive effect is that segfaults are quite occasional comparing
> > > to stock libthr
> > > 
> > > Loaded symbols for /libexec/ld-elf.so.1
> > > #0  0x00000008041b2d6a in thr_kill () from /lib/libc.so.7
> > > [New Thread 809215000 (LWP 100253/<unknown>)]
> > > (gdb) bt
> > > #0  0x00000008041b2d6a in thr_kill () from /lib/libc.so.7
> > > #1  0x00000008041b2d3b in __raise (s=6) at
> > > /usr/src/lib/libc/gen/raise.c:52
> > > #2  0x00000008041b2ca9 in abort () at /usr/src/lib/libc/stdlib/abort.c:65
> > > #3  0x0000000803eda67c in _thread_exit (fname=<value optimized out>,
> > > 
> > >     lineno=<value optimized out>, msg=<value optimized out>)
> > >     at /usr/src/lib/libthr/thread/thr_exit.c:182
> > > 
> > > #4  0x0000000803ed56fc in mutex_lock_common (m=<value optimized out>,
> > > 
> > >     abstime=<value optimized out>, cvattach=<value optimized out>)
> > >     at /usr/src/lib/libthr/thread/thr_mutex.c:139
> > > 
> > > #5  0x0000000803ed4c20 in __pthread_mutex_timedlock (mutex=0x818200008,
> > > 
> > >     abstime=0x7fffffffc468) at /usr/src/lib/libthr/thread/thr_mutex.c:566
> > 
> > Again, please show me
> > p *mutex
> > p m
> > p *m
> > from the frame 5.
> 
>  #0  0x00000008041b2d6a in thr_kill () from /lib/libc.so.7
> [New Thread 809215000 (LWP 100253/<unknown>)]
> (gdb) f 5
> #5  0x0000000803ed4c20 in __pthread_mutex_timedlock (mutex=0x818200008,
>     abstime=0x7fffffffc468) at /usr/src/lib/libthr/thread/thr_mutex.c:566
> 566                     ret = mutex_lock_common(m, abstime, 0);
> Current language:  auto; currently minimal
> (gdb) p *mutex
> $1 = 0x8000000000000001
> (gdb) p m
> $2 = <value optimized out>
> (gdb) p *m
> Cannot access memory at address 0x1300000049
> (gdb)
Try devel/gdb.  Also, you could recompile libthr with DEBUG_FLAGS="-O0 -g"
to get rid of optimizations.
Received on Sat Mar 19 2016 - 09:33:06 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:03 UTC