Now that I'm running OpenBSD 6.4 (GENERIC.MP) #362: Thu Oct 11 04:53:41 MDT
2018, I can start debugging again. I just observed an interesting tidbit
which I failed to notice before. Namely, there are also hanging vmctl
processes trying to stop those spinning VMs. So, I tried to reproduce this
myself. The first attempt shows, that vmd is somewhat aware of the VM
presence (even though it doesn't report it in vmctl status).

ci-openbsd$ vmctl status
   ID   PID VCPUS  MAXMEM  CURMEM     TTY        OWNER NAME
    1     -     1    512M       -       -    syzkaller syzkaller

ci-openbsd$ ./obj/vmctl stop ci-openbsd-main-2x -f -w
stopping vm ci-openbsd-main-2x: vm not found

^^^ - Here, a random VM name is refused. OTOH, when trying to stop a
previously known (and currently spinning) VM, it causes a hang in imsg_read.

ci-openbsd$ gdb -q -- /syzkaller/src/usr.sbin/vmctl/obj/vmctl
(gdb) run stop ci-openbsd-main-2 -f -w
Starting program: /syzkaller/src/usr.sbin/vmctl/obj/vmctl stop
ci-openbsd-main-2 -f -w
stopping vm ci-openbsd-main-2: ^C
Current language:  auto; currently asm
(gdb) where
#0  _thread_sys_recvmsg () at -:3
#1  0x00001c25828acd6e in _libc_recvmsg_cancel (fd=Variable "fd" is not
available.
) at /usr/src/lib/libc/sys/w_recvmsg.c:27
#2  0x00001c2520999521 in imsg_read (ibuf=0x1c24fc4ed000) at
/usr/src/lib/libutil/imsg.c:82
#3  0x00001c22f490392c in vmmaction (res=Variable "res" is not available.
) at /syzkaller/src/usr.sbin/vmctl/main.c:273
#4  0x00001c22f4902fd2 in ctl_stop (res=0x7f7ffffe6f80, argc=Variable
"argc" is not available.

) at /syzkaller/src/usr.sbin/vmctl/main.c:793
#5  0x00001c22f490351e in parse (argc=4, argv=Variable "argv" is not
available.
) at /syzkaller/src/usr.sbin/vmctl/main.c:172
#6  0x00001c22f49033be in main (argc=4, argv=Variable "argv" is not
available.
) at /syzkaller/src/usr.sbin/vmctl/main.c:134
(gdb)

