kir...@korins.ky writes:

>>Synopsis:     Start VM leads to increased CPU usage and crash at the end
>>Category:     vmd
>>Environment:
>       System      : OpenBSD 7.5
>       Details     : OpenBSD 7.5-current (GENERIC.MP) #138: Mon May 20 
> 17:02:52 WEST 2024
>                        
> catap@matebook.local:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>
>       Architecture: OpenBSD.amd64
>       Machine     : amd64
>>Description:
>
>       My machine had an uptime for about a day with a lot of zzz between
>     active session of using it. When I've restarted VM with alpine linux
>     to run docker it consume a lot of CPU by ungoogled-chrome and Xorg.

You're running Xorg and Chrome inside your Alpine guest? You'll need to
look at what Linux is saying is consuming CPU. I would not be surprised
if the performance sucks as vmd is uniprocessor and without any details
I can only assume Chrome is using a lot of memory and swapping to disk
while also creating a lot of network IO.

>     An attempt to close chrome leads to a crash with stack trace (I took
>     a photo and OCR it, so, text bellow may contains errors):
>

Again...what chrome process? Is this X11 forwarding from the guest? It's
not clear how to reproduce this. It's not clear where this chrome
process is running.

> um_fault(0xfffffd830a5c180, 0x60, 0, 1) -> e
> kernel: page fault trap, code=0
> Stopped at
> bread+0x2a:
> TID
> PID
> UID
> testg
> $0x180, 0x60(%rax)
> PRFLAGS
> PFLAGS
> CPU
> COMMAND
> *338890
> 14142
> 35
> 0x18000012
> 0
> 2K
> Xorg
> 7678
> 70466
> 0
> 0x14000
> 0x200
> 0
> zerothread
> 354807
> 7379
> 0
> 0x14000
> 0x200
> 3
> reaper
> 73778
> 77774
> 0x14000
> 0x200
> 1
> srdis

Which process is running when the panic happens? I can't tell from the
text above since it's a bit mangled. Is it Xorg? Run "show proc" in ddb
and share the details.

