From owner-freebsd-current@freebsd.org Sat Mar 19 14:03:16 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD25EAD6859 for ; Sat, 19 Mar 2016 14:03:16 +0000 (UTC) (envelope-from oleg@opentransfer.com) Received: from oleg.opentransfer.com (oleg.opentransfer.com [91.217.144.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "oleg-10.opentransfer.com", Issuer "oleg-10.opentransfer.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C9941A0C for ; Sat, 19 Mar 2016 14:03:15 +0000 (UTC) (envelope-from oleg@opentransfer.com) Received: from asus.theweb.org.ua ([10.0.8.4]) by oleg.opentransfer.com (8.15.2/8.15.2) with ESMTPS id u2JE6dke008472 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 19 Mar 2016 16:06:42 +0200 (EET) (envelope-from oleg@opentransfer.com) Received: from asus.theweb.org.ua (localhost [127.0.0.1]) by asus.theweb.org.ua (8.15.2/8.15.2) with ESMTPS id u2JE37Z6034132 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 19 Mar 2016 16:03:07 +0200 (EET) (envelope-from oleg@opentransfer.com) Received: (from oleg@localhost) by asus.theweb.org.ua (8.15.2/8.15.2/Submit) id u2JE364W034131; Sat, 19 Mar 2016 16:03:06 +0200 (EET) (envelope-from oleg@opentransfer.com) X-Authentication-Warning: asus.theweb.org.ua: oleg set sender to oleg@opentransfer.com using -f From: "Oleg V. Nauman" To: Konstantin Belousov Cc: freebsd-current@freebsd.org Subject: Re: Fatal error 'mutex is on list' at line 139 in file /usr/src/lib/libthr/thread/thr_mutex.c (errno = 35) Date: Sat, 19 Mar 2016 16:03:06 +0200 Message-ID: <5286161.5Mbx8epR8j@asus.theweb.org.ua> Organization: Ecommerce LLC User-Agent: KMail/4.14.3 (FreeBSD/11.0-CURRENT; KDE/4.14.3; amd64; ; ) In-Reply-To: <20160319103256.GD1741@kib.kiev.ua> References: <5093647.qxI0C33PyG@asus.theweb.org.ua> <45576337.8zmzmA87YE@asus.theweb.org.ua> <20160319103256.GD1741@kib.kiev.ua> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.21 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: Sat, 19 Mar 2016 14:03:16 -0000 On Saturday 19 March 2016 12:32:56 Konstantin Belousov wrote: > 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/)] > > > > (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=, > > > > > > > > lineno=, msg=) > > > > at /usr/src/lib/libthr/thread/thr_exit.c:182 > > > > > > > > #4 0x0000000803ed56fc in mutex_lock_common (m=, > > > > > > > > abstime=, cvattach=) > > > > 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/)] > > (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 = > > (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. Core was generated by `akonadi_baloo_index'. Program terminated with signal SIGABRT, Aborted. #0 0x0000000805630d6a in thr_kill () from /lib/libc.so.7 (gdb) bt #0 0x0000000805630d6a in thr_kill () from /lib/libc.so.7 #1 0x0000000805630d3b in __raise (s=6) at /usr/src/lib/libc/gen/raise.c:52 #2 0x0000000805630ca9 in abort () at /usr/src/lib/libc/stdlib/abort.c:65 #3 0x00000008053564b4 in _thread_exit ( fname=0x805357b70 "/usr/src/lib/libthr/thread/thr_mutex.c", lineno=139, msg=0x805357b97 "mutex is on list") at /usr/src/lib/libthr/thread/thr_exit.c:182 #4 0x000000080534cddc in mutex_assert_not_owned (m=0x80064d000) at /usr/src/lib/libthr/thread/thr_mutex.c:139 #5 0x000000080534cfb9 in enqueue_mutex (curthread=0x80e015000, m=0x80064d000) at /usr/src/lib/libthr/thread/thr_mutex.c:383 #6 0x000000080534d213 in mutex_lock_common (m=0x80064d000, abstime=0x7fffffffd4e8, cvattach=0) at /usr/src/lib/libthr/thread/thr_mutex.c:533 #7 0x000000080534c6be in __pthread_mutex_timedlock (mutex=0x811c00008, abstime=0x7fffffffd4e8) at /usr/src/lib/libthr/thread/thr_mutex.c:566 (gdb) f 7 #7 0x000000080534c6be in __pthread_mutex_timedlock (mutex=0x811c00008, abstime=0x7fffffffd4e8) at /usr/src/lib/libthr/thread/thr_mutex.c:566 566 ret = mutex_lock_common(m, abstime, 0); (gdb) p *mutex $1 = (pthread_mutex_t) 0x8000000000000001 (gdb) p m $2 = (struct pthread_mutex *) 0x80064d000 (gdb) p *m $3 = {m_lock = {m_owner = -2147383372, m_flags = 1, m_ceilings = {0, 0}, m_spare = {0, 0, 0, 0}}, m_flags = 1, m_owner = 100276, m_count = 0, m_spinloops = 0, m_yieldloops = 0, m_qe = {tqe_next = 0x0, tqe_prev = 0x0}, m_pqe = {tqe_next = 0x0, tqe_prev = 0x0}} (gdb) p *curthread No symbol "curthread" in current context. (gdb)