NetBSD Problem Report #53054

From www@NetBSD.org  Sun Feb 25 14:19:14 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-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 044A37A103
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 25 Feb 2018 14:19:14 +0000 (UTC)
Message-Id: <20180225141912.7C9937A227@mollari.NetBSD.org>
Date: Sun, 25 Feb 2018 14:19:12 +0000 (UTC)
From: venture37@geeklan.co.uk
Reply-To: venture37@geeklan.co.uk
To: gnats-bugs@NetBSD.org
Subject: panic when booting with latest kernel from HEAD & 5.1.2 userland
X-Send-Pr-Version: www-1.0

>Number:         53054
>Category:       kern
>Synopsis:       panic when booting with latest kernel from HEAD & 5.1.2 userland
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jdolecek
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 25 14:20:00 +0000 2018
>Closed-Date:    Mon Feb 26 14:53:04 +0000 2018
>Last-Modified:  Mon Feb 26 14:53:04 +0000 2018
>Originator:     Sevan Janiyan
>Release:        NetBSD-8.99.12 kernel on 5.1.2 userland
>Organization:
>Environment:
>Description:
Attempting to boot a kernel build from the GENERIC config results in a panic as the system attempts to mount filesystems. This crash is not present if the system is booted from the latest INSTALL kernel. The kernels used are from 201802231350Z.

Mounting all filesystems...
panic: kernel diagnostic assertion "asids_found == pmap_tlb_asid_count(ti)" failed: file "/usr/src/sys/uvm/pmap/pmap_tlb.c", line 460
cpu0: Begin traceback...
pid -2137728200 not found
cpu0: End traceback...
kernel: breakpoint trap
Stopped in pid 209.1 (mount) at netbsd:cpu_Debugger+0x4:        jr      ra
                bdslot: nop



db> bt
0x8094db60: cpu_Debugger+4 (0,bc800000,6,805b31c0) ra 80370108 sz 0
0x8094db60: vpanic+158 (0,bc800000,6,805b31c0) ra 8046c23c sz 48
0x8094db90: kern_assert+3c (0,804dc518,804df6bc,804df3a8) ra 8001cff4 sz 32
0x8094dbb0: pmap_tlb_asid_acquire+960 (0,804dc518,804df6bc,804df3a8) ra 80018c18
 sz 88
0x8094dc08: pmap_activate+50 (0,804dc518,804df6bc,804df3a8) ra 802e9694 sz 32
0x8094dc28: uvmspace_exec+78 (0,804dc518,804df6bc,804df3a8) ra 80316b90 sz 56
0x8094dc60: execve_runproc+528 (8fe9c320,804dc518,0,0) ra 803177fc sz 184
0x8094dd18: execve1+44 (8fe9c320,804dc518,0,0) ra 80317834 sz 392
0x8094dea0: sys_execve+24 (8fe9c320,804dc518,0,0) ra 8001eb3c sz 32
0x8094dec0: syscall+20c (8fe9c320,804dc518,0,0) ra 80011ec0 sz 136
0x8094df48: mips3_systemcall+e0 (8fe9c320,804dc518,0,0) ra 7dd4d4f0 sz 0
PC 0x7dd4d4f0: not in kernel space
0x8094df48: 0+7dd4d4f0 (8fe9c320,804dc518,0,0) ra 0 sz 0
User-level: pid 209.1
db> ps
PID    LID S CPU     FLAGS       STRUCT LWP *               NAME WAIT
209  >   1 7   0         0           8fe9c320              mount
207      1 3   0         0           8fe9c8e0              mount wait
208      1 3   0        80           8fe9cbc0                 sh wait
140      1 2   0         0           8fe9c600            syslogd
2        1 3   0        80           8fe9da20                 sh wait
1        1 3   0        80           8fee7160               init wait
0       38 3   0       200           8fe9d740            physiod physiod
0       37 3   0       200           8fe9cea0           aiodoned aiodoned
0       36 3   0       200           8fe9d180            ioflush syncer
0       35 3   0       200           8fe9d460           pgdaemon pgdaemon
0       31 3   0       200           8fee6e80            rt_free rt_free
0       30 3   0       200           8fee6ba0              unpgc unpgc
0       29 3   0       200           8fee68c0    icmp6_wqinput/0 icmp6_wqinput
0       28 3   0       200           8fee65e0          nd6_timer nd6_timer
0       27 3   0       200           8fee6300     icmp_wqinput/0 icmp_wqinput
0       26 3   0       200           8fee6020           rt_timer rt_timer
0       25 3   0       200           8fe9dd00        vmem_rehash vmem_rehash
0       16 3   0       200           8fee7440            atabus1 atath
0       15 3   0       200           8fee7720            atabus0 atath
0       14 3   0       200           8fee7a00         pmfsuspend pmfsuspend
0       13 3   0       200           8fee7ce0           pmfevent pmfevent
0       12 3   0       200           8ff60000         sopendfree sopendfr
0       11 3   0       200           8ff602e0           nfssilly nfssilly
0       10 3   0       200           8ff605c0            cachegc cachegc
0        9 3   0       200           8ff608a0             vdrain vdrain
0        8 3   0       200           8ff60b80          modunload mod_unld
0        7 3   0       200           8ff60e60            xcall/0 xcall
0        6 1   0       200           8ff61140          softser/0
0        5 1   0       200           8ff61420          softclk/0
0        4 1   0       200           8ff61700          softbio/0
0        3 1   0       200           8ff619e0          softnet/0
0        2 1   0       201           8ff61cc0             idle/0
0        1 3   0       200           805bc720            swapper uvm
db> sync
syncing disks... pid 209(mount): trap: cpu0, address error (load or I-fetch) in kernel mode
status=0x3, cause=0xc010, epc=0x80326afc, vaddr=0x1
tf=0x8094d310 ksp=0x8094d3b0 ra=0x8001c0f4 ppl=0x8fecbc90
kernel: address error (load or I-fetch) trap
Stopped in pid 209.1 (mount) at netbsd:mutex_abort:     lw      v0,0(a2)

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-cobalt/53054: panic when booting with latest kernel from
 HEAD & 5.1.2 userland
