Date: Fri, 17 Jul 2015 13:44:28 +0200
   From: m...@netbsd.org (Emmanuel Dreyfus)

   I tried LOCKDEBUG to get some hints, and now I get a nice 
   panic (see below).

   gdb suggests this happens in LOCKDEBUG_BARRIER(NULL, 0) in 
   mi_userret().

   Anyone knowledgable can tell me what is it so that I get some ideas
   of what needs to be fixed? I have the feeling this detects I leave
   the kernel while a lock was not released, is that the problem?

Correct.  The part you want to look at is:

   Reader / writer lock error: lockdebug_barrier: sleep lock held

   lock address : 0x00000000c2965dc0 type     :     sleep/adaptive
   initialized  : 0x00000000c0400b1b
   shared holds :                  0 exclusive:                  1
   shares wanted:                  0 exclusive:                  0
   current cpu  :                  0 last held:                  0
   current lwp  : 0x00000000c2a1bd20 last held: 0x00000000c2a1bd20
   last locked* : 0x00000000c018b217 unlocked : 0x00000000c018b2dd
                  ^^^^^^^^^^^^^^^^^^
   owner/count  : 0x00000000c2a1bd20 flags    : 0x0000000000000004

`Last locked' tells you the return address of the call to rw_enter
that last acquired the lock.  (The other addresses may be useful for
other lockdebug panics but aren't likely to be of much use here.)

Reply via email to