NetBSD Problem Report #51288

From martin@duskware.de  Mon Jun 27 19:10:51 2016
Return-Path: <martin@duskware.de>
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 "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 7FF797A488
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 27 Jun 2016 19:10:51 +0000 (UTC)
Date: Mon, 27 Jun 2016 19:10:44 UTC
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: reproducable panic on evbmips64-eb (erlite)
X-Send-Pr-Version: 3.95

>Number:         51288
>Category:       port-mips
>Synopsis:       reproducable panic on evbmips64-eb (erlite)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    skrll
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 27 19:15:00 +0000 2016
>Closed-Date:    Tue Jun 28 09:38:35 +0000 2016
>Last-Modified:  Wed Nov 08 21:30:05 +0000 2017
>Originator:     Martin Husemann
>Release:        NetBSD 7.99.32
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD supremacy.duskware.de 7.99.32 NetBSD 7.99.32 (ERLITE) #141: Mon Jun 27 16:12:45 CEST 2016 martin@night-owl.duskware.de:/usr/src/sys/arch/evbmips/compile/ERLITE evbmips
Architecture: mips64eb
Machine: evbmips
>Description:

On a gcc 5.4 compiled ERLITE I can reproducably panic the machine:

$ cd /usr/tests/lib/libc/sys
$ atf-run t_mmap 


trap: cpu0, address error (load or I-fetch) in kernel mode
status=0x800083, cause=0x10, epc=0xffffffff8022fb54, vaddr=0xdeaddeaddeaddeb5
tf=0x980000041097b210 ksp=0x980000041097b350 ra=0xffffffff8022fb1c ppl=0x90000000
kernel: address error (load or I-fetch) trap
Stopped in pid 867.1 (t_mmap) at        netbsd:pmap_enter_pv+0xcc:      ld      v
0,8(s0)
?
at          ffffffffffffffc0
v0          0
v1          fffffffffffff000
a0          800081
a1          6   _KERNEL_OPT_AIO+0x5
a2          18  _KERNEL_OPT_AIO+0x17
a3          ffffffff80552c10    cpu_info_store
a4          0
a5          3   _KERNEL_OPT_AIO+0x2
a6          0
a7          ffffffffffffffff
t0          ffffffff805d7740    pmap_pvlist_mutex
t1          1   _KERNEL_OPT_AIO
t2          ffffffff80552c10    cpu_info_store
t3          0
s0          deaddeaddeaddead
s1          ffffffff80553180    kernel_pmap_store
s2          c00000000e38c000
s3          9000000001496c80
s4          0
s5          ffffffff805d0000    db_symtab+0x6e418
s6          980000041097b3b0
s7          ffffffff80550000    ostype+0x9ff48
t8          980000000fe3ca20
t9          ffffffff80234950    syscall
k0          0
k1          1   _KERNEL_OPT_AIO
gp          ffffffff805de370    inet4_reserve+0x1350
sp          980000041097b350
fp          ffffffff80550000    ostype+0x9ff48
ra          ffffffff8022fb1c    pmap_enter_pv+0x94
sr          800083
mdlo        6666666668000000
mdhi        6666666
bad         0
cs          10  _KERNEL_OPT_AIO+0xf
pc          ffffffff8022fb54    pmap_enter_pv+0xcc
netbsd:pmap_enter_pv+0xcc:      ld      v0,8(s0)
db> bt
0x980000041097b350: pmap_enter_pv+cc (800081,6,18,ffffffff80552c10) ra ffffffff8
0230b74 sz 96
0x980000041097b3b0: pmap_enter+304 (800081,6,18,ffffffff80552c10) ra ffffffff803
49c24 sz 112
0x980000041097b420: ubc_fault+334 (800081,6,18,ffffffff80552c10) ra ffffffff804b
0000 sz 176
0x980000041097b4d0: version+60 (800081,6,18,ffffffff80552c10) ra 0 sz 0
User-level: pid 867.1



>How-To-Repeat:
s/a

>Fix:
n/a

>Release-Note:

>Audit-Trail:
From: "Nick Hudson" <skrll@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51288 CVS commit: src/sys/arch/mips/mips
Date: Tue, 28 Jun 2016 09:31:15 +0000

 Module Name:	src
 Committed By:	skrll
 Date:		Tue Jun 28 09:31:15 UTC 2016

 Modified Files:
 	src/sys/arch/mips/mips: pmap.c

 Log Message:
 Fix PR/51288 reproducable panic on evbmips64-eb (erlite)

 pmap_page_remove from the previous change neglected to terminate the pv
 list correctly when it started with an initial unmanaged mapping and
 subsequent managed mappings.  Fix this.


 To generate a diff of this commit:
 cvs rdiff -u -r1.221 -r1.222 src/sys/arch/mips/mips/pmap.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: port-mips-maintainer->skrll
