Subject: port-sparc64/27288: pmap_clear_reference: pseg empty! - kdb breakpoint at 12454c0
To: None <gnats-bugs@gnats.NetBSD.org>
From: S.P.Zeidler <spz@aquila.ipv6.de>
List: netbsd-bugs
Date: 10/18/2004 11:43:15
>Number:         27288
>Category:       port-sparc64
>Synopsis:       system falls into kdb due to pagedaemon 'assertion'
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-sparc64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 18 09:45:01 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     S.P.Zeidler
>Release:        NetBSD 2.99.10 (Oct 15)
>Organization:
	dis-
>Environment:
System: NetBSD aquila 2.99.10 NetBSD 2.99.10 (AQUILA) #2: Fri Oct 15 22:57:08 CEST 2004 spz@aquila:/sys/arch/sparc64/compile/AQUILA sparc64
Architecture: sparc64
Machine: sparc64
>Description:

Debugger() gets called at sys/arch/sparc64/sparc64/pmap.c line 2666. 
The condition that calls the Debugger reads
if (pseg_set(pmap, va, data, 0)) {
and it's unclear why that isn't
if (pseg_set(pmap, va, data, 0) & 1) {
Some more documentation (aka comments) would be dandy :-)

Just in case that really should be a comparison against 0:

login: pmap_clear_reference: pseg empty!
kdb breakpoint at 12454c0
Stopped in pid 7.1 (pagedaemon) at      netbsd:cpu_Debugger+0x4:         nop
db> trace
uvmpd_scan_inactive(18ada90, 1317800, 12ef800, 1, 0, 0) at netbsd:uvmpd_scan_inactive+0x1c8
uvmpd_scan(0, 204, 0, 0, 18adac0, 1317800) at netbsd:uvmpd_scan+0x54
uvm_pageout(c8cc600, 0, 1c09c68, 41724369, a, 188b000) at netbsd:uvm_pageout+0xe0
proc_trampoline(0, 0, 0, 0, 0, 0) at netbsd:proc_trampoline+0x4
db> ps/l
 PID         LID S     FLAGS       STRUCT LWP *            UAREA * WAIT
 24302         1 3       0x4          0xd1f0110          0xcbf4000 uvn_fp1
 13916         1 3      0x84          0xd1f0010          0xcbc2000 wait
 1013          1 3      0x84          0xd1f0510          0xcbf0000 wait
 13523         1 3      0x84          0xc8cd700          0xcb8a000 wait
 3357          1 3      0x84          0xc8cca00          0xcb98000 wait
 2188          1 3      0x84          0xc8cd800          0xd5f4000 wait
 12028         1 3      0x84          0xc8cda00          0xcc08000 wait
 29495         1 3      0x84          0xc8cd900          0xcd06000 wait
 1439          1 3      0x84          0xc8cd000          0xcd0a000 wait
 3818          1 3      0x80          0xc8cd100          0xd50c000 wait
 27640         1 3      0x84          0xd1f1710          0xc91e000 select
 28621         1 3      0x84          0xd1f0410          0xcb94000 pause
 28901         1 3      0x80          0xd1f0a10          0xcb84000 pause
 2523          1 3      0x80          0xd1f0d10          0xd180000 select
 19491         1 3      0x80          0xd1f0310          0xcd00000 netio
 13183         1 3      0x80          0xd1f0910          0xcb34000 ttyin
 424           1 3      0x80          0xc8ccc00          0xd644000 wait
 9175          1 3      0x80          0xc8cd200          0xd762000 wait
 598           1 3      0x84          0xd1f0610          0xd28e000 kqread
 556           1 3      0x80          0xc8cde00          0xd1e4000 wait
 103           1 3      0x80          0xc8cdd00          0xd1d6000 pause
 96            1 3      0x80          0xc8cdc00          0xd1bc000 pause
 542           1 3      0x84          0xc8cdb00          0xd1b4000 select
 459           1 3      0x80          0xc8cc900          0xc918000 ttyin
 438           1 3      0x80          0xc8cd300          0xd146000 select
 379           1 3      0x80          0xc8cd600          0xd16c000 select
 429           1 3      0x80          0xc8cd500          0xd166000 nanosleep
 408           1 3      0x80          0xc8cd400          0xd160000 kqread
 398           1 3      0x84          0xc8cce00          0xcaf8000 select
 368           1 3      0x80          0xc8ccf00          0xcafe000 select
 307           1 3      0x80          0xc8ccb00          0xc92c000 netcon
 210           1 2      0x80          0xc8ccd00          0xcaec000
 9             1 3       0x4          0xc8cc800          0xc8f2000 aiodoned
 8             1 2     0x404          0xc8cc700          0xc8ee000
>How-To-Repeat:
	
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
 >7         >   1 7       0x4          0xc8cc600          0xc8ea000
  6             1 2       0x4          0xc8cc500          0xc8e2000
  5             1 3       0x4          0xc8cc400          0xc8de000 rfwcond
  4             1 3       0x4          0xc8cc300          0xc8d6000 sccomp
  3             1 3       0x4          0xc8cc200          0xc8d2000 smtaskq
  2             1 3       0x4          0xc8cc100          0xc8ce000 crypto_wait
  1             1 3      0x80          0xc8cc000          0xc8b8000 wait
  0             1 2       0x4          0x18a6760          0x1c02000
  22514