On Wed, Feb 02, 2022 at 07:53:59PM +0000, Miod Vallat wrote:
> > Hi,
> >
> > On my sparc64 machine regress/lib/libpthread triggers a panic. It
> > happend with Feb 1 and Jan 31 snapshot. Jan 29 snapshot paniced
> > somewhere else. Test and console output below.
> >
> > *cpu1: pmap_enter: access_type exceeds prot
> >
> > bluhm
>
> Does the following diff help?
Unfortunately not. Same panic.
> Index: uvm_fault.c
> ===================================================================
> RCS file: /OpenBSD/src/sys/uvm/uvm_fault.c,v
> retrieving revision 1.124
> diff -u -p -r1.124 uvm_fault.c
> --- uvm_fault.c 28 Dec 2021 13:16:28 -0000 1.124
> +++ uvm_fault.c 2 Feb 2022 19:53:36 -0000
> @@ -1023,8 +1023,10 @@ uvm_fault_upper(struct uvm_faultinfo *uf
> counters_inc(uvmexp_counters, flt_anon);
> oanon = anon;
> pg = anon->an_page;
> - if (anon->an_ref > 1) /* disallow writes to ref > 1 anons */
> - flt->enter_prot = flt->enter_prot & ~PROT_WRITE;
> + if (anon->an_ref > 1) { /* disallow writes to ref > 1 anons */
> + flt->enter_prot &= ~PROT_WRITE;
> + flt->access_type &= ~PROT_WRITE;
> + }
> }
>
> /*
OpenBSD 7.0-current (GENERIC.MP) #0: Wed Feb 2 22:24:58 CET 2022
[email protected]:/usr/src/sys/arch/sparc64/compile/GENERIC.MP
real mem = 2147483648 (2048MB)
avail mem = 2092720128 (1995MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root: Sun Enterprise 220R (2 X UltraSPARC-II 450MHz)
cpu0 at mainbus0: SUNW,UltraSPARC-II (rev 10.0) @ 450.036 MHz
cpu0: physical 16K instruction (32 b/l), 16K data (32 b/l), 4096K external (64
b/l)
cpu1 at mainbus0: SUNW,UltraSPARC-II (rev 10.0) @ 450.036 MHz
cpu1: physical 16K instruction (32 b/l), 16K data (32 b/l), 4096K external (64
b/l)
psycho0 at mainbus0 addr 0xfffb4000: SUNW,psycho, impl 0, version 4, ign 7c0
psycho0: bus range 0-0, PCI bus 0
psycho0: dvma map fe000000-ffffffff, STC0 enabled
pci0 at psycho0
ebus0 at pci0 dev 1 function 0 "Sun PCIO EBus2" rev 0x01
auxio0 at ebus0 addr 726000-726003, 728000-728003, 72a000-72a003,
72c000-72c003, 72f000-72f003
power0 at ebus0 addr 724000-724003
"SUNW,pll" at ebus0 addr 504000-504002 not configured
uperf0 at ebus0 addr 500000-500007: model SUNW,sc-qp (0/1) ports 9
sab0 at ebus0 addr 400000-40007f ivec 0x2b: rev 3.2
sabtty0 at sab0 port 0: console
sabtty1 at sab0 port 1
comkbd0 at ebus0 addr 3083f8-3083ff ivec 0x29: no keyboard
comms0 at ebus0 addr 3062f8-3062ff ivec 0x2a
wsmouse0 at comms0 mux 0
lpt0 at ebus0 addr 3043bc-3043cb, 300398-300399, 700000-70000f ivec 0x22: polled
clock1 at ebus0 addr 0-1fff: mk48t59
"flashprom" at ebus0 addr 0-fffff not configured
hme0 at pci0 dev 1 function 1 "Sun HME" rev 0x01: ivec 0x7e1, address
08:00:20:c8:d9:25
luphy0 at hme0 phy 1: LU6612 10/100 PHY, rev. 1
siop0 at pci0 dev 3 function 0 "Symbios Logic 53c875" rev 0x14: ivec 0x7e0,
using 4K of on-board RAM
scsibus1 at siop0: 16 targets, initiator 7
sd0 at scsibus1 targ 0 lun 0: <IBM, DDYST3695SUN36G, S96H> naa.5005076507ca32bc
sd0: 34732MB, 512 bytes/sector, 71132959 sectors
sym0 at scsibus1 targ 1 lun 0: <FUJITSU, MAB3091S SUN9.0G, 2107>
serial.FUJITSU_MAB3091S_SUN9.0G00D86741_
sd1 at scsibus0 targ 0 lun 0: <FUJITSU, MAB3091S SUN9.0G, 2107>
serial.FUJITSU_MAB3091S_SUN9.0G00D86741_
sd1: 8637MB, 512 bytes/sector, 17689267 sectors
cd0 at scsibus1 targ 6 lun 0: <TOSHIBA, DVD-ROM SD-M1401, 1007> removable
siop1 at pci0 dev 3 function 1 "Symbios Logic 53c875" rev 0x14: ivec 0x7e6,
using 4K of on-board RAM
scsibus2 at siop1: 16 targets, initiator 7
psycho1 at mainbus0 addr 0xfffc6000: SUNW,psycho, impl 0, version 4, ign 7c0
psycho1: bus range 128-128, PCI bus 128
psycho1: dvma map fe000000-ffffffff, STC0 enabled, STC1 enabled
pci1 at psycho1
em0 at pci1 dev 1 function 0 "Intel 82546GB" rev 0x03: ivec 0x7c0, address
00:1b:21:55:ee:f2
em1 at pci1 dev 1 function 1 "Intel 82546GB" rev 0x03: ivec 0x7c1, address
00:1b:21:55:ee:f3
"counter-timer" at mainbus0 addr 0xfff9fc00 not configured
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
siop0: target 0 now using tagged 16 bit 20.0 MHz 16 REQ/ACK offset xfers
siop0: target 1 now using tagged 16 bit 20.0 MHz 16 REQ/ACK offset xfers
bootpath: /pci@1f,4000/scsi@3,0/disk@0,0
root on sd0a (7d8d67b5cb601172.a) swap on sd0b dump on sd0b
Automatic boot in progress: starting file system checks.
/dev/sd0a (7d8d67b5cb601172.a): file system is clean; not checking
/dev/sd0k (7d8d67b5cb601172.k): file system is clean; not checking
/dev/sd0d (7d8d67b5cb601172.d): file system is clean; not checking
/dev/sd0f (7d8d67b5cb601172.f): file system is clean; not checking
/dev/sd0g (7d8d67b5cb601172.g): file system is clean; not checking
/dev/sd0h (7d8d67b5cb601172.h): file system is clean; not checking
/dev/sd0j (7d8d67b5cb601172.j): file system is clean; not checking
/dev/sd0i (7d8d67b5cb601172.i): file system is clean; not checking
/dev/sd0e (7d8d67b5cb601172.e): file system is clean; not checking
pf enabled
ddb.console: 0 -> 1
ddb.log: 1 -> 0
ddb.max_line: 24 -> 0
ddb.max_width: 80 -> 0
kern.allowdt: 0 -> 1
kern.allowkmem: 0 -> 1
kern.pool_debug: 1 -> 1
kern.splassert: 1 -> 2
sysctl: kern.witnesswatch: value is not available
net.inet.etherip.allow: 0 -> 1
net.inet.ip.forwarding: 0 -> 1
net.inet.ipcomp.enable: 0 -> 1
net.inet.ipip.allow: 0 -> 1
net.inet6.ip6.forwarding: 0 -> 1
vm.malloc_conf: -> CFGJU
starting network
reordering libraries: done.
starting early daemons: syslogd pflogd ntpd.
starting RPC daemons:.
savecore: no core dump
checking quotas: done.
clearing /tmp
kern.securelevel: 0 -> 1
turning on accounting
creating runtime link editor directory cache.
preserving editor files.
starting network daemons: sshd snmpd smtpd sndiod.
starting local daemons: cron.
Wed Feb 2 22:32:05 CET 2022
reorder_kernel: failed -- see /usr/share/relink/kernel/GENERIC.MP/relink.log
OpenBSD/sparc64 (ot21.obsd-lab.genua.de) (console)
login: papniacn:ic: er l dia n c s e t n " a U | r w i e he
d"Stopped at db_enter+0x8: nop f lecce s_ y x e s p o
TID PID UID PRFLAGS PFLAGS CPU COMMAND
258042 16735 0 0 0 0 dlopen
*421752 43177 0 0x2 0x4000000 1 dlopen
pmap_enter(400042f9b00, b023bbc000, 8f9a4000, 1, 23, 1c00) at pmap_enter+0x4ec
uvm_fault_upper(40025f95cd0, 40025f95d08, 40003caf440, 0, 1c17000, 1cca4e0) at
uvm_fault_upper+0x150
uvm_fault(0, 40025f95cd0, 0, 3, 16348e0, 2) at uvm_fault+0x1e8
data_access_fault(40025f95ed0, 6c, b023814c88, b023bbc126, b023bbc310, 800005)
at data_access_fault+0x184
Ldatafault_internal(b023bbc310, 0, 0, 0, 0, 0) at Ldatafault_internal+0xcc
https://www.openbsd.org/ddb.html describes the minimum info required in bug
reports. Insufficient info makes it difficult to find and fix bugs.
ddb{1}> x/s version
version: OpenBSD 7.0-current (GENERIC.MP) #0: Wed Feb 2 22:24:58 CET
2022\012
[email protected]:/usr/src/sys/arch/sparc64/compile/GENERIC.MP\012
ddb{1}> show panic
cpu0: kernel diagnostic assertion "amap == NULL ||
rw_write_held(amap->am_lock)" failed: file "/usr/src/sys/uvm/uvm_fault.c", line
837
*cpu1: pmap_enter: access_type exceeds prot
ddb{1}> trace
pmap_enter(400042f9b00, b023bbc000, 8f9a4000, 1, 23, 1c00) at pmap_enter+0x4ec
uvm_fault_upper(40025f95cd0, 40025f95d08, 40003caf440, 0, 1c17000, 1cca4e0) at
uvm_fault_upper+0x150
uvm_fault(0, 40025f95cd0, 0, 3, 16348e0, 2) at uvm_fault+0x1e8
data_access_fault(40025f95ed0, 6c, b023814c88, b023bbc126, b023bbc310, 800005)
at data_access_fault+0x184
Ldatafault_internal(b023bbc310, 0, 0, 0, 0, 0) at Ldatafault_internal+0xcc
ddb{1}> show register
tstate 0x80000605
pc 0x1171fc8 db_enter+0x8
npc 0x1171fcc db_enter+0xc
ipl 0xc
y 0
g0 0
g1 0x1c22000 zs_consdev+0x30
g2 0x1
g3 0
g4 0
g5 0x4002a7f8000
g6 0
g7 0xe0018000
o0 0x2c
o1 0x4002a7f8964
o2 0x17afa50 __func__.8629+0x638
o3 0x40025f959f8
o4 0x47cd2
o5 0
o6 0x40025f94fd1
o7 0x1543cac panic+0xcc
l0 0x4002a7f8140
l1 0x126
l2 0
l3 0x1ca2008 kernel_pmap_
l4 0x1ca1000 rwlock_obj_pool+0x50
l5 0x1ca1000 rwlock_obj_pool+0x50
l6 0x1
l7 0x1ca1000 rwlock_obj_pool+0x50
i0 0
i1 0
i2 0
i3 0
i4 0
i5 0
i6 0
i7 0
f0 0
f2 0
f4 0
f6 0
f8 0
f10 0
f12 0
f14 0
f16 0
f18 0
f20 0
f22 0
f24 0
f26 0
f28 0
f30 0
f32 0
f34 0
f36 0
f38 0
f40 0
f42 0
f44 0
f46 0
f48 0
f50 0
f52 0
f54 0
f56 0
f58 0
f60 0
f62 0
fsr 0
gsr 0
db_enter+0x8: nop
ddb{1}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
16735 258042 43177 0 7 0 dlopen
43177 388819 63994 0 3 0x82 fsleep dlopen
*43177 421752 63994 0 7 0x4000002 dlopen
63994 308424 19364 0 3 0x10008a sigsusp make
19364 106251 2514 0 3 0x10008a sigsusp sh
2514 437350 34409 0 3 0x10008a sigsusp make
34409 21732 63395 0 3 0x10008a sigsusp sh
63395 195045 21742 0 3 0x10008a sigsusp make
88345 37144 68957 0 3 0x100082 piperd gzip
68957 117175 21742 0 3 0x100082 piperd pax
21742 348354 52545 0 3 0x82 piperd perl
52545 253184 18815 0 3 0x10008a sigsusp ksh
18815 342784 66380 0 3 0x9a poll sshd
89398 231259 1 0 2 0x100083 getty
73154 84833 1 0 2 0x100498 cron
88449 498895 1 99 3 0x100090 poll sndiod
88050 431908 1 110 3 0x100090 poll sndiod
13344 132231 32315 95 3 0x100092 kqread smtpd
47541 185283 32315 103 3 0x100092 kqread smtpd
40602 347785 32315 95 3 0x100092 kqread smtpd
82793 282149 32315 95 3 0x100092 kqread smtpd
28709 434625 32315 95 3 0x100092 kqread smtpd
65024 354909 32315 95 3 0x100092 kqread smtpd
32315 397394 1 0 3 0x100080 kqread smtpd
73689 295077 1 0 3 0x100080 kqread snmpd
47815 367190 1 91 2 0x492 snmpd
66380 137417 1 0 3 0x88 poll sshd
73221 233011 0 0 2 0x14600 acct
23265 96930 0 0 3 0x14280 nfsidl nfsio
42873 76728 0 0 3 0x14280 nfsidl nfsio
88666 265314 0 0 3 0x14280 nfsidl nfsio
67556 370295 0 0 3 0x14280 nfsidl nfsio
82700 305165 1 0 3 0x100080 poll ntpd
73354 8642 74099 83 3 0x100092 poll ntpd
74099 44293 1 83 3 0x100092 poll ntpd
4427 455365 89338 74 2 0x100492 pflogd
89338 116181 1 0 3 0x80 netio pflogd
70249 153313 24172 73 2 0x100490 syslogd
24172 167149 1 0 3 0x100082 netio syslogd
92299 17221 1 0 3 0x100080 kqread resolvd
22486 442258 60603 77 3 0x100092 kqread dhcpleased
62050 68910 60603 77 3 0x100092 kqread dhcpleased
60603 21299 1 0 3 0x80 kqread dhcpleased
79320 264062 46770 115 3 0x100092 kqread slaacd
772 437260 46770 115 3 0x100092 kqread slaacd
46770 498028 1 0 3 0x100080 kqread slaacd
97913 222781 0 0 3 0x14200 bored smr
22322 192425 0 0 2 0x14200 zerothread
78559 340483 0 0 3 0x14200 aiodoned aiodoned
26373 261758 0 0 2 0x14600 update
20492 13942 0 0 3 0x14200 cleaner cleaner
91472 188599 0 0 3 0x14200 reaper reaper
29360 334085 0 0 3 0x14200 pgdaemon pagedaemon
71200 122638 0 0 3 0x40014200 idle1
61084 115806 0 0 2 0x14200 softnet
85336 501133 0 0 2 0x14200 systqmp
16497 269672 0 0 2 0x14200 systq
35975 398838 0 0 2 0x40014200 softclock
51463 416530 0 0 3 0x40014200 idle0
52535 233539 0 0 3 0x14200 kmalloc kmthread
1 431358 0 0 3 0x82 wait init
0 0 -1 0 2 0x10200 swapper
ddb{1}> mach ddbcpu 0
Here it hangs