NetBSD-Bugs archive

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

kern/38730: recursive lock in scheduler



>Number:         38730
>Category:       kern
>Synopsis:       recursive lock in scheduler
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 22 19:55:00 +0000 2008
>Originator:     Martin Husemann
>Release:        NetBSD 4.99.63
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD sunny-weather.duskware.de 4.99.63 NetBSD 4.99.63 (SUNNY.MP) #48: 
Thu May 22 17:50:52 CEST 2008 
martin%sunny-weather.duskware.de@localhost:/usr/src/sys/arch/sparc64/compile/SUNNY.MP
 sparc64
Architecture: sparc64
Machine: sparc64
>Description:

Mutex error: lockdebug_wantlock: locking against myself
                                                       
lock address : 0x000000000d047e80 type     :               spin
shared holds :                  0 exclusive:                  1
shares wanted:                  0 exclusive:                  1
current cpu  :                  1 last held:                  1
current lwp  : 0x000000000f89a120 last held: 0x000000000f89a120
last locked  : 0x0000000001160bf8 unlocked : 0x0000000001160610
initialized  : 0x000000000114d744                              
owner field  : 0x00ff0a0000000000 wait/spin:                0/1
                                                               
panic: LOCKDEBUG
Stopped in pid 1022.1 (cc1) at  netbsd:cpu_Debugger+0x4:        nop
db{1}> bt                                                          
lockdebug_abort1(d803900, a, 127c598, 12c2480, 1, 20) at netbsd:lockdebug_abort1
+0x7c                                                                          
mutex_vector_enter(d047e80, 1a, d047d80, 12c1a18, de98000, 1814000) at netbsd:mu
tex_vector_enter+0x230                                                         
sched_nextlwp(d812040, 1, 127c400, f89a120, de98000, f89a170) at netbsd:sched_ne
xtlwp+0x288                                                                    
mi_switch(f89a120, 12c3d70, 14f, 12c1c48, deb40c8, ffffffffffffffff) at netbsd:m
i_switch+0x40c                                                                 
preempt(f89a120, 17e798, 31dedb1234, 8000000000000000, 31dedb1234, 4ce800) at ne
tbsd:preempt+0xa0                                                              
trap(f795ed0, fffffffffffffffe, 17e798, 44820092, 121a9a0, ffffffffffff9d68) at 
n
etbsd:trap+0x8b4
?(1, 80, 40c12600, c, 20, 5fdf30) at 0x10090b8
db{1}> mach cpu 0                             
db{0}> bt        
mi_switch(f9cac80, 12c3d70, 14f, 12c1c48, 1455980, 42c54a10) at netbsd:mi_switch
+0x308                                                                         
preempt(f9cac80, 3d566c, fffffffffffffff8, 0, 42c54a10, 0) at netbsd:preempt+0xa
0                                                                              
trap(f7bfed0, fffffffffffffffe, 3d566c, 820092, 121aa00, 0) at netbsd:trap+0x8b4
                                                                               
?(42c00980, 42b93800, 18, 0, 30, 2) at 0x10090b8
db{0}> x/i 0x000000000114d744                   
netbsd:mutex_obj_alloc+0x24:    call            netbsd:mutex_init
db{0}> x/i 0x0000000001160bf8                                    
netbsd:mi_switch+0x758: call            netbsd:mutex_vector_enter
db{0}> x/i 0x0000000001160610                                    
netbsd:mi_switch+0x170: call            netbsd:mutex_vector_exit
0x114d744 is in mutex_obj_alloc (../../../../kern/kern_mutex.c:970).
965     mutex_obj_alloc(kmutex_type_t type, int ipl)
966     {
967             struct kmutexobj *mo;
968     
969             mo = pool_cache_get(mutex_obj_cache, PR_WAITOK);
970             mutex_init(&mo->mo_lock, type, ipl);
971             mo->mo_refcnt = 1;
972     
973             return (kmutex_t *)mo;
974     }
0x1160bf8 is in mi_switch (../../../../sys/lwp.h:407).
402             KASSERT(ci1 != ci2);
403             if (ci1 < ci2) {
404                     mutex_spin_enter(spc1->spc_mutex);
405                     mutex_spin_enter(spc2->spc_mutex);
406             } else {
407                     mutex_spin_enter(spc2->spc_mutex);
408                     mutex_spin_enter(spc1->spc_mutex);
409             }
410     }
0x1160610 is in mi_switch (../../../../sys/lwp.h:344).
339      * Unlock an LWP. XXXLKM
340      */
341     static inline void
342     lwp_unlock(lwp_t *l)
343     {
344             mutex_spin_exit(l->l_mutex);
345     }
346     
347     static inline void
348     lwp_changepri(lwp_t *l, pri_t pri)


>How-To-Repeat:

No idea - I did a "make -j 4" in a kernel compile directory over NFS
(expecting another bug to show up)

>Fix:
n/a



Home | Main Index | Thread Index | Old Index