Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Mar 2016 08:06:17 +0200
From:      "Oleg V. Nauman" <oleg@opentransfer.com>
To:        Konstantin Belousov <kostikbel@gmail.com>
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)
Message-ID:  <1850738.9W54HNFmp1@asus.theweb.org.ua>
In-Reply-To: <20160321112258.GM1741@kib.kiev.ua>
References:  <5093647.qxI0C33PyG@asus.theweb.org.ua> <1541955.eeyoXZYkvP@asus.theweb.org.ua> <20160321112258.GM1741@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 21 March 2016 13:22:58 you wrote:
> On Mon, Mar 21, 2016 at 12:15:15PM +0200, Oleg V. Nauman wrote:
[skip]
> 
> In other words, there is no virtualization involved.
> 
> I think that the problem at hands is not related to clang update. You
> recently rebuilt kde libs, which probably triggered detection of the new
> feature, process-shared locks in our libthr.  Before that, older HEAD
> does not exposed p/shared as implemented option.  Somehow the implementation
> and KDE expectations do not match, and asserts in libthr catch that.
> 
> Anyway, please apply the debugging patch I posted in the previous mail.


 After applying the patch:

Mar 22 07:34:37 asus kernel: pid 1928 creating existing key 1
Mar 22 07:34:58 asus kernel: pid 1928 (akonadi_baloo_index), uid 1001: exited 
on signal 6 (core dumped)

> /usr/local/bin/gdb /usr/local/bin/akonadi_baloo_indexer 
akonadi_baloo_index.core
GNU gdb (GDB) 7.11 [GDB v7.11 for FreeBSD]
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-portbld-freebsd11.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/bin/akonadi_baloo_indexer...(no debugging 
symbols found)...done.

