NetBSD Problem Report #38137

From mark@mcs.vuw.ac.nz  Sun Mar  2 10:41:09 2008
Return-Path: <mark@mcs.vuw.ac.nz>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id C5F0D63B90D
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  2 Mar 2008 10:41:08 +0000 (UTC)
Message-Id: <200803021011.m22ABQL8024049@turakirae.mcs.vuw.ac.nz>
Date: Sun, 2 Mar 2008 23:11:26 +1300 (NZDT)
From: mark@mcs.vuw.ac.nz
Reply-To: mark@mcs.vuw.ac.nz
To: gnats-bugs@gnats.NetBSD.org
Subject: uvm_fault in filt_sordetach
X-Send-Pr-Version: 3.95

>Number:         38137
>Category:       kern
>Synopsis:       uvm_fault in filt_sordetach
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    ad
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 02 10:45:00 +0000 2008
>Closed-Date:    Sat May 03 23:56:16 +0000 2008
>Last-Modified:  Sat May 03 23:56:16 +0000 2008
>Originator:     Mark Davies
>Release:        NetBSD 4.99.52
>Organization:
Dept. of Comp. Sci., Victoria Uni. of Wellington, New Zealand.
>Environment:


System: NetBSD turakirae.mcs.vuw.ac.nz 4.99.52 NetBSD 4.99.52 (MCS_WORKSTATION) #0: Tue Feb 5 14:10:36 NZDT 2008 mark@turakirae.mcs.vuw.ac.nz:/local/SAVE/build.obj/src/work/src/sys/arch/i386/compile/MCS_WORKSTATION i386
Architecture: i386
Machine: i386
>Description:
	Current system can get uvm_fault on exiting httpd process with
	backtrace:
		filt_sordetach()
		kqueue_close()
		closef()
		syscall()


>How-To-Repeat:
	Run "/etc/rc.d/apache restart" 2 or 3 to times.

>Fix:
	unknown.


>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->ad
Responsible-Changed-By: ad@NetBSD.org
Responsible-Changed-When: Fri, 07 Mar 2008 02:44:40 +0000
Responsible-Changed-Why:
take


From: Andrew Doran <ad@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/38137 CVS commit: src/sys
Date: Fri, 21 Mar 2008 21:53:35 +0000 (UTC)

 Module Name:	src
 Committed By:	ad
 Date:		Fri Mar 21 21:53:35 UTC 2008

 Modified Files:
 	src/sys/kern: kern_descrip.c kern_event.c
 	src/sys/sys: event.h eventvar.h file.h filedesc.h
 Added Files:
 	src/sys/kern: sys_descrip.c

 Log Message:
 File descriptor changes, discussed on tech-kern:

 - Redo reference counting to be sane.  LWPs accessing files take a short
   term reference on the local file descriptor.  This is the most common
   case.  While a file is in a process descriptor table, a reference is
   held to the file.  The file reference count only changes during control
   operations like open() or close().  Code that comes at files from an
   unusual direction (i.e. foreign to the process) like procfs or sysctl
   takes a reference on the file (f_count), and not on a descriptor.

 - Remove knowledge of reference counting and locking from most code that
   deals with files.

 - Make the usual case of file descriptor lookup lockless.

 - Make kqueue MP and MT safe. PR kern/38098, PR kern/38137.

 - Fix numerous file handling bugs, and bugs in the descriptor code that
   affected multithreaded processes.

 - Split descriptor system calls out into sys_descrip.c.

 - A few stylistic changes: KNF, remove unused casts now that caddr_t is
   gone. Replace dumb gotos with loop control in a few places.

 - Don't do redundant pointer passing (struct proc, lwp, filedesc *) unless
   the routine is likely to be inlined.  Most of the time it's about the
   current process.


 To generate a diff of this commit:
 cvs rdiff -r1.172 -r1.173 src/sys/kern/kern_descrip.c
 cvs rdiff -r1.48 -r1.49 src/sys/kern/kern_event.c
 cvs rdiff -r0 -r1.1 src/sys/kern/sys_descrip.c
 cvs rdiff -r1.19 -r1.20 src/sys/sys/event.h
 cvs rdiff -r1.7 -r1.8 src/sys/sys/eventvar.h
 cvs rdiff -r1.63 -r1.64 src/sys/sys/file.h
 cvs rdiff -r1.45 -r1.46 src/sys/sys/filedesc.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: ad@NetBSD.org
State-Changed-When: Tue, 29 Apr 2008 13:49:36 +0000
State-Changed-Why:
All of the code involved has been overhauled.
Do you still see the problem?


From: Mark Davies <mark@mcs.vuw.ac.nz>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/38137 (uvm_fault in filt_sordetach)
Date: Sun, 4 May 2008 09:25:54 +1200

 On Wednesday 30 April 2008 01:49:37 ad@netbsd.org wrote:
 > Do you still see the problem?

 No, the problem is now fixed.  Please close the PR.

 cheers
 mark

State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 03 May 2008 23:56:16 +0000
State-Changed-Why:
Confirmed fixed. Thanks.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.