i-openbsd$ uname -a
OpenBSD ci-openbsd.syzkaller 6.4 GENERIC.MP#362 amd64
ci-openbsd$ dmesg | head
OpenBSD 6.4 (GENERIC.MP) #362: Thu Oct 11 04:53:41 MDT 2018
    [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17163079680 (16367MB)
avail mem = 16633643008 (15863MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xbffffcf0 (20 entries)
bios0: vendor Google version "Google" date 01/01/2011
bios0: Google Google Compute Engine
ci-openbsd$ uname -a
ci-openbsd$ ps ax | grep vm
55596 ??  Ssp     0:04.86 vmd: vmm (vmd)
22978 ??  Is      0:00.22 vmd: priv (vmd)
52555 ??  Ssp     0:13.01 vmd: control (vmd)
17471 ??  Ssp     0:06.15 /usr/sbin/vmd
29044 ??  Rp/0  2197:50.09 vmd: ci-openbsd-main-2 (vmd)
52266 ??  Rp/1  257:11.58 vmd: ci-openbsd-main-1 (vmd)
15989 ??  Rp/1  241:18.45 vmd: ci-openbsd-main-0 (vmd)
19071 ??  Ip      0:00.02 vmctl stop ci-openbsd-main-1 -f -w
88222 ??  Ip      0:00.02 vmctl stop ci-openbsd-main-0 -f -w
 6142 ??  Sp      0:00.01 vmctl stop ci-openbsd-main-2 -f -w
ci-openbsd$ dmesg |tail
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
vmm0 at mainbus0: VMX/EPT (using slow L1TF mitigation)
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (11584d676adca97e.a) swap on sd0b dump on sd0b
ci-openbsd$

ct 13 19:38:41 ci-openbsd vmd[17471]: ci-openbsd-main-1: started vm
330 successfully, tty /dev/ttyp0
Oct 13 20:16:56 ci-openbsd vmd[29583]: ci-openbsd-main-1:
vcpu_assert_pic_irq: can't assert INTR
Oct 13 20:17:00 ci-openbsd vmd[17471]: ci-openbsd-main-1: started vm
331 successfully, tty /dev/ttyp0
Oct 13 20:22:04 ci-openbsd vmd[31844]: vcpu_run_loop: vm 320 / vcpu 0
run ioctl failed: No such file or directory
Oct 13 20:22:07 ci-openbsd vmd[17471]: ci-openbsd-main-0: started vm
332 successfully, tty /dev/ttyp2
Oct 13 21:12:18 ci-openbsd vmd[57830]: ci-openbsd-main-1: can't clear
INTR: No such file or directory
Oct 13 21:12:22 ci-openbsd vmd[17471]: ci-openbsd-main-1: started vm
333 successfully, tty /dev/ttyp0
Oct 13 21:23:39 ci-openbsd vmd[81046]: ci-openbsd-main-0: can't clear
INTR: No such file or directory
Oct 13 21:23:42 ci-openbsd vmd[17471]: ci-openbsd-main-0: started vm
334 successfully, tty /dev/ttyp2
Oct 13 21:43:42 ci-openbsd vmd[59472]: ci-openbsd-main-0: can't clear
INTR: No such file or directory
Oct 13 21:43:47 ci-openbsd vmd[17471]: ci-openbsd-main-0: started vm
335 successfully, tty /dev/ttyp2
Oct 13 21:52:36 ci-openbsd vmd[17471]: ci-openbsd-main-1: started vm
336 successfully, tty /dev/ttyp0
Oct 13 22:06:47 ci-openbsd vmd[58824]: ci-openbsd-main-1:
vcpu_assert_pic_irq: can't assert INTR
Oct 13 22:06:51 ci-openbsd vmd[17471]: ci-openbsd-main-1: started vm
337 successfully, tty /dev/ttyp0
Oct 13 22:13:31 ci-openbsd vmd[6946]: ci-openbsd-main-1:
vcpu_assert_pic_irq: can't assert INTR
Oct 13 22:13:35 ci-openbsd vmd[17471]: ci-openbsd-main-1: started vm
338 successfully, tty /dev/ttyp0
Oct 13 22:45:14 ci-openbsd vmd[45351]: ci-openbsd-main-0:
vcpu_assert_pic_irq: can't assert INTR
Oct 13 22:45:18 ci-openbsd vmd[17471]: ci-openbsd-main-0: started vm
339 successfully, tty /dev/ttyp2
Oct 13 23:15:13 ci-openbsd vmd[17471]: ci-openbsd-main-1: started vm
340 successfully, tty /dev/ttyp0
Oct 13 23:46:47 ci-openbsd vmd[17471]: ci-openbsd-main-0: started vm
341 successfully, tty /dev/ttyp2
Oct 14 00:16:46 ci-openbsd vmd[75451]: vcpu_run_loop: vm 331 / vcpu 0
run ioctl failed: No such file or directory
Oct 14 00:16:49 ci-openbsd vmd[17471]: ci-openbsd-main-1: started vm
342 successfully, tty /dev/ttyp0
Oct 14 00:48:26 ci-openbsd vmd[17471]: ci-openbsd-main-0: started vm
343 successfully, tty /dev/ttyp2
Oct 14 01:18:17 ci-openbsd vmd[66515]: ci-openbsd-main-1: can't clear
INTR: No such file or directory
Oct 14 01:18:20 ci-openbsd vmd[17471]: ci-openbsd-main-1: started vm
344 successfully, tty /dev/ttyp0
Oct 14 01:25:04 ci-openbsd vmd[17471]: ci-openbsd-main-1: started vm
345 successfully, tty /dev/ttyp0
Oct 14 01:50:05 ci-openbsd vmd[17471]: ci-openbsd-main-0: started vm
346 successfully, tty /dev/ttyp2
Oct 14 02:26:34 ci-openbsd vmd[17471]: ci-openbsd-main-1: started vm
347 successfully, tty /dev/ttyp0
Oct 14 02:51:34 ci-openbsd vmd[17471]: ci-openbsd-main-0: started vm
348 successfully, tty /dev/ttyp2
Oct 14 03:28:07 ci-openbsd vmd[17471]: ci-openbsd-main-1: started vm
349 successfully, tty /dev/ttyp0
Oct 14 03:45:13 ci-openbsd vmd[51434]: ci-openbsd-main-0:
vcpu_assert_pic_irq: can't assert INTR
Oct 14 03:45:19 ci-openbsd vmd[17471]: ci-openbsd-main-0: started vm
350 successfully, tty /dev/ttyp2
Oct 14 04:29:39 ci-openbsd vmd[17471]: ci-openbsd-main-test-0: started
vm 351 successfully, tty /dev/ttyp3
Oct 14 04:29:39 ci-openbsd vmd[17471]: ci-openbsd-main-test-2: user
1000 cpu limit reached
Oct 14 04:29:39 ci-openbsd vmd[17471]: config_setvm: failed to start
vm ci-openbsd-main-test-2
Oct 14 04:29:39 ci-openbsd vmd[17471]: ci-openbsd-main-test-1: user
1000 cpu limit reached
Oct 14 04:29:39 ci-openbsd vmd[17471]: config_setvm: failed to start
vm ci-openbsd-main-test-1
Oct 14 04:29:46 ci-openbsd vmd[61555]: ci-openbsd-main-1:
vcpu_assert_pic_irq: can't assert INTR
Oct 14 04:29:46 ci-openbsd vmd[61555]: ci-openbsd-main-1: can't clear
INTR: No such file or directory
Oct 14 04:29:49 ci-openbsd vmd[17471]: ci-openbsd-main-1: started vm
354 successfully, tty /dev/ttyp0
Oct 14 04:46:55 ci-openbsd vmd[17471]: ci-openbsd-main-0: started vm
355 successfully, tty /dev/ttyp2
Oct 14 04:47:08 ci-openbsd vmd[87065]: ci-openbsd-main-1:
vcpu_deassert_pic_irq: can't deassert INTR for vm_id 343, vcpu_id 0
Oct 14 04:47:12 ci-openbsd vmd[17471]: ci-openbsd-main-1: started vm
356 successfully, tty /dev/ttyp0
Oct 14 05:21:05 ci-openbsd vmd[35963]: ci-openbsd-main-0: can't clear
INTR: No such file or directory
Oct 14 05:21:09 ci-openbsd vmd[17471]: ci-openbsd-main-0: started vm
357 successfully, tty /dev/ttyp2
Oct 14 05:48:40 ci-openbsd vmd[17471]: ci-openbsd-main-1: started vm
358 successfully, tty /dev/ttyp0
Oct 14 05:55:37 ci-openbsd vmd[17471]: ci-openbsd-main-1: started vm
359 successfully, tty /dev/ttyp0
Oct 14 06:22:26 ci-openbsd vmd[17471]: ci-openbsd-main-0: started vm
360 successfully, tty /dev/ttyp2
Oct 14 06:56:56 ci-openbsd vmd[17471]: ci-openbsd-main-1: started vm
361 successfully, tty /dev/ttyp0
Oct 14 07:09:00 ci-openbsd vmd[17471]: ci-openbsd-main-1: started vm
362 successfully, tty /dev/ttyp0
Oct 14 07:23:56 ci-openbsd vmd[17471]: ci-openbsd-main-0: started vm
363 successfully, tty /dev/ttyp2
Oct 14 08:10:17 ci-openbsd vmd[48537]: ci-openbsd-main-1: can't clear
INTR: No such file or directory
Oct 14 08:10:20 ci-openbsd vmd[17471]: ci-openbsd-main-1: started vm
364 successfully, tty /dev/ttyp0
Oct 14 08:25:27 ci-openbsd vmd[17471]: ci-openbsd-main-0: started vm
365 successfully, tty /dev/ttyp2
Oct 14 13:42:26 ci-openbsd vmd[52555]: denied request 3 from uid 1000

Reply via email to