> bread(fffff083e6b31b10,140,4000, ffff80004bc65a48)
> at bread+0x2a
> ffs_update(fffffd832b660d20,1) at ffs_update+0xf4
> ffs_truncate(fffffd832b660d20,0,0, ffffffffffffffff) at ffs_truncate+0x5b9
> ufs_inactive(ffff80004bc65ce8) at
> ufs_inactive+0xc1
> VOP INACTIVE(fffffd81a868490, ffff80004bd7a058) at VOP_INACTIUE+0x4b
> vput(fffffd81a868b90) at vput+0x5c
> un_closefile(fffff081442db1f8,ffff80004bd7a058) at un_closefile+0xa8
> fdrop(fffffd81442db1f8, ffff80004bd7a058) at fdrop+0x93
> closef(fffffd81442db1f8,ffff80004bd7a058) at closef+0xaf
> syscall(ffff80004bc65f00) at syscall+0x588
> XsyscallO at Xsyscall+0x128
> end of kernel
> end trace frame: 0x71ceee5b3930, count: 4
> 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{2}>
>
>       Anyway, it was the first crash, usually I was able to reboot machine
>       which helps. Kills X11 doesn't help. Nor rcctl restart vmd.
>
>     I've seen that issue for weeks, and it happens not on the first
>     start of VM, I need a few cycle during machine uptime. The last time
>     it had happened after reboot inside VM, not via vmctl.
>
>       I do use sync option with softraid with encryption of local disk,
>       and both VM drives is kept on such disks. The second drive is quite
>       large (100G), and the first one is realitly small (5G).
>
>       I run custom kernel with patche for powersave policy, anyway, I had
>       noticed that issues (CPU usage after start / restart of VM) on
>       original kernel as well.
>
>>How-To-Repeat:
>       Restart VM multiple times.
>>Fix:
>       I have no idea.
>
>
> /etc/fstab:
> 6d5c66ecfe7a989c.b none swap sw
> 6d5c66ecfe7a989c.a / ffs rw,sync,noatime 1 1
> 6d5c66ecfe7a989c.p /home ffs rw,nodev,nosuid,sync,noatime 1 2
> 6d5c66ecfe7a989c.d /tmp ffs rw,nodev,nosuid,sync,noatime 1 2
> 6d5c66ecfe7a989c.f /usr ffs rw,nodev,sync,noatime 1 2
> 6d5c66ecfe7a989c.g /usr/X11R6 ffs rw,nodev,sync,noatime 1 2
> 6d5c66ecfe7a989c.h /usr/local ffs rw,wxallowed,nodev,sync,noatime 1 2
> 6d5c66ecfe7a989c.k /usr/obj ffs rw,nodev,nosuid,async,noatime 1 2
> 6d5c66ecfe7a989c.l /usr/ports ffs rw,nodev,nosuid,sync,noatime 1 2
> 6d5c66ecfe7a989c.m /usr/ports/pobj ffs 
> rw,wxallowed,nodev,nosuid,async,noatime 1 2
> 6d5c66ecfe7a989c.j /usr/src ffs rw,nodev,nosuid,sync,noatime 1 2
> 6d5c66ecfe7a989c.n /usr/xenocara ffs rw,nodev,nosuid,sync,noatime 1 2
> 6d5c66ecfe7a989c.o /usr/xobj ffs rw,nodev,nosuid,async,noatime 1 2
> 6d5c66ecfe7a989c.e /var ffs rw,nodev,nosuid,sync,noatime 1 2
>
>
> /etc/vm.conf:
> switch "local" {
>        interface bridge0
> }
>
> vm "docker" {
>       disable
>       memory 5G
>
>       disk "/var/vm/docker-sys.qcow2"
>       disk "/home/catap/VMs/docker-data.qcow2"
>
>       interface {
>               switch "local"
>               lladdr 36:25:37:36:25:37
>       }
>
>       owner catap
> }
>
>
> dmesg:
> OpenBSD 7.5-current (GENERIC.MP) #138: Mon May 20 17:02:52 WEST 2024
>     catap@matebook.local:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 16890646528 (16108MB)
> avail mem = 16357482496 (15599MB)
> random: good seed from bootblocks
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 3.2 @ 0x8e2c2000 (32 entries)
> bios0: vendor HUAWEI version "1.10" date 01/12/2023
> bios0: HUAWEI EUL-WX9
> efi0 at bios0: UEFI 2.7
> efi0: XXXXXX rev 0x10010
> acpi0 at bios0: ACPI 5.1
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP UEFI SSDT SSDT SSDT SSDT SSDT TPM2 SSDT MSDM LPIT 
> WSMT SSDT DBGP DBG2 SSDT NHLT HPET APIC MCFG SSDT SSDT DMAR FPDT BGRT
> acpi0: wakeup devices XHC_(S3) XDCI(S4) HDAS(S4) RP01(S4) PXSX(S4) RP02(S4) 
> PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4) RP05(S4) PXSX(S4) RP06(S4) 
> PXSX(S4) RP07(S4) [...]
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpihpet0 at acpi0: 23999999 Hz
> acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz, 3292.33 MHz, 06-8e-0c, patch 
> 000000fa
> cpu0: cpuid 1 
> edx=bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
>  
> ecx=77fafbbf<SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND>
> cpu0: cpuid 6 eax=27f7<SENSOR,ARAT> ecx=9<EFFFREQ>
> cpu0: cpuid 7.0 
> ebx=29c67af<FSGSBASE,TSC_ADJUST,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT>
>  edx=bc000600<SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD>
> cpu0: cpuid a vers=4, gp=4, gpwidth=48, ff=3, ffwidth=48
> cpu0: cpuid d.1 eax=f<XSAVEOPT,XSAVEC,XGETBV1,XSAVES>
> cpu0: cpuid 80000001 edx=2c100800<NXE,PAGE1GB,RDTSCP,LONG> 
> ecx=121<LAHF,ABM,3DNOWP>
> cpu0: cpuid 80000007 edx=100<ITSC>
> cpu0: msr 
> 10a=a0a0c2b<IBRS_ALL,SKIP_L1DFL,MDS_NO,MISC_PKG_CT,ENERGY_FILT,FB_CLEAR,RRSBA,GDS_CTRL,RFDS_NO>
> cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 
> 64b/line 4-way L2 cache, 6MB 64b/line 12-way L3 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> cpu0: apic clock running at 24MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
> cpu1 at mainbus0: apid 2 (application processor)
> cpu1: Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz, 3292.33 MHz, 06-8e-0c, patch 
> 000000fa
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 4 (application processor)
> cpu2: Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz, 3181.16 MHz, 06-8e-0c, patch 
> 000000fa
> cpu2: smt 0, core 2, package 0
> cpu3 at mainbus0: apid 6 (application processor)
> cpu3: Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz, 3003.82 MHz, 06-8e-0c, patch 
> 000000fa
> cpu3: smt 0, core 3, package 0
> cpu4 at mainbus0: apid 1 (application processor)
> cpu4: Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz, 2821.88 MHz, 06-8e-0c, patch 
> 000000fa
> cpu4: smt 1, core 0, package 0
> cpu5 at mainbus0: apid 3 (application processor)
> cpu5: Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz, 2662.55 MHz, 06-8e-0c, patch 
> 000000fa
> cpu5: smt 1, core 1, package 0
> cpu6 at mainbus0: apid 5 (application processor)
> cpu6: Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz, 2553.20 MHz, 06-8e-0c, patch 
> 000000fa
> cpu6: smt 1, core 2, package 0
> cpu7 at mainbus0: apid 7 (application processor)
> cpu7: Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz, 2444.78 MHz, 06-8e-0c, patch 
> 000000fa
> cpu7: smt 1, core 3, package 0
> ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 120 pins
> acpimcfg0 at acpi0
> acpimcfg0: addr 0xe0000000, bus 0-255
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus -1 (RP01)
> acpiprt2 at acpi0: bus -1 (RP02)
> acpiprt3 at acpi0: bus -1 (RP03)
> acpiprt4 at acpi0: bus -1 (RP04)
> acpiprt5 at acpi0: bus -1 (RP05)
> acpiprt6 at acpi0: bus -1 (RP06)
> acpiprt7 at acpi0: bus -1 (RP07)
> acpiprt8 at acpi0: bus -1 (RP08)
> acpiprt9 at acpi0: bus 1 (RP09)
> acpiprt10 at acpi0: bus -1 (RP10)
> acpiprt11 at acpi0: bus -1 (RP11)
> acpiprt12 at acpi0: bus -1 (RP12)
> acpiprt13 at acpi0: bus -1 (RP13)
> acpiprt14 at acpi0: bus -1 (RP14)
> acpiprt15 at acpi0: bus -1 (RP15)
> acpiprt16 at acpi0: bus -1 (RP16)
> acpiprt17 at acpi0: bus -1 (RP17)
> acpiprt18 at acpi0: bus -1 (RP18)
> acpiprt19 at acpi0: bus -1 (RP19)
> acpiprt20 at acpi0: bus -1 (RP20)
> acpiprt21 at acpi0: bus -1 (RP21)
> acpiprt22 at acpi0: bus -1 (RP22)
> acpiprt23 at acpi0: bus -1 (RP23)
> acpiprt24 at acpi0: bus -1 (RP24)
> acpiec0 at acpi0
> acpipci0 at acpi0 PCI0: 0x00000000 0x00000011 0x00000001
> "WDT0001" at acpi0 not configured
> acpials0 at acpi0: ALSD
> acpicmos0 at acpi0
> pchgpio0 at acpi0 GPI0 addr 0xfd6e0000/0x10000 0xfd6d0000/0x10000 
> 0xfd6a0000/0x10000 irq 14, 320 pins
> "ELAN2604" at acpi0 not configured
> "NTAG0001" at acpi0 not configured
> "06CB" at acpi0 not configured
> acpibtn0 at acpi0: PWRB
> acpiac0 at acpi0: AC unit online
> acpibat0 at acpi0: BAT1 model "HB30B1W8ECW-31T" serial 1082 type LION oem 
> "Sunwoda-H"
> acpibtn1 at acpi0: LID0
> "PNP0C14" at acpi0 not configured
> "INT0E0C" at acpi0 not configured
> "INT33A1" at acpi0 not configured
> "BTF0001" at acpi0 not configured
> "INT3400" at acpi0 not configured
> "INT3403" at acpi0 not configured
> "INT3403" at acpi0 not configured
> "INT3403" at acpi0 not configured
> "INT3403" at acpi0 not configured
> "INT3403" at acpi0 not configured
> tpm0 at acpi0 TPM_ 2.0 (CRB) addr 0xfed40000/0x5000, device 0x00000000 rev 0x0
> "PNP0C14" at acpi0 not configured
> acpipwrres0 at acpi0: BTPR, resource for HS10
> acpipwrres1 at acpi0: USBC, resource for XDCI
> acpipwrres2 at acpi0: V0PR
> acpipwrres3 at acpi0: V1PR
> acpipwrres4 at acpi0: V2PR
> acpipwrres5 at acpi0: WRST
> acpicpu0 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), 
> C1(1000@1 mwait.1), PSS
> acpicpu1 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), 
> C1(1000@1 mwait.1), PSS
> acpicpu2 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), 
> C1(1000@1 mwait.1), PSS
> acpicpu3 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), 
> C1(1000@1 mwait.1), PSS
> acpicpu4 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), 
> C1(1000@1 mwait.1), PSS
> acpicpu5 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), 
> C1(1000@1 mwait.1), PSS
> acpicpu6 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), 
> C1(1000@1 mwait.1), PSS
> acpicpu7 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), 
> C1(1000@1 mwait.1), PSS
> acpitz0 at acpi0: critical temperature is 98 degC
> acpivideo0 at acpi0: GFX0
> acpivout0 at acpivideo0: DD1F
> cpu0: Enhanced SpeedStep 3292 MHz: speeds: 2101, 2100, 2000, 1900, 1700, 
> 1600, 1500, 1400, 1200, 1100, 1000, 800, 700, 600, 500, 400 MHz
> pci0 at mainbus0 bus 0
> pchb0 at pci0 dev 0 function 0 "Intel Core 10G Host" rev 0x0c
> inteldrm0 at pci0 dev 2 function 0 "Intel UHD Graphics" rev 0x02
> drm0 at inteldrm0
> inteldrm0: msi, COMETLAKE, gen 9
> "Intel Core 6G Thermal" rev 0x0c at pci0 dev 4 function 0 not configured
> "Intel Core GMM" rev 0x00 at pci0 dev 8 function 0 not configured
> pchtemp0 at pci0 dev 18 function 0 "Intel 400 Series Thermal" rev 0x00
> xhci0 at pci0 dev 20 function 0 "Intel 400 Series xHCI" rev 0x00: msi, xHCI 
> 1.10
> usb0 at xhci0: USB revision 3.0
> uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 
> addr 1
> "Intel 400 Series Shared SRAM" rev 0x00 at pci0 dev 20 function 2 not 
> configured
> iwx0 at pci0 dev 20 function 3 "Intel Wi-Fi 6 AX201" rev 0x00, msix
> dwiic0 at pci0 dev 21 function 0 "Intel 400 Series I2C" rev 0x00: apic 2 int 
> 16
> iic0 at dwiic0
> ihidev0 at iic0 addr 0x15 gpio 170, vendor 0x4f3 product 0x3114, ELAN2604
> ihidev0: 92 report ids
> imt0 at ihidev0: clickpad, 5 contacts
> wsmouse0 at imt0 mux 0
> ims0 at ihidev0 reportid 1: 2 buttons
> wsmouse1 at ims0 mux 0
> hid at ihidev0 reportid 5 not configured
> hid at ihidev0 reportid 6 not configured
> hid at ihidev0 reportid 7 not configured
> hid at ihidev0 reportid 8 not configured
> hid at ihidev0 reportid 11 not configured
> hid at ihidev0 reportid 12 not configured
> hid at ihidev0 reportid 13 not configured
> ims1 at ihidev0 reportid 14: 0 buttons
> wsmouse2 at ims1 mux 0
> hid at ihidev0 reportid 21 not configured
> hid at ihidev0 reportid 22 not configured
> hid at ihidev0 reportid 23 not configured
> hid at ihidev0 reportid 26 not configured
> hid at ihidev0 reportid 61 not configured
> hid at ihidev0 reportid 64 not configured
> hid at ihidev0 reportid 81 not configured
> hid at ihidev0 reportid 92 not configured
> "NTAG0001" at iic0 addr 0x57 not configured
> dwiic1 at pci0 dev 21 function 1 "Intel 400 Series I2C" rev 0x00: apic 2 int 
> 17
> iic1 at dwiic1
> ihidev1 at iic1 addr 0x20 gpio 295, vendor 0x6cb product 0x1a1b, 06CB
> ihidev1: 15 report ids
> ims2 at ihidev1 reportid 1: 1 button, tip
> wsmouse3 at ims2 mux 0
> hid at ihidev1 reportid 7 not configured
> hid at ihidev1 reportid 8 not configured
> hid at ihidev1 reportid 9 not configured
> hid at ihidev1 reportid 10 not configured
> hid at ihidev1 reportid 11 not configured
> hid at ihidev1 reportid 12 not configured
> hid at ihidev1 reportid 15 not configured
> "Intel 400 Series MEI" rev 0x00 at pci0 dev 22 function 0 not configured
> ppb0 at pci0 dev 29 function 0 "Intel 400 Series PCIE" rev 0xf0: msi
> pci1 at ppb0 bus 1
> nvme0 at pci1 dev 0 function 0 vendor "Toshiba", unknown product 0x011a rev 
> 0x00: msix, NVMe 1.3
> nvme0: KXG60ZNV512G TOSHIBA, firmware AGXA4103, serial 50JA14RVK92L
> scsibus1 at nvme0: 2 targets, initiator 0
> sd0 at scsibus1 targ 1 lun 0: <NVMe, KXG60ZNV512G TOS, AGXA>
> sd0: 488386MB, 512 bytes/sector, 1000215216 sectors
> "Intel 400 Series UART" rev 0x00 at pci0 dev 30 function 0 not configured
> pcib0 at pci0 dev 31 function 0 "Intel 400 Series LPC" rev 0x00
> azalia0 at pci0 dev 31 function 3 "Intel 400 Series HD Audio" rev 0x00: msi
> azalia0: codecs: Realtek ALC256, Intel/0x280b, using Realtek ALC256
> audio0 at azalia0
> ichiic0 at pci0 dev 31 function 4 "Intel 400 Series SMBus" rev 0x00: apic 2 
> int 16
> iic2 at ichiic0
> "Intel 400 Series SPI" rev 0x00 at pci0 dev 31 function 5 not configured
> isa0 at pcib0
> isadma0 at isa0
> pckbc0 at isa0 port 0x60/5 irq 1 irq 12
> pckbd0 at pckbc0 (kbd slot)
> wskbd0 at pckbd0: console keyboard
> pcppi0 at isa0 port 0x61
> spkr0 at pcppi0
> vmm0 at mainbus0: VMX/EPT
> efifb at mainbus0 not configured
> ugen0 at uhub0 port 2 "Yubico YubiKey CCID" rev 2.00/5.10 addr 2
> uvideo0 at uhub0 port 7 configuration 1 interface 0 "Azurewave USB camera" 
> rev 2.01/20.01 addr 3
> video0 at uvideo0
> vscsi0 at root
> scsibus2 at vscsi0: 256 targets
> softraid0 at root
> scsibus3 at softraid0: 256 targets
> sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 006>
> sd1: 488126MB, 512 bytes/sector, 999682111 sectors
> root on sd1a (6d5c66ecfe7a989c.a) swap on sd1b dump on sd1b
> WARNING: / was not properly unmounted
> inteldrm0: 3000x2000, 32bpp
> wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation), using wskbd0
> wsdisplay0: screen 1-5 added (std, vt100 emulation)
> iwx0: hw rev 0x350, fw 77.ad46c98b.0, address 98:8d:46:21:2b:6d
>
> usbdevs:
> Controller /dev/usb0:
> addr 01: 8086:0000 Intel, xHCI root hub
>        super speed, self powered, config 1, rev 1.00
>        driver: uhub0
> addr 02: 1050:0404 Yubico, YubiKey CCID
>        full speed, power 30 mA, config 1, rev 5.10
>        driver: ugen0
> addr 03: 13d3:56f2 Azurewave, USB camera
>        high speed, power 500 mA, config 1, rev 20.01, iSerial 0x0001
>        driver: uvideo0

Reply via email to