Virtualbox-5.1 install causes systemd SEGV, freezing execution, slow sudo

I got this yesterday and it led to all sorts of trouble with systemd. I couldn’t shutdown or reboot, had to use long-press on power button to shutdown. I suspect this is the source of my problems yesterday but not 100% sure just yet. I have found references from around 2013 to this SEGV in systemd but nothing to do about it yet other than “upgrade” as far as I can tell. Will research more but if anyone has ideas that’d be great.

Retrieving bug reports... Done
Parsing Found/Fixed information... Done
Preconfiguring packages ...
Selecting previously unselected package virtualbox-5.1.
(Reading database ... 451415 files and directories currently installed.)
Preparing to unpack .../virtualbox-5.1_5.1.38-122592~Debian~stretch_amd64.deb ...
Unpacking virtualbox-5.1 (5.1.38-122592~Debian~stretch) ...
Selecting previously unselected package libsdl-ttf2.0-0:amd64.
Preparing to unpack .../libsdl-ttf2.0-0_2.0.11-5_amd64.deb ...
Unpacking libsdl-ttf2.0-0:amd64 (2.0.11-5) ...
Processing triggers for mime-support (3.61) ...
Processing triggers for desktop-file-utils (0.23-4) ...
Setting up virtualbox-5.1 (5.1.38-122592~Debian~stretch) ...
addgroup: The group `vboxusers' already exists as a system group. Exiting.

Broadcast message from systemd-journald@other (Fri 2018-12-14 10:22:14 CST):

systemd[1]: Caught <SEGV>, dumped core as pid 8581.


Broadcast message from systemd-journald@other (Fri 2018-12-14 10:22:14 CST):

systemd[1]: Freezing execution.

Here is some output from dmesg that I think is related. So maybe segfault in libc? :stuck_out_tongue:

[26674.228976] systemd[1]: Reexecuting.
[26674.303232] systemd[1]: systemd 239 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
[26674.303415] systemd[1]: Detected architecture x86-64.
[26674.381515] systemd[1]: Started CUPS Scheduler.
[26674.381721] systemd[1]: Started ACPI event daemon.
[26674.429173] systemd[1]: Reloading.
[26674.590324] systemd[1]: Started CUPS Scheduler.
[26674.590514] systemd[1]: Started ACPI event daemon.
[26674.591216] systemd[1]: segfault at 20 ip 00007f6b75901907 sp 00007ffe632075f8 error 4 in libc-2.27.so[7f6b757c9000+146000]
[26674.591228] Code: f9 20 77 1f c5 fd 74 0f c5 fd d7 c1 85 c0 0f 85 df 00 00 00 48 83 c7 20 83 e1 1f 48 83 e7 e0 eb 36 66 90 83 e1 1f 48 83 e7 e0 <c5> fd 74 0f c5 fd d7 c1 d3 f8 85 c0 74 1b f3 0f bc c0 48 01 f8 48
[26749.689423] systemd-journald[450]: Failed to send WATCHDOG=1 notification message: Connection refused
[26842.092754] systemd-journald[450]: Failed to send WATCHDOG=1 notification message: Transport endpoint is not connected
[26933.400003] systemd-journald[450]: Failed to send WATCHDOG=1 notification message: Transport endpoint is not connected
[26977.351459] vboxdrv: loading out-of-tree module taints kernel.
[26977.365641] vboxdrv: Found 4 processor cores
[26977.383858] vboxdrv: TSC mode is Invariant, tentative frequency 2495961236 Hz
[26977.383861] vboxdrv: Successfully loaded version 5.1.38 (interface 0x002a0000)
[26977.595304] VBoxNetFlt: Successfully started.
[26977.597194] VBoxNetAdp: Successfully started.
[26977.599860] VBoxPciLinuxInit
[26977.601433] vboxpci: IOMMU not found (not registered)

Later after waking the machine up after being in “suspend?” mode (not sure what it is… I always have case closed with an external monitor and then have to “wake it up” with a keypress on laptop) external usb keyboard/mouse weren’t working anymore. I saw a lot of

[38002.554723] systemd-journald[450]: Failed to send WATCHDOG=1 notification message: Transport endpoint is not connected

which I had seen previously as well.

So I tried apt-get remove virtualbox-5.1, it got some distance but hung on the “Removing…” step so I tried reboot/shutdown -h now and neither worked. Instead they gave me

Failed to open initctl fifo: No such device or address
Failed to talk to init daemon.

Using a hard power reset (holding the power button down). I was able to reboot without much trouble and noticed that virtualbox-5.1 was indeed un-installed according to apt and things are working pretty well.

It was suggested on matrix community/pureos that I might need to enable USB pass through

https://www.virtualbox.org/wiki/VBoxInstallAndRun seems to say it is a requirement.

So will look into that later.