From owner-freebsd-bugs Tue Oct 15 09:20:04 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA17063 for bugs-outgoing; Tue, 15 Oct 1996 09:20:04 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA17033; Tue, 15 Oct 1996 09:20:02 -0700 (PDT) Resent-Date: Tue, 15 Oct 1996 09:20:02 -0700 (PDT) Resent-Message-Id: <199610151620.JAA17033@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, Tor.Egge@idt.ntnu.no Received: from pat.idt.unit.no (pat.idt.unit.no [129.241.103.5]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id JAA16965 for ; Tue, 15 Oct 1996 09:19:39 -0700 (PDT) Received: from ikke.idt.unit.no (ikke.idt.unit.no [129.241.111.65]) by pat.idt.unit.no (8.7.5/8.7.3) with ESMTP id SAA06078 for ; Tue, 15 Oct 1996 18:19:16 +0200 (MET DST) Received: (from tegge@localhost) by ikke.idt.unit.no (8.7.6/8.7.3) id SAA25686; Tue, 15 Oct 1996 18:19:15 +0200 (MET DST) Message-Id: <199610151619.SAA25686@ikke.idt.unit.no> Date: Tue, 15 Oct 1996 18:19:15 +0200 (MET DST) From: Tor Egge Reply-To: Tor.Egge@idt.ntnu.no To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/1812: vnodes are left in a locked state Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 1812 >Category: kern >Synopsis: vnodes are left in a locked state >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 15 09:20:01 PDT 1996 >Last-Modified: >Originator: Tor Egge >Organization: Norwegian University of Science and Technology, Trondheim, Norway >Release: FreeBSD 2.2-CURRENT i386 >Environment: FreeBSD ikke.idt.unit.no 2.2-CURRENT FreeBSD 2.2-CURRENT #3: Mon Oct 14 02:10:57 MET DST 1996 root@ikke.idt.unit.no:/usr/src/sys/compile/TEGGE i386 >Description: Writing to memory regions corresponding to a few hundred mmapped files and using msync() to flush the file system may cause the process to hang. The process is unkillable, in diskwait. ps xl outout shows UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND 26850 24861 24860 45 -18 19 612 38132 vmiorl DN ?? 2:02.79 bin/domainhelp One of the vnodes for the mmapped files is left in a locked state, i.e. lstat() hangs :-( UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND 26850 25492 25098 145 -14 0 204 592 uihget D+ p9 0:00.03 ls -F -ld h.de (ls@386freebsd) As a side effect of this, the vnode for the directory in which the file resides (/export/akg2/ftpsearch/datasets/datasets/dataset2/domain) becomes locked. :-( >How-To-Repeat: open and mmap 250 files, each 1.2 MB in size. Write to the first 32 KB on each of the 250 mmapped memory regions, then use msync() with the MS_ASYNC flag and fsync() for each of the 250 mmapped memory regions. Continue with the next 32 KB, until all of the mmapped regions have been written to disk. >Fix: Temporary workaround: reboot the system whenever this occurs. >Audit-Trail: >Unformatted: