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: "Greg A. Woods" <woods%planix.com@localhost>
To: NetBSD GNATS <gnats-bugs%NetBSD.org@localhost>
Cc: Juan RP <xtraeme%gmail.com@localhost>
Subject: Re: kern/38273 panic: LOCKDEBUG, "lockdebug_barrier: spin lock held", 
from ld_ataraid_start_raid0()
Date: Thu, 18 Sep 2008 15:51:39 -0400

 --pgp-sign-Multipart_Thu_Sep_18_15:51:38_2008-1
 Content-Type: multipart/mixed;
  boundary="Multipart_Thu_Sep_18_15:51:38_2008-1"
 
 --Multipart_Thu_Sep_18_15:51:38_2008-1
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: quoted-printable
 
 At Thu, 18 Sep 2008 14:35:02 +0000 (UTC), Juan RP wrote:
 Subject: Re: kern/38273 panic: LOCKDEBUG, "lockdebug_barrier: spin lock hel=
 d", from ld_ataraid_start_raid0()
 >=20
 >  I'd like to know why you are getting this, while I don't. I've been stre=
 ssing=20
 >  this code with debugging options turned on all the time on my core2duo a=
 nd
 >  still couldn't make it crash... even after copying/removing lots of giga=
 bytes.
 > =20
 >  Could you try to modify the following in cbufpool_ctor():ld_ataraid.c:
 > =20
 >          /* We release/reacquire the spinlock before calling buf_init() */
 >          mutex_exit(&ld->sc_mutex);
 >          buf_init(&cbp->cb_buf);
 >          mutex_enter(&ld->sc_mutex);
 > =20
 >  to
 > =20
 >          /* 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);
 
 Done, with no apparent change in behaviour....  Again this was some ways
 into the "newfs /dev/rld0a"
 
 >  Just to be sure, you don't have more local changes in ld or ataraid?
 
 Only the added debug printfs in the _attach() routines as seen in the
 dmesg output below.
 
 --=20
                                                Greg A. Woods
                                                Planix, Inc.
 
 <woods%planix.com@localhost>     +1 416 489-5852 x122     
http://www.planix.com/
 
 
 --Multipart_Thu_Sep_18_15:51:38_2008-1
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: quoted-printable
 
 NetBSD 4.99.72 (GENERIC) #9: Thu Sep 18 15:13:07 EDT 2008
 ...
 wd0 at atabus1 drive 0: <IBM-DTLA-307030>
 wd0: 29314 MB, 59560 cyl, 16 head, 63 sec, 512 bytes/sect x 60036480 sectors
 rnd: wd0 attached as an entropy source (collecting)
 wd1 at atabus2 drive 0: <WDC WD2000JD-00HBB0>
 wd1: 186 GB, 387621 cyl, 16 head, 63 sec, 512 bytes/sect x 390721968 sectors
 rnd: wd1 attached as an entropy source (collecting)
 wd2 at atabus3 drive 0: <WDC WD2000JD-00HBB0>
 wd2: 186 GB, 387621 cyl, 16 head, 63 sec, 512 bytes/sect x 390721968 sectors
 rnd: wd2 attached as an entropy source (collecting)
 ...
 ataraid0: found 1 RAID volume
 ld0 at ataraid0 vendtype 1 unit 0: Adaptec ATA RAID-1 array
 ld0: ld_ataraid_attach(): ld unit 0 (ld->sc_dv =3D 0xd187064c)
 ld0: ldattach(): unit 0
 ld0: 186 GB, 24321 cyl, 255 head, 63 sec, 512 bytes/sect x 390721536 sectors
 rnd: ld0 attached as an entropy source (collecting)
 ...
 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  :                  1 last held:                  1
 current lwp  : 0x00000000d1931a60 last held: 0x00000000d1931a60
 last locked  : 0x00000000c05e0016 unlocked : 0x00000000c05dffe5
 owner field  : 0x0000000000010600 wait/spin:                0/1
 
 panic: LOCKDEBUG
 fatal breakpoint trap in supervisor mode
 trap type 1 code 0 eip c05ae43c cs 8 eflags 246 cr2 8089000 ilevel 6
 Stopped in pid 862.1 (newfs) at netbsd:breakpoint+0x4:  popl    %ebp
 db{1}> x/I 0x00000000c05e0016
 netbsd:cbufpool_ctor+0x46:      addl    $0x14,%esp
 db{1}> x/I 0x00000000c05dffe5
 netbsd:cbufpool_ctor+0x15:      movl    $0x1,0(%esp)
 db{1}> x/I 0x00000000d1931a60
 0xd1931a60:     addb    %al,0(%eax)
 db{1}> ps /l
  PID         LID S     FLAGS       STRUCT LWP *               NAME WAIT
 >862       >   1 7         4           d1931a60              newfs
  721           1 3        84           d1e1b5e0                ksh pause
  295           1 3        84           d1e1b840                ksh pause
  294           1 3        84           d1e1baa0              xterm select
  303           1 3        84           d1e1bd00               rshd select
  299           1 3        84           d1e14100              getty ttyraw
  297           1 3        84           d1e14360              getty ttyraw
  291           1 3        84           d1e145c0              getty ttyraw
  304           1 3        84           d1e14820              getty ttyraw
  296           1 3        84           d1e14a80              getty ttyraw
  280           1 3        84           d1e14ce0              getty ttyraw
  287           1 3        84           d19310e0              getty ttyraw
  293           1 3        84           d1847580              getty ttyraw
  302           1 3        84           d18477e0              getty ttyraw
  268           1 3        84           d1931340               cron nanoslp
  279           1 3        84           cc4d87a0              inetd kqueue
  237           1 3        84           d1931800               ntpd pause
  156           1 3        84           d1931cc0          mount_mfs mfsidl
  114           1 3        84           d18470c0            syslogd kqueue
  1             1 3        84           cc4d97c0               init wait
  0            45 3       204           d19315a0            physiod physiod
               44 3       204           d1847a40        vmem_rehash vmem_reh=
 ash
               43 3       204           d1847ca0           aiodoned aiodoned
               42 3       204           cc4d90a0            ioflush syncer
               41 3       204           cc4d9300           pgdaemon pgdaemon
               40 3       204           cc4d9560          cryptoret crypto_w=
 ait
               39 3       204           cc4d8a00          atapibus0 sccomp
               38 3       204           cc4d8c60               usb2 usbevt
               37 3       204           cc4d5060               usb1 usbevt
               36 3       204           cc4d82e0         usbtask-dr usbtsk
               35 3       204           cc4d8080         usbtask-hc usbtsk
               34 3       204           cc4d9c80               usb0 usbevt
               33 3       204           cc4d9a20            acpitz0 acpitz0
               24 3       204           cc4d52c0               iic0 iicintr
               23 3       204           cc4d5520            atabus3 atath
               22 3       204           cc4d5780            atabus2 atath
               21 3       204           cc4d59e0            atabus1 atath
               20 3       204           cc4d5c40            atabus0 atath
               19 3       204           cc4d2040               pms0 pmsreset
               18 3       204           cc4d22a0               apm1 apmev
               17 3       204           cc4d2500            xcall/1 xcall
               16 1       204           cc4d2760          softser/1
               15 1       204           cc4d29c0          softclk/1
               14 1       204           cc4d2c20          softbio/1
               13 1       204           cc4ca020          softnet/1
               12 1       205           cc4ca280             idle/1
               11 3       204           cc4ca4e0             sysmon smtaskq
               10 3       204           cc4ca740           pmfevent pmfevent
                9 3       204           cc4ca9a0            cachegc cachegc
                8 3       204           cc4cac00              vrele vrele
                7 3       204           cc4c7000            xcall/0 xcall
                6 1       204           cc4c7260          softser/0
                5 1       204           cc4c74c0          softclk/0
                4 1       204           cc4c7720          softbio/0
                3 1       204           cc4c7980          softnet/0
                2 7       205           cc4c7be0             idle/0
                1 3       204           c0b349e0            swapper schedule
 db{1}> trace
 breakpoint(c0b09c77,d1959538,c3246800,c04e51cf,6,1,0,0,d1959538,8) at netbs=
 d:breakpoint+0x4
 panic(c0aaba3c,c0aa7233,c0887090,c0aaba55,95cc,1000001,6,0,0,c0bd71b4) at n=
 etbsd:panic+0x1b8
 lockdebug_abort1(c0aaba55,1,0,0,c0bf4080,c0bf408c,d195959c,c08488b6,c0bf408=
 0,c0bd4a54) at netbsd:lockdebug_abort1+0xbb
 mutex_vector_enter(c0bd71b4,c04e3a2c,0,c0bd70c0,c0bd70c0,20,d195964c,c04e38=
 dc,c0bd70c0,0) at netbsd:mutex_vector_enter+0x437
 pool_cache_invalidate(c0bd70c0,0,d195964c,c04dea35,55,bd1928,c0bd4a54,0,c04=
 d776f,d1931a60) at netbsd:pool_cache_invalidate+0x20
 pool_reclaim(c0bd70c0,c04d776f,0,0,c0bd719c,c0bd1928,d195969c,c04d7798,c0bd=
 719c,c0bd70c0) at netbsd:pool_reclaim+0x4c
 pool_reclaim_callback(c0bd719c,c0bd70c0,0,c04b2672,c0bd188e,34,0,0,c90a8260=
 ,c0bd1880) at netbsd:pool_reclaim_callback+0x25
 callback_run_roundrobin(c0bd1928,0,20000,d19596f8,0,ffffffff,ffffffff,20000=
 ,e01727,2) at netbsd:callback_run_roundrobin+0x48
 uvm_map_prepare(c0bd1880,c31d9000,20000,0,ffffffff,ffffffff,20000,e01727,d1=
 959730,c0bd19c4) at netbsd:uvm_map_prepare+0x19b
 uvm_map(c0bd1880,d1959794,20000,0,ffffffff,ffffffff,20000,e01727,c0bd19c6,c=
 04e0e5c) at netbsd:uvm_map+0xbd
 km_vacache_alloc(c0bd1950,2,d19597cc,c08488b6,2,cc4cc074,d19597dc,c3246918,=
 0,c0bd19c4) at netbsd:km_vacache_alloc+0x64
 pool_grow(c0bd19c4,cc4cc074,d195980c,c08488b6,d1831d80,c0bd19c4,6,c3246918,=
 cc4cc074,0) at netbsd:pool_grow+0x2b
 pool_get(c0bd1950,2,6,cc4cc074,0,cc4cc000,cc4cc074,c04b2672,cc4cc076,c04e0e=
 5c) at netbsd:pool_get+0x5b
 uvm_km_alloc_poolpage_cache(c0bd1880,0,d195988c,c08488b6,2,cc4cc0f4,d19598a=
 c,c3246918,cc4cc0f4,cc4cc074) at netbsd:uvm_km_alloc_poolpage_cache+0x4c
 pool_grow(cc4cc074,d1931a60,6,cc4cc0f4,0,cc4cc074,cc4cc0f4,c04b2672,cc4cc0f=
 6,c04e1ab3) at netbsd:pool_grow+0x2b
 pool_get(cc4cc000,2,0,0,1,c31e8b6c,d195995c,d195994c,6,cc4daf00) at netbsd:=
 pool_get+0x5b
 pool_cache_get_slow(0,2,d1950010,0,1,0,6,c084a9b9,0,0) at netbsd:pool_cache=
 _get_slow+0x1ed
 pool_cache_get_paddr(cc4cc000,2,0,0,9c9f000,0,0,0,0,0) at netbsd:pool_cache=
 _get_paddr+0x180
 ld_ataraid_make_cbuf(9c9f000,0,cc504000,0,0,efe009c9,d1870744,c32d4f64,d187=
 06ae,0) at netbsd:ld_ataraid_make_cbuf+0x38
 ld_ataraid_start_raid0(d187064c,c31e8b6c,d1959a4c,10000,c32dca00,d18706ac,d=
 1870650,0,c31e8b6c,d187064c) at netbsd:ld_ataraid_start_raid0+0x1be
 ldstart(6,c31e8b6c,0,0,c04b51db,101,0,d1870d68,0,c32dca00) at netbsd:ldstar=
 t+0x62
 ldstrategy(c31e8b6c,10000,10000,1,0,d1870d54,d1870d68,d1870d6c,bbbdd000,d19=
 31a60) at netbsd:ldstrategy+0x165
 physio(c01f4b50,0,4500,0,c01f3950,d1959c5c,d1959b4c,c04d8160,4500,d1959c5c)=
  at netbsd:physio+0x251
 ldwrite(4500,d1959c5c,10,8,d1b0a720,d1959c5c,6,d1931a60,d1959be4,d1b0a680) =
 at netbsd:ldwrite+0x35
 cdev_write(4500,d1959c5c,10,2,d1b0a720,d180c000,d1959b8c,c0524927,d1b0a720,=
 1) at netbsd:cdev_write+0x70
 spec_write(d1959be4,40000,c0888840,d1b0a680,2,20002,d1959bfc,c052fd68,c0888=
 340,d1b0a680) at netbsd:spec_write+0xa0
 VOP_WRITE(d1b0a680,d1959c5c,10,cc4c69c0,0,10,0,16,40000,bbbbd000) at netbsd=
 :VOP_WRITE+0x6c
 vn_write(d1e11a80,d1959cc4,d1959c5c,cc4c69c0,0,80ac000,d1959c8c,c053804c,d1=
 959c6c,d1e11b80) at netbsd:vn_write+0xb1
 dofilewrite(4,d1e11a80,bbbbd000,40000,d1959cc4,0,d1959d28,c04de142,0,d1e11b=
 80) at netbsd:dofilewrite+0x75
 sys_pwrite(d1931a60,d1959d00,d1959d28,d1959d40,c059cd2f,d1841ae0,2,4,bbbbd0=
 00,40000) at netbsd:sys_pwrite+0xc7
 syscall(d1959d48,b3,ab,1f,1f,0,9c9eee0,bfbfc8b8,0,0) at netbsd:syscall+0xab
 db{1}>=20
 
 
 --Multipart_Thu_Sep_18_15:51:38_2008-1--
 
 --pgp-sign-Multipart_Thu_Sep_18_15:51:38_2008-1
 Content-Type: application/pgp-signature
 Content-Transfer-Encoding: 7bit
 
 -----BEGIN PGP SIGNATURE-----
 Version: PGPfreeware 5.0i for non-commercial use
 MessageID: i/fTtNMbSgsd/mThbr4qlYT6+HYK9CGh
 
 iQA/AwUBSNKxSmZ9cbd4v/R/EQIRJgCgvZMbWk/aAhKMcwkhUvDf7bqDHtwAoLpA
 C7kawFNUwo9nIVB/YkVz+Jsb
 =6EQ+
 -----END PGP SIGNATURE-----
 
 --pgp-sign-Multipart_Thu_Sep_18_15:51:38_2008-1--
 


Home | Main Index | Thread Index | Old Index