NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/38273 panic: LOCKDEBUG, "lockdebug_barrier: spin lock held", from ld_ataraid_start_raid0()



The following reply was made to PR kern/38273; it has been noted by GNATS.

From: Juan RP <xtraeme%gmail.com@localhost>
To: NetBSD GNATS <gnats-bugs%NetBSD.org@localhost>
Cc: 
Subject: Re: kern/38273 panic: LOCKDEBUG,
 "lockdebug_barrier: spin lock held", from ld_ataraid_start_raid0()
Date: Thu, 18 Sep 2008 16:32:57 +0200

 On Wed, 17 Sep 2008 16:15:13 -0400
 "Greg A. Woods" <woods%planix.com@localhost> wrote:
 
 > At Wed, 17 Sep 2008 19:25:02 +0000 (UTC), Juan Romero Pardines wrote:
 > Subject: Re: kern/38273 panic: LOCKDEBUG, "lockdebug_barrier: spin lock 
 > held", from ld_ataraid_start_raid0()
 > > 
 > >  Do you have any local changes in ld.c? I'd like to know why the mutex 
 > > hasn't
 > >  been acquired in ldstart().
 > 
 > OK, after reverting Juergen's changes to ld.c and back to having just
 > your changes to ld_ataraid.c, I'm back to booting but then getting a
 > panic (the same one?) while running "newfs /dev/rld0a":
 > 
 > Mutex error: lockdebug_barrier: spin lock held
 > 
 > lock address : 0x00000000d18706ac type     :               spin
 > initialized  : 0x00000000c01f46d9
 > shared holds :                  0 exclusive:                  1
 > shares wanted:                  0 exclusive:                  0
 > current cpu  :                  0 last held:                  0
 > current lwp  : 0x00000000d1f00d20 last held: 0x00000000d1f00d20
 > last locked  : 0x00000000c05dff28 unlocked : 0x00000000c05dff15
 > owner field  : 0x0000000000010600 wait/spin:                0/1
 
 I'd like to know why you are getting this, while I don't. I've been stressing 
 this code with debugging options turned on all the time on my core2duo and
 still couldn't make it crash... even after copying/removing lots of gigabytes.
 
 Could you try to modify the following in cbufpool_ctor():ld_ataraid.c:
 
         /* We release/reacquire the spinlock before calling buf_init() */
         mutex_exit(&ld->sc_mutex);
         buf_init(&cbp->cb_buf);
         mutex_enter(&ld->sc_mutex);
 
 to
 
         /* We release/reacquire the spinlock before calling buf_init() */
         mutex_exit(&ld->sc_mutex);
        KERNEL_LOCK(1, NULL);
         buf_init(&cbp->cb_buf);
        KERNEL_UNLOCK_ONE(NULL);
         mutex_enter(&ld->sc_mutex);
 
 Just to be sure, you don't have more local changes in ld or ataraid?
 


Home | Main Index | Thread Index | Old Index