From owner-freebsd-bugs@FreeBSD.ORG Sun Jun 21 10:47:06 2015 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB3D5A0 for ; Sun, 21 Jun 2015 10:47:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C53242D9 for ; Sun, 21 Jun 2015 10:47:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t5LAl56f073393 for ; Sun, 21 Jun 2015 10:47:05 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 201003] forcibly unmounting a filesystem with running binaries results in panic Date: Sun, 21 Jun 2015 10:47:05 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: trasz@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2015 10:47:06 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201003 Bug ID: 201003 Summary: forcibly unmounting a filesystem with running binaries results in panic Product: Base System Version: 11.0-CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: trasz@FreeBSD.org Forcible unmount of a filesystem containing a binary that's executing at that time results in a panic. Note that the binary must have called mlockall(2), otherwise it will simply segfault. Backtrace looks like this: panic: vm_page_unwire: page 0xfffff800b7b8b980's wire count is zero #10 0xffffffff80976903 in panic (fmt=0xffffffff81675540 "\004") at /usr/home/trasz/svn/head/sys/kern/kern_shutdown.c:868 #11 0xffffffff80c25838 in vm_page_unwire (m=, queue=) at /usr/home/trasz/svn/head/sys/vm/vm_page.c:2516 #12 0xffffffff80c21079 in vm_object_unwire (object=0xfffff8012f13ea00, offset=, length=, queue=) at /usr/home/trasz/svn/head/sys/vm/vm_object.c:2273 #13 0xffffffff80c180f7 in vm_map_entry_unwire (map=0xfffff8012f0f5000, entry=0xfffff8012f0cd400) at /usr/home/trasz/svn/head/sys/vm/vm_map.c:2842 #14 0xffffffff80c1628a in vm_map_delete (map=0xfffff8012f0f5000, start=, end=140737488355328) at /usr/home/trasz/svn/head/sys/vm/vm_map.c:3002 #15 0xffffffff80c18fa3 in vm_map_remove (map=0xfffff8012f0f5000, start=140737488355328, end=18446744071579148419) at /usr/home/trasz/svn/head/sys/vm/vm_map.c:3032 #16 0xffffffff80c14349 in vmspace_exit (td=0xfffff80019edb000) at /usr/home/trasz/svn/head/sys/vm/vm_map.c:335 #17 0xffffffff8093817e in exit1 (td=0xfffff80019edb000, rv=) at /usr/home/trasz/svn/head/sys/kern/kern_exit.c:391 #18 0xffffffff80979ee0 in sigexit (td=0xfffff80019edb000, sig=Unhandled dwarf expression opcode 0x93 ) at /usr/home/trasz/svn/head/sys/kern/kern_sig.c:2974 #19 0xffffffff8097a50c in postsig (sig=) at /usr/home/trasz/svn/head/sys/kern/kern_sig.c:2877 #20 0xffffffff809cb2f7 in ast (framep=) at /usr/home/trasz/svn/head/sys/kern/subr_trap.c:274 #21 0xffffffff80d728f9 in doreti_ast () at /usr/home/trasz/svn/head/sys/amd64/amd64/exception.S:681 #22 0x00007fffffffea58 in ?? () Steps to reproduce: # mdconfig -s1g # newfs /dev/md0 # mount /dev/md0 /mnt # cp loop /mnt # /mnt/loop In another terminal: # umount -f /mnt loop.c: #include #include #include #include int main(void) { int error; error = mlockall(MCL_CURRENT | MCL_FUTURE); if (error != 0) err(1, "mlockall"); for (;;) { fprintf(stderr, "."); sleep(1); } } -- You are receiving this mail because: You are the assignee for the bug.