Date: Sun, 25 Feb 2018 14:25:33 +0000

 does a netbsd-8 kernel work? I think the recent shared pmap changes
 might have made it broken

From: Sevan Janiyan <venture37@geeklan.co.uk>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-cobalt/53054: panic when booting with latest kernel from
 HEAD & 5.1.2 userland
Date: Sun, 25 Feb 2018 15:09:01 +0000

 On 25/02/2018 14:30, coypu@sdf.org wrote:
 >  does a netbsd-8 kernel work? I think the recent shared pmap changes
 >  might have made it broken

 Yes, netbsd-8 worked.


 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
     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 8.0_BETA (GENERIC.201802250030Z)
 Cobalt Qube 2
 total memory = 256 MB
 avail memory = 247 MB
 timecounter: Timecounters tick every 10.000 msec
 Kernelized RAIDframe activated
 mainbus0 (root)
 com0 at mainbus0 addr 0x1c800000 level 3: st16650a, working fifo
 com0: console
 cpu0 at mainbus0: QED RM5200 CPU (0x28a0) Rev. 10.0 with built-in FPU
 Rev. 10.0
 cpu0: 48 TLB entries, 16MB max page size
 cpu0: 32KB/32B 2-way set-associative L1 instruction cache
 cpu0: 32KB/32B 2-way set-associative write-back L1 data cache
 mcclock0 at mainbus0 addr 0x10000070: mc146818 compatible time-of-day clock
 panel0 at mainbus0 addr 0x1f000000
 gt0 at mainbus0 addr 0x14000000
 pci0 at gt0
 pci0: i/o space, memory space enabled, rd/line, wr/inv ok
 pchb0 at pci0 dev 0 function 0: Galileo GT-64111 System Controller, rev 1
 tlp0 at pci0 dev 7 function 0: DECchip 21143 Ethernet, pass 4.1
 tlp0: interrupting at level 1
 tlp0: Ethernet address 00:10:e0:
 lxtphy0 at tlp0 phy 1: LXT970 10/100 media interface, rev. 3
 lxtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 pcib0 at pci0 dev 9 function 0
 pcib0: vendor 1106 product 0586, rev 39
 viaide0 at pci0 dev 9 function 1
 viaide0: VIA Technologies VT82C586 (Apollo VP) ATA33 controller
 viaide0: bus-master DMA support present
 viaide0: primary channel configured to compatibility mode
 viaide0: primary channel interrupting at irq 14
 atabus0 at viaide0 channel 0
 viaide0: secondary channel configured to compatibility mode
 viaide0: secondary channel interrupting at irq 15
 atabus1 at viaide0 channel 1
 vendor 1106 product 3038 (USB serial bus, UHCI, revision 0x02) at pci0
 dev 9 function 2 not configured
 vendor 10b9 product 5237 (USB serial bus, OHCI, revision 0x03) at pci0
 dev 10 function 0 not configured
 vendor 10b9 product 5237 (USB serial bus, OHCI, revision 0x03) at pci0
 dev 10 function 1 not configured
 vendor 10b9 product 5237 (USB serial bus, OHCI, revision 0x03) at pci0
 dev 10 function 2 not configured
 vendor 10b9 product 5239 (USB serial bus, EHCI, revision 0x01) at pci0
 dev 10 function 3 not configured
 vendor 10b9 product 5253 (IEEE1394 serial bus, OpenHCI) at pci0 dev 10
 function 4 not configured
 tlp1 at pci0 dev 12 function 0: DECchip 21143 Ethernet, pass 4.1
 tlp1: interrupting at level 2
 tlp1: Ethernet address 00:10:e0:
 lxtphy1 at tlp1 phy 1: LXT970 10/100 media interface, rev. 3
 lxtphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
 timecounter: Timecounter "mips3_cp0_counter" frequency 125000000 Hz
 quality 100
 wd0 at atabus0 drive 0
 wd0: <HDS728080PLAT20>
 wd0: drive supports 16-sector PIO transfers, LBA48 addressing
 wd0: 78532 MB, 159557 cyl, 16 head, 63 sec, 512 bytes/sect x 160834367
 sectors
 wd0: 32-bit data port
 wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
 wd0(viaide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)
 boot device: wd0
 root on wd0a dumps on wd0b
 root file system type: ffs
 kern.module.path=/stand/cobalt/8.0/modules
 pid 1(init): ABI set to O32 (e_flags=0x1007)

