NetBSD Problem Report #45931

From tsutsui@ceres.dti.ne.jp  Sun Feb  5 15:05:55 2012
Return-Path: <tsutsui@ceres.dti.ne.jp>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id CF36963D7A7
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  5 Feb 2012 15:05:55 +0000 (UTC)
Message-Id: <201202051505.q15F5oJx014439@mirage.localdomain>
Date: Mon, 6 Feb 2012 00:05:50 +0900 (JST)
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@gnats.NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: early kmem panic on sun2
X-Send-Pr-Version: 3.95

>Number:         45931
>Category:       port-sun2
>Synopsis:       early kmem panic on sun2
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    port-sun2-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 05 15:10:00 +0000 2012
>Closed-Date:    Mon Aug 13 12:48:27 +0000 2012
>Last-Modified:  Mon Aug 13 12:48:27 +0000 2012
>Originator:     Izumi Tsutsui
>Release:        NetBSD 5.99.64 updated around 201202051400Z
>Organization:
>Environment:
System: NetBSD 5.99.64 sun2 GENERIC on tme-0.8nb6
Architecture: m68000
Machine: sun2
>Description:
NetBSD/sun2 GENERIC doesn't boot on TME:
---

Self Test completed successfully.

Sun Workstation, Model Sun-2/120 or Sun-2/170, Sun-2 keyboard
ROM Rev R, 7MB memory installed
Serial #51388, Ethernet address 8:0:20:0:0:1

Probing Multibus: sd ec
Using RS232 A input.
Auto-boot in progress...
Boot: sd(0,0,0)vmunix 
>> NetBSD/sun2 ufsboot [1.13 (Sun Feb  5 22:42:14 JST 2012)]
open vmunix: No such file or directory
ufsboot: vmunix: loadfile() failed.
filename? [netbsd]: 
1579132+114884 [157040+146307]=0x1e7e54
relocating program...starting program at 0x6000
console is ttya
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 5.99.64 (GENERIC) #0: Sun Feb  5 22:46:00 JST 2012
        tsutsui@mirage:/s/src/sys/arch/sun2/compile/obj.sun2/GENERIC
Model: sun2 {120,170}
fpu: no math support
total memory = 7168 KB
avail memory = 4912 KB
panic: pool_get: kmem-4096: page empty
Stopped in pid 0.1 (system) at  netbsd:cpu_Debugger+0x6:        unlk    a6
db> tr
cpu_Debugger(1,7a79c,7a7a2,23381c,1f1b54) + 6
vpanic(170a3f,1f1b60,1f1b8c,cec9e,170a3f) + 1da
panic(170a3f,1704fc,1,0,1) + c
pool_get(23381c,1) + 196
pool_cache_get_slow(23399c,2710,1f1bf8,0,1) + f4
pool_cache_get_paddr(23381c,1,0) + 8e
kmem_intr_alloc(c04,1) + 70
kern_malloc(c00,183a60,4) + 22
sysctl_create(1f1ec4,1,1f1dd0,1f1ef0,1f1e30,60,1f1ec0,0,228804) + 592
sysctl_createv(0,0,0,0,a00,2,162ade,162abd,0,0,1,0,0,1,13,ffffffff) + 200
sysctl_kern_setup(0) + 4fc
sysctl_init(ffffffff,0,0,ffffffff,ffffffff) + 2a
main(0,0,0,0,0) + 8c
db> 
---

>How-To-Repeat:
build.sh -m sun2 -U live-image and boot the NetBSD/sun2 image on TME.
>Fix:
No idea.

>Release-Note:

>Audit-Trail:
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: para@NetBSD.org
Cc: gnats-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp
Subject: Re: port-sun2/45931: early kmem panic on sun2
Date: Sun, 12 Aug 2012 01:23:00 +0900

 > NetBSD 5.99.64 (GENERIC) #0: Sun Feb  5 22:46:00 JST 2012
 > 	tsutsui@mirage:/s/src/sys/arch/sun2/compile/obj.sun2/GENERIC
 > Model: sun2 {120,170}
 > fpu: no math support
 > total memory = 7168 KB
 > avail memory = 4912 KB
 > panic: pool_get: kmem-4096: page empty
 > Stopped in pid 0.1 (system) at  netbsd:cpu_Debugger+0x6:        unlk    a6

 This still happens on netbsd-6, but HEAD sun2 kernels works.

 Pulling sys/kern/subr_kmem.c rev 1.46:
  http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/subr_kmem.c#rev1.46
 to netbsd-6 also fixes this panic.

 Does it also include some implicit bug fixes,
 not only improvements for >4KB allocations?
 Or "decrease overall memory" is mandatory
 for poor tier II ports?

 ---
 Izumi Tsutsui

From: Lars Heidieker <lars@heidieker.de>
To: gnats-bugs@NetBSD.org
Cc: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>, 
 port-sun2-maintainer@netbsd.org, gnats-admin@netbsd.org, 
 netbsd-bugs@netbsd.org
Subject: Re: port-sun2/45931: early kmem panic on sun2
Date: Sun, 12 Aug 2012 15:07:22 +0200

 On 08/11/2012 06:25 PM, Izumi Tsutsui wrote:
 > The following reply was made to PR port-sun2/45931; it has been 
 > noted by GNATS.
 > 
 > From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> To: para@NetBSD.org 
 > Cc: gnats-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp Subject: Re: 
 > port-sun2/45931: early kmem panic on sun2 Date: Sun, 12 Aug 2012 
 > 01:23:00 +0900
 > 
 >> NetBSD 5.99.64 (GENERIC) #0: Sun Feb  5 22:46:00 JST 2012 
 >> tsutsui@mirage:/s/src/sys/arch/sun2/compile/obj.sun2/GENERIC 
 >> Model: sun2 {120,170} fpu: no math support total memory = 7168 KB
 >> avail memory = 4912 KB panic: pool_get: kmem-4096: page empty 
 >> Stopped in pid 0.1 (system) at  netbsd:cpu_Debugger+0x6: unlk
 >> a6
 > 
 > This still happens on netbsd-6, but HEAD sun2 kernels works.
 > 
 > Pulling sys/kern/subr_kmem.c rev 1.46: 
 > http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/subr_kmem.c#rev1.46
 >
 >
 > 
 > 
 > Does it also include some implicit bug fixes, not only
 > improvements for >4KB allocations? Or "decrease overall memory" is
 > mandatory for poor tier II ports?
 > 
 > 

 sun2 has a PAGE_SIZE of 2k which was not properly handled before this
 change. A 4k pool was initialized before but did not work, this is
 true for all archs with PAGE_SIZE < 4kb.
 This is fixed with rev 1.46.
 I think rev 1.46 should be pulled to netbsd-6.

 Thanks for trying this out.

 Lars

State-Changed-From-To: open->closed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Mon, 13 Aug 2012 21:48:27 +0900
State-Changed-Why:
Fixed by sys/kern/subr_kmem.c rev 1.46 and pulled up to netbsd-6:
http://mail-index.netbsd.org/source-changes/2012/08/12/msg036493.html


>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.