Maximilian Pichler <[email protected]> writes:
> 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):
This also happens to my existing Alpine Linux 3.7.0 (vanilla) guest if
and only if I connect via serial console. Typically I start it up and
use SSH, but if I use `vmctl console <guest num>` and try to log in I
can reproduce this as well.
The guest remains responsive as I can still connect via SSH while the
serial console stops accepting input. If I ssh into the guest and
`sudo poweroff` I see the init system running throught the shutdown
process.
>
> $ doas vmctl start test -cd alpine-virt-3.7.0-x86_64.iso
> vmctl: starting without network interfaces
> Connected to /dev/ttypa (speed 115200)
(snipped the alpine output)
I also tried using the vanilla iso and rapidly reproduce the same state.
>
> 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)
I see the same pattern:
35588 vmd CALL clock_gettime(CLOCK_MONOTONIC,0xd9d66e210d0)
35588 vmd STRU struct timespec { 46528.729991780 }
35588 vmd RET clock_gettime 0
35588 vmd CALL kevent(0,0,0,0xd9e53a0d800,64,0xd9d66e21030)
35588 vmd STRU struct timespec { 0.002755000 }
35588 vmd STRU struct kevent { ident=9, filter=EVFILT_READ,
flags=0x1<EV_ADD>, fflags=0<>, data=15, udata=0xd9b66db06a0 }
35588 vmd RET kevent 1
This seems to be the same syscall pattern I reported for an issue related to
unpausing guests causing a VMD thread to peg the CPU:
https://marc.info/?l=openbsd-bugs&m=151936086020917&w=2
>
> $ dmesg
> OpenBSD 6.3-beta (GENERIC.MP) #4: Sat Mar 3 13:54:36 CET 2018
(snipped your dmesg output)
I'm on a snapshot from the day prior:
OpenBSD 6.3-beta (GENERIC.MP) #26: Fri Mar 2 22:56:04 MST 2018
Sorry I don't have any ideas, but I can confirm it's not just your
machine.
-Dave