When running vmd with an Apline Linux install image, it randomly
freezes soon after logging in. This is with the current branch as of
today.

Steps to reproduce (the install image is
http://dl-cdn.alpinelinux.org/alpine/v3.7/releases/x86_64/alpine-virt-3.7.0-x86_64.iso):

$ doas vmctl start test -cd alpine-virt-3.7.0-x86_64.iso
vmctl: starting without network interfaces
Connected to /dev/ttypa (speed 115200)
Changing serial settings was 0/0 now 3/0
SeaBIOS (version 1.10.2p5-OpenBSD-vmm)
BUILD: gcc: (GCC) 4.2.1 20070719  binutils: 2.17
enabling shadow ram
Unable to unlock ram - bridge not found
RamSize: 0x20000000 [cmos]
malloc preinit
malloc init
RamSizeOver4G: 0x0000000000000000 [cmos]
init ivt
init bda
init bios32
init keyboard
init pic
math cp init
pci setup
=== PCI bus & bridge init ===
PCI: pci_bios_init_bus_rec bus = 0x0
=== PCI device probing ===
PCI probe
Found 4 PCI devices (max PCI bus is 00)
=== PCI new allocation pass #1 ===
PCI: check devices
=== PCI new allocation pass #2 ===
PCI: IO: c000 - efff
PCI: 32: 0000000020000000 - 00000000fec00000
PCI: map device bdf=00:01.0  bar 0, addr 0000c000, size 00001000 [io]
PCI: map device bdf=00:02.0  bar 0, addr 0000d000, size 00001000 [io]
PCI: map device bdf=00:03.0  bar 0, addr 0000e000, size 00001000 [io]
PCI: init bdf=00:00.0 id=0b5d:0666
PCI: init bdf=00:01.0 id=1af4:1005
PCI: init bdf=00:02.0 id=1af4:1001
PCI: init bdf=00:03.0 id=0b5d:0777
PCI: No VGA devices found
No apic - only the main cpu is present.
init timer
Scan for VGA option rom

init virtio-blk
found virtio-blk at 00:02.0
pci dev 00:02.0 using legacy (0.9.5) virtio mode
virtio-blk 00:02.0 blksize=512 sectors=75776
Registering bootable: Virtio disk PCI:00:02.0 (type:2 prio:9999 data:f0a60)
init virtio-scsi
init serial
Found 1 serial ports
Scan for option roms
Registering bootable: Legacy option rom (type:129 prio:9999 data:bf000003)
Searching bootorder for: HALT
Mapping hd drive 0x000f0a60 to 0
drive 0x000f0a60: PCHS=0/0/0 translation=lba LCHS=75/16/63 s=75776
Running option rom at bf00:0003

Google, Inc.
Serial Graphics Adapter 01/21/18
SGABIOS 20100422 (_<vmm@OpenBSD>) Sun Jan 21 23:44:57 UTC 2018
Term: 174x28
4 0
malloc finalize
Space available for UMB: c0000-ef000, f0000-f0a60
Returned 253952 bytes of ZoneHigh
e820 map has 6 items:
  0: 0000000000000000 - 000000000009f800 = 1 RAM
  1: 000000000009f800 - 00000000000a0000 = 2 RESERVED
  2: 00000000000f0000 - 0000000000100000 = 2 RESERVED
  3: 0000000000100000 - 000000001fffe000 = 1 RAM
  4: 000000001fffe000 - 0000000020000000 = 2 RESERVED
  5: 00000000fffc0000 - 0000000100000000 = 2 RESERVED
locking shadow ram
Unable to lock ram - bridge not found
Jump to int19
enter handle_19:
  NULL
Boooottiinngg  ffrroomm  HHaarrdd  DDiisskk......

Booting from 0000:7c00

ISOLINUX 6.04 6.04-pre1 EHDDenter handle_12:
   a=00000000  b=00000000  c=00000000  d=00000000 ds=0000 es=0000 ss=0000
  si=00000000 di=00000000 bp=00000000 sp=00007b9e cs=0000 ip=8675  f=0000
enter handle_12:
   a=00000200  b=00000000  c=00000000  d=00000000 ds=0000 es=0000 ss=0000
  si=00000000 di=00000000 bp=00000000 sp=00007b9e cs=0000 ip=8675  f=0000
 Copyright (C) 1994-2015 H. Peter Anvin et al

ISOLINUX 6.04 6.04-pre1  Copyright (C) 1994-2015 H. Peter Anvin et al
boot: boot:

...hit enter...

[    0.000000] ACPI BIOS Error (bug): A valid RSDP was not found
(20160831/tbxfroot-244)
[    1.090292] ACPI BIOS Error (bug): A valid RSDP was not found
(20160831/tbxfroot-244)
[    1.099863] dmi: Firmware registration failed.


   OpenRC 0.24.1.a941ee4a0b is starting up Linux 4.9.65-1-virthardened (x86_64)

 * /proc is already mounted
 * Mounting /run ... * /run/openrc: creating directory
 * /run/lock: creating directory
 * /run/lock: correcting owner
 * Caching service dependencies ... [ ok ]
 * Remounting devtmpfs on /dev ... [ ok ]
 * Mounting /dev/mqueue ... [ ok ]
 * Mounting modloop  ... [ ok ]
 * Mounting security filesystem ... [ ok ]
 * Mounting persistent storage (pstore) filesystem ... [ ok ]
 * Mounting cgroup filesystem ... [ ok ]
 * Starting busybox mdev ... [ ok ]
 * Loading hardware drivers ... [ ok ]
 * Loading modules ... [ ok ]
 * Setting system clock using the hardware clock [UTC] ... [ ok ]
 * Checking local filesystems  ... [ ok ]
 * Remounting filesystems ... [ ok ]
 * Mounting local filesystems ... [ ok ]
 * Configuring kernel parameters ... [ ok ]
 * Migrating /var/lock to /run/lock ... [ ok ]
 * Creating user login records ... [ ok ]
 * Wiping /tmp directory ... [ ok ]
 * Setting hostname ... [ ok ]
 * Starting busybox klogd ... [ ok ]
 * Starting busybox syslog ... [ ok ]

Welcome to Alpine Linux 3.7
Kernel 4.9.65-1-virthardened on an x86_64 (/dev/ttyS0)

...logging in as root, without password...

localhost login: root
Welcome to Alpine!

The Alpine Wiki contains a large amount of how-to guides and general
information about administrating Alpine systems.
See <http://wiki.alpinelinux.org>.

You can setup the system with the command: setup-alpine

You may change this message by editing /etc/motd.

localhost:~#

...hit enter a couple of times...

localhost:~#
localhost:~#
localhost:~#
localhost:~#
localhost:~#

Now the system hangs and the vmd process is at 100% CPU usage.

ktrace reveals it keeps alternating between clock_gettime and kevent:
 28945 vmd      CALL  clock_gettime(CLOCK_MONOTONIC,0x184ebb2f2530)
 28945 vmd      STRU  struct timespec { 1638.327931210 }
 28945 vmd      RET   clock_gettime 0
 28945 vmd      CALL  kevent(5,0,0,0x184e9f794000,64,0x184ebb2f2490)
 28945 vmd      STRU  struct timespec { 0.002704000 }
 28945 vmd      STRU  struct kevent { ident=8, filter=EVFILT_READ,
flags=0x1<EV_ADD>, fflags=0<>, data=9, udata=0x184c153b06a0 }
 28945 vmd      RET   kevent 1
 28945 vmd      CALL  clock_gettime(CLOCK_MONOTONIC,0x184ebb2f2530)
 28945 vmd      STRU  struct timespec { 1638.327971409 }
 28945 vmd      RET   clock_gettime 0
 28945 vmd      CALL  kevent(5,0,0,0x184e9f794000,64,0x184ebb2f2490)
 28945 vmd      STRU  struct timespec { 0.002664000 }
 28945 vmd      STRU  struct kevent { ident=8, filter=EVFILT_READ,
flags=0x1<EV_ADD>, fflags=0<>, data=9, udata=0x184c153b06a0 }
 28945 vmd      RET   kevent 1
(repeated over and over)

When running with EVENT_NOKQUEUE=1, as suggested here
(https://marc.info/?l=openbsd-bugs&m=150061499808645&w=2) the system
still hangs and clock_gettime alternates with pollfd:
  9551 vmd      CALL  clock_gettime(CLOCK_MONOTONIC,0x1fbb485d6f50)
  9551 vmd      STRU  struct timespec { 3794.107525490 }
  9551 vmd      RET   clock_gettime 0
  9551 vmd      CALL  poll(0x1fbb63bee300,2,9)
  9551 vmd      STRU  struct pollfd [2] { fd=11, events=0x1<POLLIN>,
revents=0<> } { fd=9, events=0x1<POLLIN>, revents=0x1<POLLIN> }
  9551 vmd      RET   poll 1
(repeated over and over)


$ dmesg
OpenBSD 6.3-beta (GENERIC.MP) #4: Sat Mar  3 13:54:36 CET 2018
    m...@bsd.my.domain:/sys/arch/amd64/compile/GENERIC.MP
real mem = 17037766656 (16248MB)
avail mem = 16514375680 (15749MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0xeb350 (31 entries)
bios0: vendor American Megatrends Inc. version "UX390UAK.312" date 04/25/2017
bios0: ASUSTeK COMPUTER INC. UX390UAK
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT ECDT MCFG FIDT SSDT MSDM SSDT HPET
UEFI SSDT LPIT WSMT SSDT SSDT DBGP DBG2 BGRT DMAR TPM2
acpi0: wakeup devices GLAN(S4) XHC_(S3) XDCI(S4) HDAS(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz, 2594.96 MHz
cpu0: 
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,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,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 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) i7-7500U CPU @ 2.70GHz, 2593.97 MHz
cpu1: 
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,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,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 1 (application processor)
cpu2: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz, 2593.96 MHz
cpu2: 
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,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,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 1, core 0, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz, 2593.96 MHz
cpu3: 
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,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,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT,MELTDOWN
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 120 pins
acpiec0 at acpi0
acpimcfg0 at acpi0 addr 0xf0000000, bus 0-127
acpihpet0 at acpi0: 23999999 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus 3 (RP09)
acpiprt5 at acpi0: bus -1 (RP10)
acpiprt6 at acpi0: bus -1 (RP11)
acpiprt7 at acpi0: bus -1 (RP12)
acpiprt8 at acpi0: bus -1 (RP13)
acpiprt9 at acpi0: bus 1 (RP01)
acpiprt10 at acpi0: bus -1 (RP02)
acpiprt11 at acpi0: bus -1 (RP03)
acpiprt12 at acpi0: bus -1 (RP04)
acpiprt13 at acpi0: bus -1 (RP05)
acpiprt14 at acpi0: bus 2 (RP06)
acpiprt15 at acpi0: bus -1 (RP07)
acpiprt16 at acpi0: bus -1 (RP08)
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 (RP14)
acpiprt22 at acpi0: bus -1 (RP15)
acpiprt23 at acpi0: bus -1 (RP16)
acpiec at acpi0 not configured
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
acpipwrres0 at acpi0: WRST
acpipwrres1 at acpi0: WRST
acpipwrres2 at acpi0: WRST
acpipwrres3 at acpi0: WRST
acpipwrres4 at acpi0: WRST
acpipwrres5 at acpi0: WRST
acpipwrres6 at acpi0: WRST
acpipwrres7 at acpi0: WRST
acpipwrres8 at acpi0: WRST
acpipwrres9 at acpi0: WRST
acpipwrres10 at acpi0: WRST
acpipwrres11 at acpi0: WRST
acpipwrres12 at acpi0: WRST
acpipwrres13 at acpi0: WRST
acpipwrres14 at acpi0: WRST
acpipwrres15 at acpi0: WRST
acpipwrres16 at acpi0: WRST
acpipwrres17 at acpi0: WRST
acpipwrres18 at acpi0: WRST
acpipwrres19 at acpi0: WRST
acpitz0 at acpi0: critical temperature is 103 degC
"INT3F0D" at acpi0 not configured
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: LID_
acpibat0 at acpi0: BAT0 model "ASUS Battery" serial   type LIon oem "ASUSTeK"
"INT3403" at acpi0 not configured
"INT3403" at acpi0 not configured
"INT3403" at acpi0 not configured
"INT3403" at acpi0 not configured
"ATK3001" at acpi0 not configured
"ELAN1301" at acpi0 not configured
acpibtn1 at acpi0: SLPB
"INT33A1" at acpi0 not configured
acpibtn2 at acpi0: PWRB
"MSFT0101" at acpi0 not configured
"PNP0C14" at acpi0 not configured
"ATK4002" at acpi0 not configured
"INT3400" at acpi0 not configured
"INT340E" at acpi0 not configured
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD1F
cpu0: Enhanced SpeedStep 2594 MHz: speeds: 2701, 2700, 2600, 2500,
2400, 2200, 2000, 1800, 1600, 1500, 1300, 1100, 800, 700, 600, 400 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 7G Host" rev 0x02
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 620" rev 0x02
drm0 at inteldrm0
inteldrm0: msi
error: [drm:pid0:i915_firmware_load_error_print] *ERROR* failed to
load firmware i915/kbl_dmc_ver1.bin (-22)
inteldrm0: 1920x1080, 32bpp
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel Core 6G Thermal" rev 0x02 at pci0 dev 4 function 0 not configured
xhci0 at pci0 dev 20 function 0 "Intel 100 Series xHCI" rev 0x21: msi
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
pchtemp0 at pci0 dev 20 function 2 "Intel 100 Series Thermal" rev 0x21
dwiic0 at pci0 dev 21 function 0 "Intel 100 Series I2C" rev 0x21: apic 2 int 16
iic0 at dwiic0
dwiic1 at pci0 dev 21 function 1 "Intel 100 Series I2C" rev 0x21: apic 2 int 17
iic1 at dwiic1
ihidev0 at iic1 addr 0x15 (polling), vendor 0x4f3 product 0x3035, ELAN1301
ihidev0: 11 report ids
imt0 at ihidev0: clickpad, 5 contacts
wsmouse0 at imt0 mux 0
"Intel 100 Series MEI" rev 0x21 at pci0 dev 22 function 0 not configured
ppb0 at pci0 dev 28 function 0 "Intel 100 Series PCIE" rev 0xf1
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 5 "Intel 100 Series PCIE" rev 0xf1: msi
pci2 at ppb1 bus 2
iwm0 at pci2 dev 0 function 0 "Intel Dual Band Wireless AC 8260" rev 0x3a, msi
ppb2 at pci0 dev 29 function 0 "Intel 100 Series PCIE" rev 0xf1: msi
pci3 at ppb2 bus 3
nvme0 at pci3 dev 0 function 0 vendor "Toshiba", unknown product
0x010f rev 0x01: msi, NVMe 1.1
nvme0: THNSN5512GPU7 TOSHIBA, firmware 57XA4104, serial Y63S108UT7DV
scsibus1 at nvme0: 1 targets
sd0 at scsibus1 targ 0 lun 0: <NVMe, THNSN5512GPU7 TO, 57XA> SCSI4
0/direct fixed
sd0: 488386MB, 512 bytes/sector, 1000215216 sectors
pcib0 at pci0 dev 31 function 0 "Intel 200 Series LPC" rev 0x21
"Intel 100 Series PMC" rev 0x21 at pci0 dev 31 function 2 not configured
azalia0 at pci0 dev 31 function 3 "Intel 200 Series HD Audio" rev 0x21: msi
azalia0: codecs: Realtek/0x0295, Intel/0x280b, using Realtek/0x0295
audio0 at azalia0
ichiic0 at pci0 dev 31 function 4 "Intel 100 Series SMBus" rev 0x21:
apic 2 int 16
iic2 at ichiic0
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, using wsdisplay0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
vmm0 at mainbus0: VMX/EPT
efifb at mainbus0 not configured
uvideo0 at uhub0 port 5 configuration 1 interface 0 "AzureWave USB2.0
VGA UVC WebCam" rev 2.00/16.09 addr 2
video0 at uvideo0
ugen0 at uhub0 port 8 "Intel Bluetooth" rev 2.00/0.01 addr 3
ugen1 at uhub0 port 9 "ELAN ELAN:Fingerprint" rev 2.00/1.35 addr 4
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> SCSI2 0/direct fixed
sd1: 488385MB, 512 bytes/sector, 1000213601 sectors
root on sd1a (3f952e2bfc36d2a0.a) swap on sd1b dump on sd1b
iwm0: hw rev 0x200, fw ver 16.242414.0, address a0:c5:89:44:a6:2e

Reply via email to