Responsible-Changed-By: skrll@NetBSD.org
Responsible-Changed-When: Tue, 28 Jun 2016 09:38:35 +0000
Responsible-Changed-Why:
My bug


State-Changed-From-To: open->closed
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Tue, 28 Jun 2016 09:38:35 +0000
State-Changed-Why:
martin tested the ocmmited fix and the problem has gone. Thanks for the
report and testing the fix!


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51288 CVS commit: [netbsd-7-0] src/sys/arch/mips/mips
Date: Sun, 10 Jul 2016 08:44:07 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sun Jul 10 08:44:07 UTC 2016

 Modified Files:
 	src/sys/arch/mips/mips [netbsd-7-0]: pmap.c

 Log Message:
 Pull up following revision(s) (requested by skrll in ticket #1200):
 	sys/arch/mips/mips/pmap.c: revision 1.221
 	sys/arch/mips/mips/pmap.c: revision 1.222
 	sys/arch/mips/mips/pmap.c: revision 1.223
 Fix a bug introduced by me in 1.214 where unmanaged mappings would be
 affected by calls to pmap_page_protect which is wrong.  Now PV_KENTER
 mappings are left intact.
 Thanks to chuq for spotting my mistake and reviewing this diff.
 Thanks to everyone who tested it as well.
 Fix PR/51288 reproducable panic on evbmips64-eb (erlite)
 pmap_page_remove from the previous change neglected to terminate the pv
 list correctly when it started with an initial unmanaged mapping and
 subsequent managed mappings.  Fix this.
 Fix MIPS3_NO_PV_UNCACHED alias handling by looping through the pv_list
 looking for bad aliases and removing the bad entries.  That is, revert
 to the code before the matt-mips64 merge.
 Additionally, fix the pmap_update call to not use the (recently
   removed/freed) pv for the pmap_t.
 Fixes the following two PRs
 PR/49903: Panic during installation on WorkPad Z50 (hpcmips) whilst uncompressing base.tgz
 PR/51226: Install bug for hpcmips NetBSD V7 using FTP Full installation


 To generate a diff of this commit:
 cvs rdiff -u -r1.214 -r1.214.6.1 src/sys/arch/mips/mips/pmap.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51288 CVS commit: [netbsd-7] src/sys/arch/mips/mips
Date: Sun, 10 Jul 2016 10:33:42 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sun Jul 10 10:33:42 UTC 2016

 Modified Files:
 	src/sys/arch/mips/mips [netbsd-7]: pmap.c

 Log Message:
 Pull up following revision(s) (requested by skrll in ticket #1200):
 	sys/arch/mips/mips/pmap.c: revision 1.221
 	sys/arch/mips/mips/pmap.c: revision 1.222
 	sys/arch/mips/mips/pmap.c: revision 1.223
 Fix a bug introduced by me in 1.214 where unmanaged mappings would be
 affected by calls to pmap_page_protect which is wrong.  Now PV_KENTER
 mappings are left intact.
 Thanks to chuq for spotting my mistake and reviewing this diff.
 Thanks to everyone who tested it as well.
 Fix PR/51288 reproducable panic on evbmips64-eb (erlite)
 pmap_page_remove from the previous change neglected to terminate the pv
 list correctly when it started with an initial unmanaged mapping and
 subsequent managed mappings.  Fix this.
 Fix MIPS3_NO_PV_UNCACHED alias handling by looping through the pv_list
 looking for bad aliases and removing the bad entries.  That is, revert
 to the code before the matt-mips64 merge.
 Additionally, fix the pmap_update call to not use the (recently
   removed/freed) pv for the pmap_t.
 Fixes the following two PRs
 PR/49903: Panic during installation on WorkPad Z50 (hpcmips) whilst uncompressing base.tgz
 PR/51226: Install bug for hpcmips NetBSD V7 using FTP Full installation


 To generate a diff of this commit:
 cvs rdiff -u -r1.214 -r1.214.2.1 src/sys/arch/mips/mips/pmap.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Manuel Bouyer" <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51288 CVS commit: [netbsd-6] src/sys/arch/mips/mips
Date: Sat, 27 Aug 2016 14:34:55 +0000

 Module Name:	src
 Committed By:	bouyer
 Date:		Sat Aug 27 14:34:55 UTC 2016

 Modified Files:
 	src/sys/arch/mips/mips [netbsd-6]: pmap.c

 Log Message:
 Pull up following revision(s) (requested by skrll in ticket #1390):
 	sys/arch/mips/mips/pmap.c: revision 1.221
 	sys/arch/mips/mips/pmap.c: revision 1.222
 	sys/arch/mips/mips/pmap.c: revision 1.223
 Fix a bug introduced by me in 1.214 where unmanaged mappings would be
 affected by calls to pmap_page_protect which is wrong.  Now PV_KENTER
 mappings are left intact.
 Thanks to chuq for spotting my mistake and reviewing this diff.
 Thanks to everyone who tested it as well.
 Fix PR/51288 reproducable panic on evbmips64-eb (erlite)
 pmap_page_remove from the previous change neglected to terminate the pv
 list correctly when it started with an initial unmanaged mapping and
 subsequent managed mappings.  Fix this.
 Fix MIPS3_NO_PV_UNCACHED alias handling by looping through the pv_list
 looking for bad aliases and removing the bad entries.  That is, revert
 to the code before the matt-mips64 merge.
 Additionally, fix the pmap_update call to not use the (recently
   removed/freed) pv for the pmap_t.
 Fixes the following two PRs
 PR/49903: Panic during installation on WorkPad Z50 (hpcmips) whilst uncompressing base.tgz
 PR/51226: Install bug for hpcmips NetBSD V7 using FTP Full installation


 To generate a diff of this commit:
 cvs rdiff -u -r1.207.2.3 -r1.207.2.4 src/sys/arch/mips/mips/pmap.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51288 CVS commit: [netbsd-6-0] src/sys/arch/mips/mips
Date: Wed, 8 Nov 2017 21:28:18 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Wed Nov  8 21:28:18 UTC 2017

 Modified Files:
 	src/sys/arch/mips/mips [netbsd-6-0]: pmap.c

 Log Message:
 Pull up following revision(s) (requested by skrll in ticket #1390):
 	sys/arch/mips/mips/pmap.c: 1.221-1.223
 Fix a bug introduced by me in 1.214 where unmanaged mappings would be
 affected by calls to pmap_page_protect which is wrong.  Now PV_KENTER
 mappings are left intact.
 Thanks to chuq for spotting my mistake and reviewing this diff.
 Thanks to everyone who tested it as well.
 Fix PR/51288 reproducable panic on evbmips64-eb (erlite)
 pmap_page_remove from the previous change neglected to terminate the pv
 list correctly when it started with an initial unmanaged mapping and
 subsequent managed mappings.  Fix this.
 Fix MIPS3_NO_PV_UNCACHED alias handling by looping through the pv_list
 looking for bad aliases and removing the bad entries.  That is, revert
 to the code before the matt-mips64 merge.
 Additionally, fix the pmap_update call to not use the (recently
   removed/freed) pv for the pmap_t.
 Fixes the following two PRs
 PR/49903: Panic during installation on WorkPad Z50 (hpcmips) whilst uncompressing base.tgz
 PR/51226: Install bug for hpcmips NetBSD V7 using FTP Full installation


 To generate a diff of this commit:
 cvs rdiff -u -r1.207.2.1.4.2 -r1.207.2.1.4.3 src/sys/arch/mips/mips/pmap.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51288 CVS commit: [netbsd-6-1] src/sys/arch/mips/mips
Date: Wed, 8 Nov 2017 21:28:24 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Wed Nov  8 21:28:24 UTC 2017

 Modified Files:
 	src/sys/arch/mips/mips [netbsd-6-1]: pmap.c

 Log Message:
 Pull up following revision(s) (requested by skrll in ticket #1390):
 	sys/arch/mips/mips/pmap.c: 1.221-1.223
 Fix a bug introduced by me in 1.214 where unmanaged mappings would be
 affected by calls to pmap_page_protect which is wrong.  Now PV_KENTER
 mappings are left intact.
 Thanks to chuq for spotting my mistake and reviewing this diff.
 Thanks to everyone who tested it as well.
 Fix PR/51288 reproducable panic on evbmips64-eb (erlite)
 pmap_page_remove from the previous change neglected to terminate the pv
 list correctly when it started with an initial unmanaged mapping and
 subsequent managed mappings.  Fix this.
 Fix MIPS3_NO_PV_UNCACHED alias handling by looping through the pv_list
 looking for bad aliases and removing the bad entries.  That is, revert
 to the code before the matt-mips64 merge.
 Additionally, fix the pmap_update call to not use the (recently
   removed/freed) pv for the pmap_t.
 Fixes the following two PRs
 PR/49903: Panic during installation on WorkPad Z50 (hpcmips) whilst uncompressing base.tgz
 PR/51226: Install bug for hpcmips NetBSD V7 using FTP Full installation


 To generate a diff of this commit:
 cvs rdiff -u -r1.207.2.1.6.2 -r1.207.2.1.6.3 src/sys/arch/mips/mips/pmap.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.