NetBSD Problem Report #44788
From jruohone@gmail.com Tue Mar 29 11:08:59 2011
Return-Path: <jruohone@gmail.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 134B563BB73
for <gnats-bugs@gnats.netbsd.org>; Tue, 29 Mar 2011 11:08:59 +0000 (UTC)
Message-Id: <20110329100221.476BF56C5@marx.bitnet>
Date: Tue, 29 Mar 2011 13:02:21 +0300 (EEST)
From: Jukka Ruohonen <jruohonen@iki.fi>
Sender: a b <jruohone@gmail.com>
Reply-To: jruohonen@iki.fi
To: gnats-bugs@gnats.NetBSD.org
Subject: mlock(2) panic
X-Send-Pr-Version: 3.95
>Number: 44788
>Category: kern
>Synopsis: mlock(2) panic
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: jruoho
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Mar 29 11:10:06 +0000 2011
>Closed-Date: Fri Apr 20 12:12:07 +0000 2012
>Last-Modified: Fri Apr 20 12:15:02 +0000 2012
>Originator: Jukka Ruohonen
>Release: 5.99.48
>Organization:
-
>Environment:
>Description:
While testing the robustness of mlock(2), the following assertion was
easily caught:
panic: kernel diagostic assertion "entry1->start < splitat" failed: file "/usr/src/sys/uvm/uvm_map.c", line 10660
fatal breakpoint trap in supervisor mode
...
db{1}> bt
breakpoint() at netbsd:breakpoint+0x5
panic() at netbsd:panic+0x2b6
kern_assert() at netbsd:kern_assert+0x2d
uvm_mapent_splitadj() at netbsd:uvm_mapent_splitadj+0xcf
uvm_map_clip_end() at netbsd:uvm_map_clip_end+0x3c
uvm_map_pageable() at netbsd:uvm_map_pageable+0x27f
sys_mlock() at netbsd:sys_mlock+0xa0
syscall() at netbsd:syscall0xaa
>How-To-Repeat:
#include <sys/mman.h>
#include <stdlib.h>
#include <unistd.h>
int
main(void)
{
void *buf;
long page;
size_t i;
page = sysconf(_SC_PAGESIZE);
if (page != 4096)
abort();
if ((buf = malloc(page)) == NULL)
abort();
for (i = page; i >= 1; i = i - 1024) {
(void)mlock(buf, page - i);
(void)munlock(buf, page - i);
}
return 0;
}
>Fix:
Unknown.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->rmind
Responsible-Changed-By: rmind@NetBSD.org
Responsible-Changed-When: Wed, 30 Mar 2011 05:45:16 +0000
Responsible-Changed-Why:
Take. Likely related with PR/34735, for which I am preparing a patch.
From: "Chuck Silvers" <chs@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/44788 CVS commit: src/sys/uvm
Date: Sat, 21 Jan 2012 16:51:38 +0000
Module Name: src
Committed By: chs
Date: Sat Jan 21 16:51:38 UTC 2012
Modified Files:
src/sys/uvm: uvm_map.h
Log Message:
fix UVM_MAP_CLIP_* to only clip if the clip address is within the entry
(which would only not be true if the clip address is at one of the boundaries
of the entry). fixes PR 44788.
To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/uvm/uvm_map.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: dholland@NetBSD.org
State-Changed-When: Sun, 22 Jan 2012 16:12:50 +0000
State-Changed-Why:
Did the commit fix it for you?
From: Jukka Ruohonen <jruohonen@iki.fi>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org,
netbsd-bugs@NetBSD.org
Subject: Re: kern/44788: mlock(2) panic
Date: Fri, 20 Apr 2012 08:16:43 +0300
> Did the commit fix it for you?
I haven't checked yet, but lets keep this open until I add a test case for
it.
Responsible-Changed-From-To: rmind->jruoho
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Fri, 20 Apr 2012 07:34:47 +0000
Responsible-Changed-Why:
promised us a test :-)
State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Fri, 20 Apr 2012 07:34:47 +0000
State-Changed-Why:
awaiting the test case
State-Changed-From-To: open->closed
State-Changed-By: jruoho@NetBSD.org
State-Changed-When: Fri, 20 Apr 2012 12:12:07 +0000
State-Changed-Why:
Verified to be fixed, thanks.
From: "Jukka Ruohonen" <jruoho@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/44788 CVS commit: src
Date: Fri, 20 Apr 2012 12:11:30 +0000
Module Name: src
Committed By: jruoho
Date: Fri Apr 20 12:11:30 UTC 2012
Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/lib/libc/sys: Makefile
Added Files:
src/tests/lib/libc/sys: t_mlock.c
Log Message:
Add few unit tests for mlock(2), including a case for PR kern/44788.
To generate a diff of this commit:
cvs rdiff -u -r1.465 -r1.466 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.21 -r1.22 src/tests/lib/libc/sys/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/sys/t_mlock.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(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.