Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 Feb 2004 09:26:34 +0100
From:      Poul-Henning Kamp <phk@phk.freebsd.dk>
To:        current@freebsd.org
Subject:   why do I have to grab Giant before call to kthread_exit() ?
Message-ID:  <28193.1075883194@critter.freebsd.dk>

next in thread | raw e-mail | index | archive | help

It seems somewhat bogus to me that I can create and run a kthread
without Giant but I need to grab Giant before it exits...

panic: mutex Giant not owned at ../../../kern/kern_exit.c:123
at line 719 in file ../../../kern/kern_mutex.c
cpuid = 0; 
Debugger("panic")
Stopped at      0xc06a7cf5 = Debugger+0x55:     xchgl   %ebx,0xc07bab24 = in_Debugger.0
db> trace
Debugger(c0712b15,0,2cf,c0711f91,100) at 0xc06a7cf5 = Debugger+0x55
__panic(c0711f91,2cf,c07120f9,c0712234,c0710532) at 0xc0532782 = __panic+0x172
_mtx_assert(c076b460,1,c0710532,7b,c05398e3) at 0xc0528dec = _mtx_assert+0x11c
exit1(c18ebd20,0,88,87,0) at 0xc0519e43 = exit1+0x33
kthread_exit(0,0,c070d581,29e,64) at 0xc0520126 = kthread_exit+0xb6
g_bde_worker(c1a0fc80,c54b3d48,c0710609,317,c194adc0) at 0xc04f6db5 = g_bde_worker+0x4a5
fork_exit(c04f6910,c1a0fc80,c54b3d48) at 0xc051d065 = fork_exit+0xc5
fork_trampoline() at 0xc06a94bc = fork_trampoline+0x8
--- trap 0x1, eip = 0, esp = 0xc54b3d7c, ebp = 0 ---


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?28193.1075883194>