warning: core file may not match specified executable file.                                    
[New LWP 100294]                                                                               
Core was generated by `akonadi_baloo_index'.                                                   
Program terminated with signal SIGABRT, Aborted.                                               
#0  0x0000000805617d6a in thr_kill () from /lib/libc.so.7
(gdb) bt
#0  0x0000000805617d6a in thr_kill () from /lib/libc.so.7
#1  0x0000000805617d3b in __raise (s=6) at /usr/src/lib/libc/gen/raise.c:52
#2  0x0000000805617ca9 in abort () at /usr/src/lib/libc/stdlib/abort.c:65
#3  0x000000080533d484 in _thread_exit (
    fname=0x80533eb66 "/usr/src/lib/libthr/thread/thr_mutex.c", lineno=150,
    msg=0x7fffffffd300 "mutex 0x80064d000 own 0x187c6 0x187c6 is on list 0x0 
0x80933ca80")
    at /usr/src/lib/libthr/thread/thr_exit.c:182
#4  0x0000000805333e76 in mutex_assert_not_owned (m=0x80064d000)
    at /usr/src/lib/libthr/thread/thr_mutex.c:150
#5  0x0000000805334049 in enqueue_mutex (curthread=0x80e015000, m=0x80064d000)
    at /usr/src/lib/libthr/thread/thr_mutex.c:395
#6  0x00000008053342a3 in mutex_lock_common (m=0x80064d000, 
abstime=0x7fffffffd448,
    cvattach=0) at /usr/src/lib/libthr/thread/thr_mutex.c:545
#7  0x00000008053336fe in __pthread_mutex_timedlock (mutex=0x811c00008,
    abstime=0x7fffffffd448) at /usr/src/lib/libthr/thread/thr_mutex.c:578
#8  0x000000080443c4b0 in pthreadTimedLock::lock (this=0x80e164910)
    at 
/usr/ports/x11/kdelibs4/work/kdelibs-4.14.3/kdecore/util/kshareddatacache_p.h:252
#9  0x000000080443c8a8 in KSharedDataCache::Private::CacheLocker::cautiousLock 
(
    this=0x7fffffffd5e0)
....
(gdb) f 5
#5  0x0000000805334049 in enqueue_mutex (curthread=0x80e015000, m=0x80064d000)
    at /usr/src/lib/libthr/thread/thr_mutex.c:395
395             mutex_assert_not_owned(m);
(gdb) p *curthread
$1 = {tid = 100294, lock = {m_owner = 0, m_flags = 0, m_ceilings = {0, 0}, 
m_spare = {0, 0,
      0, 0}}, cycle = 0, locklevel = 0, critical_count = 0, sigblock = 0, tle 
= {
    tqe_next = 0x0, tqe_prev = 0x805544e90 <_thread_list>}, gcle = {tqe_next = 
0x0,
    tqe_prev = 0x0}, hle = {le_next = 0x0, le_prev = 0x80554f240}, wle = 
{tqe_next = 0x0,
    tqe_prev = 0x0}, refcount = 0, start_routine = 0x0, arg = 0x0, attr = 
{sched_policy = 2,
    sched_inherit = 4, prio = 0, suspend = 0, flags = 258, stackaddr_attr = 
0x7ffffdfff000,
    stacksize_attr = 33554432, guardsize_attr = 4096, cpuset = 0x0, cpusetsize 
= 0},
  cancel_enable = 1, cancel_pending = 0, cancel_point = 0, no_cancel = 0, 
cancel_async = 0,
  cancelling = 0, sigmask = {__bits = {0, 0, 0, 0}}, unblock_sigcancel = 0,
  in_sigsuspend = 0, deferred_siginfo = {si_signo = 0, si_errno = 0, si_code = 
0, si_pid = 0,
    si_uid = 0, si_status = 0, si_addr = 0x0, si_value = {sival_int = 0, 
sival_ptr = 0x0,
      sigval_int = 0, sigval_ptr = 0x0}, _reason = {_fault = {_trapno = 0}, 
_timer = {
        _timerid = 0, _overrun = 0}, _mesgq = {_mqd = 0}, _poll = {_band = 0}, 
__spare__ = {
        __spare1__ = 0, __spare2__ = {0, 0, 0, 0, 0, 0, 0}}}}, 
deferred_sigmask = {__bits = {
      0, 0, 0, 0}}, deferred_sigact = {__sigaction_u = {__sa_handler = 0x0,
      __sa_sigaction = 0x0}, sa_flags = 0, sa_mask = {__bits = {0, 0, 0, 0}}},
  deferred_run = 0, force_exit = 0, state = PS_RUNNING, error = 0, joiner = 
0x0, flags = 0,
  tlflags = 2, mq = {{tqh_first = 0x0, tqh_last = 0x80e0151a0}, {tqh_first = 
0x0,
      tqh_last = 0x80e0151b0}, {tqh_first = 0x0, tqh_last = 0x80e0151c0}, 
{tqh_first = 0x0,
      tqh_last = 0x80e0151d0}}, ret = 0x0, specific = 0x80064c000, 
specific_data_count = 4,
  rdlock_count = 0, rtld_bits = 0, tcb = 0x8006fd158, cleanup = 0x0, ex = {
    exception_class = 0, exception_cleanup = 0x0, private_1 = 0, private_2 = 
0},
  unwind_stackend = 0x7ffffffff000, unwind_disabled = 0, magic = 3499860245,
  report_events = 0, event_mask = 0, event_buf = {event = TD_EVENT_NONE, th_p 
= 0, data = 0},
  wchan = 0x0, mutex_obj = 0x0, will_sleep = 0, nwaiter_defer = 0, 
defer_waiters = {
    0x0 <repeats 50 times>}, wake_addr = 0x80554ef48, sleepqueue = 
0x80e014040}
(gdb) f 7
#7  0x00000008053336fe in __pthread_mutex_timedlock (mutex=0x811c00008,
    abstime=0x7fffffffd448) at /usr/src/lib/libthr/thread/thr_mutex.c:578
578                     ret = mutex_lock_common(m, abstime, 0);
(gdb) p *mutex
$2 = (pthread_mutex_t) 0x8000000000000001
(gdb) p m
$3 = (struct pthread_mutex *) 0x80064d000
(gdb) p *m
$4 = {m_lock = {m_owner = -2147383354, m_flags = 1, m_ceilings = {0, 0}, 
m_spare = {0, 0, 0,
      0}}, m_flags = 1, m_owner = 100294, 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}}

 Thank you





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1850738.9W54HNFmp1>