In message <[EMAIL PROTECTED]>, Pete Carah writes:

>mbr_taste(MBR,geom.ctl)
>panic: mutex Giant not owned at /current/usr/src/sys/vm/vm_map.c:384
>Debugger("panic")
>Stopped at      Debugger+0x54:  xchgl   %ebx,in_Debugger.0
>db> tr
>Debugger(c035289f,c03c1880,c0351bb8,d7196bd8,1) at Debugger+0x54
>panic(c0351bb8,c0351d22,c03659e4,180,0) at panic+0xab
>_mtx_assert(c0387600,1,c03659e4,180,c1306750) at _mtx_assert+0xbc
>_vm_map_lock_read(c053c000,c03659e4,85c,31eeeed,c03875a0) at _vm_map_lock_read+0x36
>vm_map_check_protection(c053c000,d7196000,d7197000,3,d7196cb0) at 
>vm_map_check_protection+0x31
>kernacc(d7196cb0,4,3,d7196cb0,d7196c94) at kernacc+0x5c
>mtx_validate(d7196cb0,c031e753,c12f5500,1,d7196cb0) at mtx_validate+0x2d
>mtx_init(d7196cb0,c034e16b,0,0,0) at mtx_init+0x48
>g_up_procbody(0,d7196d48,c034ff9a,354,0) at g_up_procbody+0x45
>fork_exit(c01cb900,0,d7196d48) at fork_exit+0xa5
>fork_trampoline() at fork_trampoline+0x1a
>--- trap 0x1, eip = 0, esp = 0xd7196d7c, ebp = 0 ---

I have no idea what the bug is here, the relevant code is:

        static void
        g_up_procbody(void)
        {
                struct proc *p = g_up_proc;
                struct thread *tp = FIRST_THREAD_IN_PROC(p);
                struct mtx mymutex;
         
                bzero(&mymutex, sizeof mymutex);
                mtx_init(&mymutex, "g_up", MTX_DEF, 0);
                mtx_lock(&mymutex);

It looks like mtx_init() cannot be called without holding Giant
which is clearly a bug.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to