On Mon, 28 Mar 2022 13:35:48 +0200 Alexander Bluhm <alexander.bl...@gmx.net> wrote:
> Hi, > > There was a discussion about file system bugs with macppc. My dual > core macppc never completed a make release. I get various panics. > One of them is below. > > bluhm I have a macppc of the same model (dual G5 PowerMac7,3), which has 5 times did "panic: vref used where vget required", on 2021-10-18, 2022-02-10, 2022-03-09, 2022-03-18, 2022-03-19. Most of these happened after powerpc/pmap.c r1.176 2022-02-07 fixed the DSISR_STORE problem, which was the reason for most of my G5's panics and freezes before 2022-02. Bluhm, I have seen your other mails to bugs (macppc panic: pool_do_get: namei free list modified 2022-02-23; macppc panic: trap type 300... 2022-03-15), but I might not reproduce them while this vref panic is in the way. > panic: vref used where vget required > Stopped at db_enter+0x24: lwz r11,12(r1) > TID PID UID PRFLAGS PFLAGS CPU COMMAND > 192060 78628 21 0x2 0 0 c++ > *132472 74971 0 0x14000 0x200 1K pagedaemon > db_enter() at db_enter+0x20 > panic(91373c) at panic+0x158 > vref(23b8fa20) at vref+0xac > uvm_vnp_uncache(e7eb7c50) at uvm_vnp_uncache+0x88 > ffs_write(7ed2e423) at ffs_write+0x3b0 > VOP_WRITE(23b8fa20,e7eb7c50,40,1ff3f60) at VOP_WRITE+0x48 > uvn_io(7ed2e423,a93d0c,a93814,ffffffff,e4010000) at uvn_io+0x264 > uvn_put(414b673a,e7eb7dd4,24f00070,5326e90) at uvn_put+0x64 > uvm_pager_put(0,0,e7eb7d70,6ee0b8,2000000,80000000,0) at uvm_pager_put+0x15c > uvmpd_scan_inactive(0) at uvmpd_scan_inactive+0x224 > uvmpd_scan() at uvmpd_scan+0x158 > uvm_pageout(7e932633) at uvm_pageout+0x398 > fork_trampoline() at fork_trampoline+0x14 > end trace frame: 0x0, count: 2 > https://www.openbsd.org/ddb.html describes the minimum info required in bug > reports. Insufficient info makes it difficult to find and fix bugs. The vref panic is always this list of functions. Here's my trace from 2022-03-18. I don't have a serial console, I might have made typos when I copied the trace by hand, virginia$ panic: vref used where vget required Stopped at db_enter+0x24: lwz r11,12(r1) TID PID UID PRFLAGS PFLAGS CPU COMMAND 283923 10860 21 0x3 0 1 c++ *484876 54131 0 0x14000 0x200 0K pagedaemon db_enter() at db_enter+x20 panic(91a30a) at panic+0x158 vref(7f3eda28) at vref+0xac uvm_vnp_uncache(e7e72c50) at uvm_vnp_uncache+0x88 ffs_write(a7fbd8) at ffs_write+0x3b0 VOP_WRITE(7f3eda28,e7e72c50,40,1ff3f60) at VOP_WRITE+0x48 uvn_io(366b2a1,7f41b28,e7e72dd0,90,e40100000) at uvn_io+0x264 uvn_put(316e9fa6,e7e72dd4,7f41b28,56167c0) at uvn_put+0x64 uvn_pager_put(0,0,e7e72d70,4c92c4,56167fc,800000000,0) at uvm_pager_put+0x15c uvmpd_scan_inactive(0) at uvmpd_scan_inactive+0x224 uvmpd_scan() at uvmpd_scan+0x158 uvm_pageout(0) at uvm_pageout+0x398 fork_trampoline() at fork_trampoline+0x14 end trace frame: 0x0, count: 2 https://www.openbsd.org/ddb.html ... Here, cpu0 is in pagedaemon and cpu1 is running c++ to build clang. The same panic can also happen with cpu1 in pagedaemon and cpu0 being idle (because ld is waiting for io). For this panic, I found the vnode pointer. Disassembly with x/i showed that vref(vp) put vp in register r30, and panic("vref ...") put r30 in 72(r1). I found panic's 72(r1) = 7f3eda28. (So this trace's "vref(7f3eda28)" was correct. I have not been trusting function arguments in powerpc traces.) ddb{0}> show struct vnode 7f3eda28 struct vnode at 0x7f3eda28 (136 bytes) {vj_uvm = \ (struct uvm_vnode *)0x7f4f1b28, v_op = (const vops *)0xa63cc0, v_type = 1, \ v_tag = 1, v_flag = 0x0, v_lflag = 0x0, v_usecount = 0x0, v_uvcount = 0x0, \ v_lockcount = 0x0, v_bioflag = 0x4, v_holdcnt = 0x343, v_id = 0x39eec, \ v_mount = (struct mount *)0xe3fff400, ...} ddb{0}> print/a 0a63cc0 ffs_vops This looks like a real vnode, with vp->v_op == &ffs_vops. If it didn't look real, I might have suspected a pmap problem, like a corrupt page table entry for 7f3eda28. Because the vnode looks real, there is less chance of a pmap problem. I had a diff in my pmap.c that didn't prevent this vref panic. I see these vref panics on my G5s, but I don't see them on the G4s that run the powerpc bulk package builds. --George [ using 1329140 bytes of bsd ELF symbol table ] console out [NVDA,Display-B] console in [keyboard], using USB using parent NVDA,Parent:: memaddr a0000000, size 10000000 : consaddr a0020000 : ioaddr 92000000, size 1000000: width 1600 linebytes 2048 height 900 depth 8 Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2022 OpenBSD. All rights reserved. https://www.OpenBSD.org OpenBSD 7.1-beta (GENERIC.MP) #0: Sat Mar 19 18:20:02 EDT 2022 kern...@virginia.my.domain:/usr/src/sys/arch/macppc/compile/GENERIC.MP real mem = 2147483648 (2048MB) avail mem = 2037161984 (1942MB) random: good seed from bootblocks mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root: model PowerMac7,3 cpu0 at mainbus0: 970FX (Revision 0x301): 2700 MHz cpu1 at mainbus0: 970FX (Revision 0x301): 2700 MHz mem0 at mainbus0 spdmem0 at mem0: 512MB DDR SDRAM non-parity PC3200CL3.0 spdmem1 at mem0: 512MB DDR SDRAM non-parity PC3200CL3.0 spdmem2 at mem0: 1GB DDR SDRAM non-parity PC3200CL2.5 spdmem3 at mem0: 1GB DDR SDRAM non-parity PC3200CL2.5 spdmem4 at mem0: 512MB DDR SDRAM non-parity PC3200CL2.5 spdmem5 at mem0: 512MB DDR SDRAM non-parity PC3200CL2.5 spdmem6 at mem0: 512MB DDR SDRAM non-parity PC3200CL3.0 spdmem7 at mem0: 512MB DDR SDRAM non-parity PC3200CL3.0 memc0 at mainbus0: u3 rev 0x35 kiic0 at memc0 offset 0xf8001000 iic0 at kiic0 "pulsar-legacy-slewing" at iic0 addr 0x6a not configured lmtemp0 at iic0 addr 0x4a: ds1775 maxtmp0 at iic0 addr 0x4c: max6690 maxds0 at iic0 addr 0x4b: ds1631i2c_poll: timeout , starting fcu0 at iic0 addr 0xaf "pca9556" at iic0 addr 0x18 not configured adc0 at iic0 addr 0x2c: ad7417 "24256" at iic0 addr 0x50 not configured "pca9556" at iic0 addr 0x19 not configured adc1 at iic0 addr 0x2d: ad7417 "24256" at iic0 addr 0x51 not configured "dart" at memc0 offset 0xf8033000 not configured "mpic" at memc0 offset 0xf8040000 not configured mpcpcibr0 at mainbus0 pci: u3-agp pci0 at mpcpcibr0 bus 0 pchb0 at pci0 dev 11 function 0 "Apple K2 AGP" rev 0x00 appleagp0 at pchb0 agp0 at appleagp0: aperture at 0x0, size 0x10000000 vgafb0 at pci0 dev 16 function 0 vendor "NVIDIA", unknown product 0x0045 rev 0xa1 wsdisplay0 at vgafb0 mux 1: console (std, vt100 emulation) wsdisplay0: screen 1-5 added (std, vt100 emulation) ht0 at mainbus0: u3-ht, 8 devices pci1 at ht0 bus 0 hpb0 at pci1 dev 1 function 0 "AMD 8131 PCIX" rev 0x12: 3 sources hpb0: multiple definition for irq 0 pci2 at hpb0 bus 6 hpb1 at pci1 dev 2 function 0 "AMD 8131 PCIX" rev 0x12: 3 sources hpb1: multiple definition for irq 0 pci3 at hpb1 bus 7 hpb2 at pci1 dev 3 function 0 "Apple U3" rev 0x00: 85 sources pci4 at hpb2 bus 1 macobio0 at pci4 dev 7 function 0 "Apple K2 Macio" rev 0x60 openpic0 at macobio0 offset 0x40000: version 0x4614 feature 770302 LE macgpio0 at macobio0 offset 0x50 "pmu-interrupt" at macgpio0 offset 0x9 not configured "programmer-switch" at macgpio0 offset 0x11 not configured "modem-reset" at macgpio0 offset 0x1d not configured "modem-power" at macgpio0 offset 0x1e not configured "chip-fault" at macgpio0 offset 0x1c not configured "fcu-interrupt" at macgpio0 offset 0x15 not configured "fcu-hw-reset" at macgpio0 offset 0x3a not configured "slewing-done" at macgpio0 offset 0x23 not configured "line-input-detect" at macgpio0 offset 0xc not configured "dig-hw-reset" at macgpio0 offset 0x14 not configured "line-output-detect" at macgpio0 offset 0x16 not configured "headphone-detect" at macgpio0 offset 0x17 not configured "codec-input-data-mux" at macgpio0 offset 0xb not configured "codec-error-irq" at macgpio0 offset 0xd not configured "codec-irq" at macgpio0 offset 0x18 not configured "headphone-mute" at macgpio0 offset 0x1f not configured "amp-mute" at macgpio0 offset 0x20 not configured "hw-reset" at macgpio0 offset 0x24 not configured "line-output-mute" at macgpio0 offset 0x25 not configured "codec-clock-mux" at macgpio0 offset 0x26 not configured "escc-legacy" at macobio0 offset 0x12000 not configured zs0 at macobio0 offset 0x13000: irq 22,23 zstty0 at zs0 channel 0 zstty1 at zs0 channel 1 kiic1 at macobio0 offset 0x18000 iic1 at kiic1 aoa0 at macobio0 offset 0x10000: irq 30,1,2 "timer" at macobio0 offset 0x15000 not configured adb0 at macobio0 offset 0x16000 apm0 at adb0: battery flags 0x9, 0% charged piic0 at adb0 iic2 at piic0 "fans" at macobio0 offset 0x4c not configured audio0 at aoa0 ohci0 at pci4 dev 8 function 0 "Apple K2 USB" rev 0x00: irq 27, version 1.0, legacy support ohci1 at pci4 dev 9 function 0 "Apple K2 USB" rev 0x00: irq 28, version 1.0, legacy support usb0 at ohci0: USB revision 1.0 uhub0 at usb0 configuration 1 interface 0 "Apple OHCI root hub" rev 1.00/1.00 addr 1 usb1 at ohci1: USB revision 1.0 uhub1 at usb1 configuration 1 interface 0 "Apple OHCI root hub" rev 1.00/1.00 addr 1 ppb0 at pci1 dev 4 function 0 "Apple U3" rev 0x00 pci5 at ppb0 bus 2 ohci2 at pci5 dev 11 function 0 "NEC USB" rev 0x43: irq 63, version 1.0 ohci3 at pci5 dev 11 function 1 "NEC USB" rev 0x43: irq 63, version 1.0 ehci0 at pci5 dev 11 function 2 "NEC USB" rev 0x04: irq 63 usb2 at ehci0: USB revision 2.0 uhub2 at usb2 configuration 1 interface 0 "NEC EHCI root hub" rev 2.00/1.00 addr 1 usb3 at ohci2: USB revision 1.0 uhub3 at usb3 configuration 1 interface 0 "NEC OHCI root hub" rev 1.00/1.00 addr 1 usb4 at ohci3: USB revision 1.0 uhub4 at usb4 configuration 1 interface 0 "NEC OHCI root hub" rev 1.00/1.00 addr 1 ppb1 at pci1 dev 5 function 0 "Apple U3" rev 0x00 pci6 at ppb1 bus 3 kauaiata0 at pci6 dev 13 function 0 "Apple K2 ATA" rev 0x00 wdc0 at kauaiata0 irq 39: DMA atapiscsi0 at wdc0 channel 0 drive 0 scsibus1 at atapiscsi0: 2 targets cd0 at scsibus1 targ 0 lun 0: <SONY, DVD RW DW-Q28A, KAS7> removable cd0(wdc0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 4 "Apple K2 Firewire" rev 0x00 at pci6 dev 14 function 0 not configured ppb2 at pci1 dev 6 function 0 "Apple U3" rev 0x00 pci7 at ppb2 bus 4 gem0 at pci7 dev 15 function 0 "Apple K2 GMAC" rev 0x00: irq 41, address 00:11:24:cb:e4:ae brgphy0 at gem0 phy 1: BCM54K2 10/100/1000baseT PHY, rev. 0 ppb3 at pci1 dev 7 function 0 "Apple U3" rev 0x00 pci8 at ppb3 bus 5 pciide0 at pci8 dev 12 function 0 "ServerWorks K2 SATA" rev 0x00: DMA pciide0: using irq 0 for native-PCI interrupt pciide0: port 0: 1.5Gb/s wd0 at pciide0 channel 0 drive 0: <WDC WD8000AARS-00Y5B1> wd0: 16-sector PIO, LBA48, 763097MB, 1562824368 sectors wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 6 pciide0: port 1: PHY offline pciide0: port 2: PHY offline pciide0: port 3: PHY offline uhub5 at uhub4 port 2 configuration 1 interface 0 "Mitsumi Electric Hub in Apple Extended USB Keyboard" rev 1.10/1.22 addr 2 uhidev0 at uhub5 port 1 configuration 1 interface 0 "Mitsumi Electric Apple Extended USB Keyboard" rev 1.10/1.22 addr 3 uhidev0: iclass 3/1 ukbd0 at uhidev0: 8 variable keys, 6 key codes wskbd0 at ukbd0: console keyboard, using wsdisplay0 uhidev1 at uhub5 port 1 configuration 1 interface 1 "Mitsumi Electric Apple Extended USB Keyboard" rev 1.10/1.22 addr 3 uhidev1: iclass 3/0, 3 report ids uhid0 at uhidev1 reportid 2: input=1, output=0, feature=0 ucc0 at uhidev1 reportid 3: 12 usages, 10 keys, enum wskbd1 at ucc0 mux 1 wskbd1: connecting to wsdisplay0 uhidev2 at uhub5 port 2 configuration 1 interface 0 "Logitech USB-PS/2 Optical Mouse" rev 2.00/11.10 addr 4 uhidev2: iclass 3/1 ums0 at uhidev2: 3 buttons, Z dir wsmouse0 at ums0 mux 0 vscsi0 at root scsibus2 at vscsi0: 256 targets softraid0 at root scsibus3 at softraid0: 256 targets bootpath: /ht/pci@7/k2-sata-root/k2-sata@0/disk@0:/bsd root on wd0a (190f7887c49c54f8.a) swap on wd0b dump on wd0b WARNING: bad clock chip time WARNING: CHECK AND RESET THE DATE!