Responsible-Changed-From-To: port-cobalt-maintainer->jdolecek
Responsible-Changed-By: jdolecek@NetBSD.org
Responsible-Changed-When: Sun, 25 Feb 2018 16:12:16 +0000
Responsible-Changed-Why:
Probably my changes broke it, looking at this.


From: "Jaromir Dolecek" <jdolecek@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53054 CVS commit: src/sys/uvm/pmap
Date: Sun, 25 Feb 2018 16:44:31 +0000

 Module Name:	src
 Committed By:	jdolecek
 Date:		Sun Feb 25 16:44:31 UTC 2018

 Modified Files:
 	src/sys/uvm/pmap: pmap_tlb.c

 Log Message:
 adjust KASSERT() triggered in PR port-cobalt/53054 to provide more info


 To generate a diff of this commit:
 cvs rdiff -u -r1.26 -r1.27 src/sys/uvm/pmap/pmap_tlb.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: jdolecek@NetBSD.org
State-Changed-When: Sun, 25 Feb 2018 17:28:23 +0000
State-Changed-Why:
Can you please kernel built from sources after 2018-02-25 17:44 and send
the updated panic message? Unfortunately can't test this myself due
to lack of hardware.


State-Changed-From-To: feedback->open
State-Changed-By: jdolecek@NetBSD.org
State-Changed-When: Sun, 25 Feb 2018 20:42:57 +0000
State-Changed-Why:
Can reproduct on pmax + gxemul, working on fix.


From: "Jaromir Dolecek" <jdolecek@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53054 CVS commit: src/sys/uvm/pmap
Date: Sun, 25 Feb 2018 21:43:03 +0000

 Module Name:	src
 Committed By:	jdolecek
 Date:		Sun Feb 25 21:43:03 UTC 2018

 Modified Files:
 	src/sys/uvm/pmap: pmap_tlb.c

 Log Message:
 fix the DIAGNOSTIC function pmap_tlb_asid_count() to not expect
 that TLBINFO_ASID_INUSE_P() returns just 0 or 1; the underlying
 __BITMAP_ISSET() actually returns the matching bit nowadays, which
 caused miscounting

 fixes PR kern/53054 by Sevan Janiyan


 To generate a diff of this commit:
 cvs rdiff -u -r1.27 -r1.28 src/sys/uvm/pmap/pmap_tlb.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: jdolecek@NetBSD.org
State-Changed-When: Sun, 25 Feb 2018 21:50:40 +0000
State-Changed-Why:
Problem should be fixed in rev. 1.28 of sys/uvm/pmap/pmap_tlb.c
Can you please confirm with kernel from sources after 2018-02-25 21:43:03?


From: Sevan Janiyan <venture37@geeklan.co.uk>
To: "gnats-bugs@NetBSD.org" <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: kern/53054 (panic when booting with latest kernel from HEAD & 5.1.2 userland)
Date: Sun, 25 Feb 2018 23:48:13 +0000

 > On 25 Feb 2018, at 21:50, jdolecek@NetBSD.org wrote:
 > 
 > Problem should be fixed in rev. 1.28 of sys/uvm/pmap/pmap_tlb.c
 > Can you please confirm with kernel from sources after 2018-02-25 21:43:03?

 Yes, problem is now solved. I can boot my system without a crash.

 Thank you for the bug fix.

 Sevan

State-Changed-From-To: feedback->closed
State-Changed-By: sevan@NetBSD.org
State-Changed-When: Mon, 26 Feb 2018 14:53:04 +0000
State-Changed-Why:
fixed, thank you


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.