NetBSD Problem Report #38989
From apb@cequrux.com Thu Jun 19 16:20:53 2008
Return-Path: <apb@cequrux.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 5BC0063B880
for <gnats-bugs@gnats.NetBSD.org>; Thu, 19 Jun 2008 16:20:53 +0000 (UTC)
Message-Id: <20080619153241.DA422E93408@apb-laptoy.apb.alt.za>
Date: Thu, 19 Jun 2008 15:32:41 +0000 (UTC)
From: apb@cequrux.com
To: gnats-bugs@gnats.NetBSD.org
Subject: crash switching from text to graphics console
X-Send-Pr-Version: 3.95
>Number: 38989
>Category: port-i386
>Synopsis: crash switching from text to graphics console
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: port-i386-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jun 19 16:25:00 +0000 2008
>Closed-Date: Sat Feb 28 14:04:51 +0000 2009
>Last-Modified: Mon Mar 02 20:55:01 +0000 2009
>Originator: Alan Barrett
>Release: NetBSD 4.99.63
>Organization:
Not much
>Environment:
System: NetBSD 4.99.63
Architecture: i386
Machine: i386
>Description:
The system may crash when switching from a text console to a
graphical console, when using wscons with multiple virtual
consoles.
>How-To-Repeat:
I was running X on the wscons virtual console that's accessed
by pressing alt-control-F5.
I switched to the first virtual console (which was in text mode)
by pressing alt-control-F1.
A short time later, I attempted to switch back to the X session
by pression alt-control-F5, but the system crashed.
Some of the messages had scrolled off the screen before I saw
them, but here's a partial backtrace:
Stoped in pid 1138.1 (Xorg) ...
_bus_dmamem_alloc_range(...)
_bus_dmamem_alloc(...)
agp_generic_bind_memory(...)
cdev_ioctl(...)
dev_ioctl(...)
spec_ioctl(...)
VOP_IOCTL(...)
vn_ioctl(...)
sys_ioctl(...)
syscall(...)
>Fix:
Switching from a text console to a graphics console sometimes
works. In this case, I suspect that there was insufficient free
memory.
If the problem is memory allocation, then a possible fix could
be to free some memory and try again instead of crashing.
>Release-Note:
>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: port-i386-maintainer@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: port-i386/38989: crash switching from text to graphics console
Date: Mon, 1 Sep 2008 09:08:50 +0000
On Thu, Jun 19, 2008 at 04:25:00PM +0000, apb@cequrux.com wrote:
> If the problem is memory allocation, then a possible fix could
> be to free some memory and try again instead of crashing.
Is this a symptom of the same problem that makes the X server break
with jemalloc?
--
David A. Holland
dholland@netbsd.org
From: Alan Barrett <apb@cequrux.com>
To: gnats-bugs@NetBSD.org, netbsd-bugs@NetBSD.org
Cc:
Subject: Re: port-i386/38989: crash switching from text to graphics console
Date: Mon, 1 Sep 2008 12:01:17 +0200
On Mon, 01 Sep 2008, David Holland wrote:
> On Thu, Jun 19, 2008 at 04:25:00PM +0000, apb@cequrux.com wrote:
> > If the problem is memory allocation, then a possible fix could
> > be to free some memory and try again instead of crashing.
>
> Is this a symptom of the same problem that makes the X server break
> with jemalloc?
It seems unlikely; this crash is in the kernel, while jemalloc is in
userland.
--apb (Alan Barrett)
From: David Holland <dholland-bugs@netbsd.org>
To: Alan Barrett <apb@cequrux.com>
Cc: gnats-bugs@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: port-i386/38989: crash switching from text to graphics console
Date: Mon, 1 Sep 2008 18:52:52 +0000
On Mon, Sep 01, 2008 at 12:01:17PM +0200, Alan Barrett wrote:
> > > If the problem is memory allocation, then a possible fix could
> > > be to free some memory and try again instead of crashing.
> >
> > Is this a symptom of the same problem that makes the X server break
> > with jemalloc?
>
> It seems unlikely; this crash is in the kernel, while jemalloc is in
> userland.
er, duh. never mind, nothing to see here...
--
David A. Holland
dholland@netbsd.org
From: Matthias Drochner <drochner@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/38989 CVS commit: src/sys/uvm
Date: Thu, 26 Feb 2009 18:18:14 +0000 (UTC)
Module Name: src
Committed By: drochner
Date: Thu Feb 26 18:18:14 UTC 2009
Modified Files:
src/sys/uvm: uvm_page.c
Log Message:
-fix two conditions where PQ_FREE was still/already set while the page
was not anymore/yet on the freelist and uvm_fpageqlock was not held
-clear PQ_FREE while the page is in the works of pageidlezero
This avoids that the DMA memory allocator (pglistalloc) grabs a page
which is not on the freelist, leading to a diagnostic panic (with DEBUG)
or freelist corruption. (mostly on X server activation after a VT
switch or suspend/resume because this can allocate megabytes of AGP
memory)
This might fix PR port-i386/38989 by Alan Barrett (in case this was
a multiprocessor).
To generate a diff of this commit:
cvs rdiff -r1.142 -r1.143 src/sys/uvm/uvm_page.c
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: drochner@NetBSD.org
State-Changed-When: Thu, 26 Feb 2009 18:23:05 +0000
State-Changed-Why:
Was this a multicpu box? If yes, uvm_page.c rev. 1.143 might help.
From: Alan Barrett <apb@cequrux.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: port-i386/38989 (crash switching from text to graphics console)
Date: Thu, 26 Feb 2009 22:41:07 +0200
On Thu, 26 Feb 2009, drochner@NetBSD.org wrote:
> Was this a multicpu box? If yes, uvm_page.c rev. 1.143 might help.
Yes, it was a multi-cpu box. However, I haven't seen this error for
several months; I think that sys/uvm/uvm_pdaemon.c revision 1.93 made
the symptoms go away simply by making the system less likely to run out
of memory. Feel free to close the PR.
--apb (Alan Barrett)
State-Changed-From-To: feedback->closed
State-Changed-By: drochner@NetBSD.org
State-Changed-When: Sat, 28 Feb 2009 14:04:51 +0000
State-Changed-Why:
closed on submitter's request (can't reproduce it anymore)
From: Soren Jacobsen <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/38989 CVS commit: [netbsd-5] src/sys/uvm
Date: Mon, 2 Mar 2009 20:50:26 +0000
Module Name: src
Committed By: snj
Date: Mon Mar 2 20:50:26 UTC 2009
Modified Files:
src/sys/uvm [netbsd-5]: uvm_page.c
Log Message:
Pull up following revision(s) (requested by drochner in ticket #541):
sys/uvm/uvm_page.c: revision 1.143
-fix two conditions where PQ_FREE was still/already set while the page
was not anymore/yet on the freelist and uvm_fpageqlock was not held
-clear PQ_FREE while the page is in the works of pageidlezero
This avoids that the DMA memory allocator (pglistalloc) grabs a page
which is not on the freelist, leading to a diagnostic panic (with DEBUG)
or freelist corruption. (mostly on X server activation after a VT
switch or suspend/resume because this can allocate megabytes of AGP
memory)
This might fix PR port-i386/38989 by Alan Barrett (in case this was
a multiprocessor).
To generate a diff of this commit:
cvs rdiff -u -r1.140.6.1 -r1.140.6.2 src/sys/uvm/uvm_page.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.