NetBSD Problem Report #56758

From www@netbsd.org  Thu Mar 17 11:20:33 2022
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id EB5481A921F
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 17 Mar 2022 11:20:32 +0000 (UTC)
Message-Id: <20220317112031.44A161A9239@mollari.NetBSD.org>
Date: Thu, 17 Mar 2022 11:20:31 +0000 (UTC)
From: jbglaw@lug-owl.de
Reply-To: jbglaw@lug-owl.de
To: gnats-bugs@NetBSD.org
Subject: 512 MB RAM on SIMH vax (3900) leads to panic
X-Send-Pr-Version: www-1.0

>Number:         56758
>Category:       port-vax
>Synopsis:       512 MB RAM on SIMH vax (3900) leads to panic
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    port-vax-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 17 11:25:00 +0000 2022
>Closed-Date:    Sun May 28 21:16:05 +0000 2023
>Last-Modified:  Sun May 28 21:16:05 +0000 2023
>Originator:     Jan-Benedict Glaw
>Release:        HEAD (github mirror, as of 987cd78c9c6dfff21bfe29efede3d36e491db628)
>Organization:
>Environment:
# uname -a
NetBSD  9.99.94 NetBSD 9.99.94 (GENERIC) #0:   mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/vax/compile/GENERIC vax

>Description:
Hi!

I tried to use 512 MB RAM on a SIMH vax (256 MB works flawlessly), but
that gave me a panic.

This simulated VAX was installed with a freshly compiled ISO image from
current trunk (as of the GIT mirror). This particular install ISO was
cross-compiled from a Linux host, but I'm also running these builds
from within amd64-based NetBSD hosts and building on NetBSD results
in the same effect on the VAX installation.
>How-To-Repeat:
I started the installation with this SIMH config:

LOAD    -r      /var/cache/git/simh/VAX/ka655x.bin
SET     CPU     256m
SET     CPU     idle=netbsd
#SET    RQ0     ra92
SET     RQ0     rauser=50000
ATTACH  RQ0     netbsd.dsk
SET     RQ1     cdrom
ATTACH  RQ1     /var/cache/laminar-vm/simh-vax-netbsd/images/NetBSD-9.99.94-vax.iso
SET     XQ      mac=08-00-2b-a0-0e-22
ATTACH  XQ      tap:tap_vax
BOOT    CPU


...and went through all the setup procedure.

Starting it later on with a slightly different config:

LOAD    -r      /var/cache/git/simh/VAX/ka655x.bin
SET     CPU     512m
SET     CPU     idle=netbsd
SET     RQ0     rauser=50000
ATTACH  RQ0     netbsd.dsk
SET     RQ1     cdrom
ATTACH  RQ1     /var/cache/laminar-vm/simh-vax-netbsd/images/NetBSD-9.99.94-vax.iso
SET     XQ      mac=08-00-2b-a0-0e-22
ATTACH  XQ      tap:tap_vax
EXPECT ">>>" SEND "boot dua0\r"; CONTINUE
BOOT    CPU
EXIT


results in:

>> NetBSD/vax boot [1.12 ()] <<                                                                                                                                                                
>> Press any key to abort autoboot 0                                                                                                                                                           
getdisklabel: no disk label                                                                                                                                                                    
nfs_open: must mount first.                                                                                                                                                                    
open netbsd.vax: No such file or directory                                                                                                                                                     
> boot netbsd                                                                                                                                                                                  
getdisklabel: no disk label                                                                                                                                                                    
nfs_open: must mount first.                                                                                                                                                                    
3525404+199448 [246096+232499]=0x4027c8                                                                                                                                                        
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,                                                                                                       
[   1.0000000]     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,                                                                                                     
[   1.0000000]     2018, 2019, 2020, 2021, 2022                                                                                                                                                
[   1.0000000]     The NetBSD Foundation, Inc.  All rights reserved.                                                                                                                           
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993                                                                                                                                      
[   1.0000000]     The Regents of the University of California.  All rights reserved.                                                                                                          

