Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Sep 2002 14:08:20 +0200 (CEST)
From:      Dan Lukes <dan@obluda.cz>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/42770: MUTEX_DEBUG broke CURRENT kernel
Message-ID:  <200209141208.g8EC8KA6000443@xkulesh.vol.cz>

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

>Number:         42770
>Category:       kern
>Synopsis:       MUTEX_DEBUG broke CURRENT kernel
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 14 05:10:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Dan Lukes
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
sys/kern/syscalls.master,v 1.121 2002/08/19 20:01:31
sys/kern/kern_prot.c,v 1.164 2002/08/01 17:47:55
sys/kern/kern_proc.c,v 1.147 2002/09/11 08:13:53
sys/kern/kern_mutex.c,v 1.107 2002/09/11 08:13:53
sys/vm/vm_glue.c,v 1.155 2002/09/11 08:13:55
sys/vm/vm_map.c,v 1.266 2002/08/24 17:52:08

>Description:
	MUTEX_DEBUG cause "mutex Giant not owned at vm_map.c:383" (it's
triggered during mounting root). The content of stack:
setsid->enterpgrp->mtx_init->
->mtx_validate->kernacc->vm_map_check_protection->_vm_map_lock_read->_mtx_assert

syscall setsid is marked as MPS_SAFE, so it doesn't obtain Giant lock, but
_vm_map_lock_read required it.

>How-To-Repeat:
	Compile kernel with MUTEX_DEBUG
>Fix:

	workaround - doesn't compile kernel with MUTEX_DEBUG

	I can't supply the fix, but see the note in mtx_validate
(kern_mutex.c) - it seems to be valid not only on alphas.

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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