[   1.0000000] NetBSD 9.99.94 (GENERIC) #0:                                                                                                                                                    
[   1.0000000]  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/vax/compile/GENERIC                                                                                                               
[   1.0000000] MicroVAX 3800/3900                                                                                                                                                              
[   1.0000000]  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/vax/compile/GENERIC                                                                                                               
[   1.0000000] MicroVAX 3800/3900                                                                                                                                                              
[   1.0000000] total memory = 511 MB                                                                                                                                                           
[   1.0000000] avail memory = 490 MB                                                                                                                                                           
[   1.0000000] mainbus0 (root)                                                                                                                                                                 
[   1.0000000] cpu0 at mainbus0: KA655, CVAX microcode rev 6 Firmware rev 83                                                                                                                   
[   1.0000000] lance at mainbus0 not configured                                                                                                                                                
[   1.0000000] uba0 at mainbus0: Q22                                                                                                                                                           
[   1.0000000] dz1 at uba0 csr 160100 vec 304 ipl 17                                                                                                                                           
[   1.0000000] mtc0 at uba0 csr 174500 vec 774 ipl 17                                                                                                                                          
[   1.0000000] mscpbus0 at mtc0: version 5 model 3                                                                                                                                             
[   1.0000000] mscpbus0: DMA burst size set to 4                                                                                                                                               
[   1.0000000] uda0 at uba0 csr 172150 vec 770 ipl 17                                                                                                                                          
[   1.0000000] mscpbus1 at uda0: version 3 model 3                                                                                                                                             
[   1.0000000] mscpbus1: DMA burst size set to 4                                                                                                                                               
[   1.0000000] qt0 at uba0 csr 174440 vec 764 ipl 17                                                                                                                                           
[   1.0000000] qt0: delqa-plus in Turbo mode, hardware address 08:00:2b:a0:0e:22                                                                                                               
[   1.0000000] rlc0 at uba0 csr 174400 vec 160 ipl 17                                                                                                                                          
[   1.0000000] rl0 at rlc0 drive 0: RL01, drive not loaded                                                                                                                                     
[   1.0000000] rl1 at rlc0 drive 1: RL01, drive not loaded                                                                                                                                     
[   1.0000000] rl2 at rlc0 drive 2: RL01, drive not loaded                                                                                                                                     
[   1.0000000] rl3 at rlc0 drive 3: RL01, drive not loaded                                                                                                                                     
[   1.0000000] ts0 at uba0 csr 172520 vec 224 ipl 17: TS11                                                                                                                                     
[   1.0000000] ts0: rev 0, extended features disabled, transport offline                                                                                                                       
[   1.0000000] entropy: WARNING: extracting entropy too early                                                                                                                                  
[   1.0100030] mt0 at mscpbus0 drive 0: TK50                                                                                                                                                   
[   1.0100030] mt1 at mscpbus0 drive 1: TK50                                                                                                                                                   
[   1.0100030] mt2 at mscpbus0 drive 2: TK50                                                                                                                                                   
[   1.0100030] mt3 at mscpbus0 drive 3: TK50                                                                                                                                                   
[   1.0200030] ra0 at mscpbus1 drive 0: RA82                                                                                                                                                   
[   1.0200030] racd0 at mscpbus1 drive 1: RRD40                                                                                                                                                
[   1.0200030] ra1 at mscpbus1 drive 2: RD54                                                                                                                                                   
[   1.0300030] rx0 at mscpbus1 drive 3: RX50                                                                                                                                                   
[   1.1100030] ra0: size 97700000 sectors                                                                                                                                                      
[   1.1100030] racd0: size 640436 sectors                                                                                                                                                      
[   1.1100030] ra1: attempt to bring on line failed:  unit offline (not mounted) (code 3, subcode 1)                                                                                           
[   1.1100030] rx0: attempt to bring on line failed:  unit offline (not mounted) (code 3, subcode 1)                                                                                           
[   1.1100030] WARNING: 2 errors while detecting hardware; check system log.                                                                                                                   
[   1.1100030] boot device: ra0                                                                                                                                                                
[   1.1100030] root on ra0a dumps on ra0b                                                                                                                                                      
[   1.1200030] root file system type: ffs                                                                                                                                                      
[   1.1200030] kern.module.path=/stand/vax/9.99.94/modules                                                                                                                                     
[   1.5900030] r0=00000017 r1=815ac2fc r2=00000000 r3=9fe6e740 r4=80d02b34 r5=00000000 r6=815ac2d0 r7=04000000                                                                                 
[   1.5900030] r8=8034ad40 r9=815ac2fc r10=00049000 r11=00000000                                                                                                                               
[   1.5900030] ap=a71efce8 fp=a71efcd4 sp=7ffff0d0 pc=80014bd1                                                                                                                                 
[   1.5900030] panic: SEGV in kernel mode: pc 0x80014bd1 addr 0xbedababe                                                                                                                       
[   1.5900030] cpu0: Begin traceback...                                                                                                                                                        
[   1.5900030] panic: SEGV in kernel mode: pc 0x80014bd1 addr 0xbedababe                                                                                                                       
[   1.5900030] Stack traceback :                                                                                                                                                               
[   1.5900030]   Process is executing in user space.                                                                                                                                           
[   1.5900030] cpu0: End traceback...                                                                                                                                                          
Stopped in pid 99.99 (sh) at    netbsd:vpanic+0x165:    pushl   $0                                                                                                                             
db> bt                                                                                                                                                                                         
panic: SEGV in kernel mode: pc 0x80014bd1 addr 0xbedababe                                                                                                                                      
Stack traceback :                                                                                                                                                                              
0xa71efb2c: vpanic+0x165(0x8029842f,0xa71efbc4)                                                                                                                                                
0xa71efb4c: device_printf+0x0(0x8029842f,0x80014bd1,0xbedababe)                                                                                                                                
0xa71efb78: trap+0x79f(0xa71efc84)                                                                                                                                                             
0xa71efc84: trap type=0xc code=0xbedababe pc=0x80014bd1 psl=0xc00008                                                                                                                           
0xa71efc50: _do_cas+0x5(0x815ac2fc)                                                                                                                                                            
0xa71efcd4: uvm_pagealloc_strat+0xd7(0,0x49000,0,0x9fe58860,0x4000000,0,0)                                                                                                                     
0xa71efd04: uvmfault_promote+0x61(0xa71efdf4,0x9fe58c30,0xffffffff,0xa71efdf0,0xa71efe28)                                                                                                      
0xa71efd54: uvm_fault_internal+0xdd7(0x9fe971a8,0x49000,0x2,0)                                                                                                                                 
0xa71efebc: trap+0x46e(0xa71effb4)

Is a 512 MB configuration generally non-functional? Or is this just
a little bug somewhere, probably easy to fix? I'd happily help with
fixing/testing, but I'd need some guidance here.

(My final goal is to have such a SIMH vax running build.sh, also
digging out one of my other vaxstations to run the same, so I'd like
to keep the VAX bits as well-tested as possible.)
>Fix:

>Release-Note:

>Audit-Trail:
From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-vax/56758
Date: Sun, 28 May 2023 22:52:39 +0200

 --pedrfre5txq3o3ox
 Content-Type: text/plain; charset=utf-8
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable

 Hi!

 Support for 512 MB in SIMH was fixed, this ticket can be closed.

 Thanks a lot for this one!

 MfG, JBG

 --=20

 --pedrfre5txq3o3ox
 Content-Type: application/pgp-signature; name="signature.asc"

 -----BEGIN PGP SIGNATURE-----

 iF0EABECAB0WIQQlDTvPcScNjKREqWEdvV51g5nhuwUCZHO/FwAKCRAdvV51g5nh
 u2TYAKCCL7bDbdadTJllu5sJJzrOkxoTxgCfec0utlVRK2c2faX1AyD8dgn/Dm4=
 =Ru9d
 -----END PGP SIGNATURE-----

 --pedrfre5txq3o3ox--

State-Changed-From-To: open->closed
State-Changed-By: lukem@NetBSD.org
State-Changed-When: Sun, 28 May 2023 21:16:05 +0000
State-Changed-Why:
Jan-Benedict confirmed that the problem is now resolved.
Thanks for confirming!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.