Skip to content

guest hung trying to build Go #322

Open

Description

@davepacheco

I'm not sure how useful this issue is but I wanted to get this data recorded.

I wanted to try running the Go test suite in Linux under propolis with the fix for https://www.illumos.org/issues/15367 in place. So here are the basics of my test system ivanova:

  • OS bits: from @rmustacc from his workspace with the fix for that illumos issue. It's rm-xsave-33, which reports itself in uname as xsave-0-gebc3ed0cba. Robert could probably say exactly what this is, but I believe it was built around 2023-02-04 and was current with illumos "master" around that time.
  • Propolis bits: baa6c67 ("master" tip as of earlier today)
  • Alpine image: alpine-extended-3.17.2-x86_64.iso, downloaded today
  • Firmware image: OVMF_CODE_20220922.fd, downloaded today

I think this is not totally reproducible because I just tried this a little while ago and it ran out of disk space during the test suite, which implies it finished the build that time. This time I increased my disk size and started again.

Sorry in advance there's so much here, but I don't know what data will be useful.

What I did

I set this up by running pfexec cargo run --bin=propolis-standalone -- config.toml using this config:

[main]
name = "testvm"
cpus = 4
bootrom = "/home/dap/propolis/OVMF_CODE.fd"
memory = 1024

[block_dev.alpine_iso]
type = "file"
path = "/home/dap/propolis/alpine-extended-3.17.2-x86_64.iso"

[block_dev.data]
type = "file"
path = "/home/dap/propolis/data_disk"

[dev.block0]
driver = "pci-virtio-block"
block_dev = "alpine_iso"
pci-path = "0.4.0"

[dev.block1]
driver = "pci-virtio-block"
block_dev = "data"
pci-path = "0.5.0"

[dev.net0]
driver = "pci-virtio-viona"
vnic = "vnic_dap_propolis0"
pci-path = "0.6.0"

where the data file is the result of mkfile 40g data_disk. Here's the console session from that run:

localhost:~# setup-alpine
Enter system hostname (fully qualified form, e.g. 'foo.example.org') [localhost]
Available interfaces are: eth0.
Enter '?' for help on bridges, bonding and vlans.
Which one do you want to initialize? (or '?' or 'done') [eth0]
Ip address for eth0? (or 'dhcp', 'none', '?') [dhcp]
Do you want to do any manual network configuration? (y/n) [n]
udhcpc: started, v1.35.0
udhcpc: broadcasting discover
udhcpc: broadcasting select for 172.20.2.181, server 172.20.2.3
udhcpc: lease of 172.20.2.181 obtained from 172.20.2.3, lease time 2929
Changing password for root
New password:
Bad password: too short
Retype password:
passwd: password for root changed by root
Which timezone are you in? ('?' for list) [UTC]
 * Seeding random number generator ...
 * Saving 256 bits of creditable seed for next boot
 [ ok ]
 * Starting busybox acpid ...
 [ ok ]
 * Starting busybox crond ...
 [ ok ]
HTTP/FTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none]
Which NTP client to run? ('busybox', 'openntpd', 'chrony' or 'none') [chrony]
 * service chronyd added to runlevel default
 * Caching service dependencies ...
 [ ok ]
 * Starting chronyd ...
 [ ok ]

Available mirrors:
1) dl-cdn.alpinelinux.org
2) uk.alpinelinux.org
3) mirror.yandex.ru
4) mirrors.gigenet.com
5) mirror1.hs-esslingen.de
6) mirror.leaseweb.com
7) mirror.fit.cvut.cz
8) alpine.mirror.far.fi
9) alpine.mirror.wearetriple.com
10) mirror.clarkson.edu
11) mirror.aarnet.edu.au
12) mirrors.dotsrc.org
13) ftp.halifax.rwth-aachen.de
14) mirrors.tuna.tsinghua.edu.cn
15) mirrors.ustc.edu.cn
16) mirrors.nju.edu.cn
17) mirror.lzu.edu.cn
18) ftp.acc.umu.se
19) mirror.xtom.com.hk
20) mirror.csclub.uwaterloo.ca
21) alpinelinux.mirror.iweb.com
r) Add random from the above list
f) Detect and add fastest mirror from above list
e) Edit /etc/apk/repositories with text editor

Enter mirror number (1-71) or URL to add (or r/f/e/done) [1] r
Picking random mirror... Added mirror alpine.bardia.tech
Updating repository indexes... done.
Setup a user? (enter a lower-case loginname, or 'no') [no] dap
Full name for user dap [dap]
Changing password for dap
New password:
Bad password: too short
Retype password:
passwd: password for dap changed by root
Enter ssh key or URL for dap (or 'none') [none] https://github.com/davepacheco.keys
(1/1) Installing doas (6.8.2-r3)
Executing doas-6.8.2-r3.post-install
Executing busybox-1.35.0-r29.trigger
OK: 48 MiB in 40 packages
Which ssh server? ('openssh', 'dropbear' or 'none') [openssh]
 * service sshd added to runlevel default
 * Caching service dependencies ...
 [ ok ]
ssh-keygen: generating new host keys: RSA ECDSA ED25519
 * Starting sshd ...
 [ ok ]
Available disks are:
  vdb	(42.9 GB 0x1af4 )
Which disk(s) would you like to use? (or '?' for help or 'none') [none] vdb
The following disk is selected:
  vdb	(42.9 GB 0x1af4 )
How would you like to use it? ('sys', 'data', 'crypt', 'lvm' or '?' for help) [?] sys
WARNING: The following disk(s) will be erased:
  vdb	(42.9 GB 0x1af4 )
WARNING: Erase the above disk(s) and continue? (y/n) [n] y
Creating file systems...
mkfs.fat 4.2 (2021-01-31)
Installing system on /dev/vdb3:
Installing for x86_64-efi platform.
Installation finished. No error reported.
100% ████████████████████████████████████████████==> initramfs: creating /boot/initramfs-lts
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-lts
Found initrd image: /boot/initramfs-lts
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done

Installation is complete. Please reboot.
localhost:~# halt

Having installed alpine to the data disk, I switched to this config file with no ISO:

[main]
name = "testvm"
cpus = 4
bootrom = "/home/dap/propolis/OVMF_CODE.fd"
memory = 1024

[block_dev.data]
type = "file"
path = "/home/dap/propolis/data_disk"

[dev.block1]
driver = "pci-virtio-block"
block_dev = "data"
pci-path = "0.5.0"

[dev.net0]
driver = "pci-virtio-viona"
vnic = "vnic_dap_propolis0"
pci-path = "0.6.0"

I started that similarly. This is the instance that eventually hung. Here's the full propolis-standalone log:

$ pfexec cargo run --bin=propolis-standalone -- config-installed.toml 
    Finished dev [unoptimized + debuginfo] target(s) in 0.34s
     Running `target/debug/propolis-standalone config-installed.toml`
Feb 23 23:27:39.386 INFO Creating VM with 4 vCPUs, 1073741824 lowmem, 0 highmem
Feb 23 23:27:39.884 INFO VM created, name: testvm
Feb 23 23:27:39.906 INFO Waiting for a connection to ttya
Feb 23 23:27:41.904 INFO Starting instance...
Feb 23 23:27:41.905 INFO Instance event ReqStart (User("UDS connection"))
Feb 23 23:27:41.905 INFO State transition Initialize -> Run
vcpu: 0
 Feb 23 23:27:42.038 ERRO Unhandled pio Out(IoPort { port: 44800, bytes: 4 }, 0), rip: 8612253
 Feb 23 23:27:42.038 ERRO Unhandled pio Out(IoPort { port: 44800, bytes: 4 }, 0), rip: 8612253
 Feb 23 23:27:42.038 ERRO Unhandled pio Out(IoPort { port: 44805, bytes: 1 }, 0), rip: 8609998
 Feb 23 23:27:42.038 ERRO Unhandled pio In(IoPort { port: 44800, bytes: 4 }), rip: 8612257
dev: ramfb
 Feb 23 23:27:42.382 INFO ramfb change, config: Config { addr: 1051721728, fourcc: 875713112, flags: 0, width: 800, height: 600, stride: 3200 }, state: valid
 Feb 23 23:27:42.382 INFO no notify fn set
vcpu: 0
 Feb 23 23:27:45.992 INFO rdmsr, msr: 139
 Feb 23 23:27:45.993 INFO rdmsr, msr: 3221291029
 Feb 23 23:27:45.993 INFO rdmsr, msr: 3221295136
 Feb 23 23:27:46.083 INFO rdmsr, msr: 139
 Feb 23 23:27:46.083 INFO rdmsr, msr: 3221291029
 Feb 23 23:27:46.083 INFO wrmsr, value: 1073741824, msr: 3221291029
 Feb 23 23:27:46.194 INFO rdmsr, msr: 3221291008
 Feb 23 23:27:46.194 INFO rdmsr, msr: 3221291009
 Feb 23 23:27:46.194 INFO rdmsr, msr: 3221291010
 Feb 23 23:27:46.195 INFO rdmsr, msr: 3221291011
 Feb 23 23:27:46.195 INFO rdmsr, msr: 3221291015
 Feb 23 23:27:46.195 INFO wrmsr, value: 65535, msr: 3221291015
 Feb 23 23:27:46.195 INFO rdmsr, msr: 3221291015
vcpu: 1
 Feb 23 23:27:46.195 INFO rdmsr, msr: 139
 Feb 23 23:27:46.195 INFO rdmsr, msr: 3221291029
 Feb 23 23:27:46.196 INFO wrmsr, value: 1073741824, msr: 3221291029
vcpu: 2
 Feb 23 23:27:46.298 INFO rdmsr, msr: 139
 Feb 23 23:27:46.298 INFO rdmsr, msr: 3221291029
 Feb 23 23:27:46.298 INFO wrmsr, value: 1073741824, msr: 3221291029
vcpu: 3
 Feb 23 23:27:46.401 INFO rdmsr, msr: 139
 Feb 23 23:27:46.401 INFO rdmsr, msr: 3221291029
 Feb 23 23:27:46.402 INFO wrmsr, value: 1073741824, msr: 3221291029
vcpu: 0
 Feb 23 23:27:46.507 INFO rdmsr, msr: 3221291039
 Feb 23 23:27:46.507 INFO wrmsr, value: 70368744177664, msr: 3221291039
vcpu: 1
 Feb 23 23:27:46.507 INFO rdmsr, msr: 3221291039
 Feb 23 23:27:46.507 INFO wrmsr, value: 70368744177664, msr: 3221291039
vcpu: 2
 Feb 23 23:27:46.508 INFO rdmsr, msr: 3221291039
 Feb 23 23:27:46.508 INFO wrmsr, value: 70368744177664, msr: 3221291039
vcpu: 3
 Feb 23 23:27:46.508 INFO rdmsr, msr: 3221291039
 Feb 23 23:27:46.508 INFO wrmsr, value: 70368744177664, msr: 3221291039
vcpu: 0
 Feb 23 23:27:46.512 ERRO Unhandled pio Out(IoPort { port: 45026, bytes: 1 }, 0), rip: 18446744072205092990
 Feb 23 23:27:46.512 ERRO Unhandled pio Out(IoPort { port: 45024, bytes: 1 }, 255), rip: 18446744072205092990
 Feb 23 23:27:46.512 ERRO Unhandled pio Out(IoPort { port: 45027, bytes: 1 }, 0), rip: 18446744072205092990
 Feb 23 23:27:46.512 ERRO Unhandled pio Out(IoPort { port: 45025, bytes: 1 }, 255), rip: 184 Feb 23 23:27:46.507 INFO rdmsr, msr: 3221291039
 Feb 23 23:27:46.507 INFO wrmsr, value: 70368744177664, msr: 3221291039
vcpu: 2
 Feb 23 23:27:46.508 INFO rdmsr, msr: 3221291039
 Feb 23 23:27:46.508 INFO wrmsr, value: 70368744177664, msr: 3221291039
vcpu: 3
 Feb 23 23:27:46.508 INFO rdmsr, msr: 3221291039
 Feb 23 23:27:46.508 INFO wrmsr, value: 70368744177664, msr: 3221291039
vcpu: 0
 Feb 23 23:27:46.512 ERRO Unhandled pio Out(IoPort { port: 45026, bytes: 1 }, 0), rip: 18446744072205092990
 Feb 23 23:27:46.512 ERRO Unhandled pio Out(IoPort { port: 45024, bytes: 1 }, 255), rip: 18446744072205092990
 Feb 23 23:27:46.512 ERRO Unhandled pio Out(IoPort { port: 45027, bytes: 1 }, 0), rip: 18446744072205092990
 Feb 23 23:27:46.512 ERRO Unhandled pio Out(IoPort { port: 45025, bytes: 1 }, 255), rip: 18446744072205092990
dev: chipset
 Feb 23 23:27:46.517 INFO piix3pm ignored cfg read, register: SmbusBase, offset: 0
 Feb 23 23:27:46.517 INFO piix3pm ignored cfg read, register: DevResA, offset: 0
 Feb 23 23:27:46.517 INFO piix3pm ignored cfg read, register: DevResB, offset: 0
 Feb 23 23:27:46.517 INFO piix3pm ignored cfg read, register: DevResC, offset: 0
 Feb 23 23:27:46.518 INFO piix3pm ignored cfg read, register: DevResI, offset: 0
 Feb 23 23:27:46.518 INFO piix3pm ignored cfg read, register: DevResJ, offset: 0
vcpu: 0
 Feb 23 23:27:46.557 INFO rdmsr, msr: 3221225705
 Feb 23 23:27:46.559 ERRO Unhandled pio In(IoPort { port: 135, bytes: 1 }), rip: 18446744072223675976
 Feb 23 23:27:46.583 INFO rdmsr, msr: 3221295136
dev: chipset
 Feb 23 23:27:47.327 INFO piix3pm ignored cfg read, register: SmbusBase, offset: 0
vcpu: 0
 Feb 23 23:27:47.342 INFO rdmsr, msr: 3221291675
 Feb 23 23:27:47.342 INFO rdmsr, msr: 3221291674
 Feb 23 23:27:47.342 INFO rdmsr, msr: 0
 Feb 23 23:27:47.342 INFO rdmsr, msr: 0
 Feb 23 23:27:47.343 INFO rdmsr, msr: 0
vcpu: 3
 Feb 23 23:29:59.786 INFO wrmsr, value: 1024, msr: 3221295136
 Feb 23 23:29:59.786 INFO wrmsr, value: 0, msr: 3221295136
 Feb 23 23:29:59.840 INFO wrmsr, value: 1024, msr: 3221295136
 Feb 23 23:29:59.840 INFO wrmsr, value: 0, msr: 3221295136
 Feb 23 23:29:59.890 INFO wrmsr, value: 1024, msr: 3221295136
 Feb 23 23:29:59.894 INFO wrmsr, value: 0, msr: 3221295136
 Feb 23 23:29:59.894 INFO wrmsr, value: 1024, msr: 3221295136
 Feb 23 23:29:59.895 INFO wrmsr, value: 0, msr: 3221295136
 Feb 23 23:29:59.895 INFO wrmsr, value: 1024, msr: 3221295136
 Feb 23 23:29:59.895 INFO wrmsr, value: 0, msr: 3221295136
 Feb 23 23:29:59.896 INFO wrmsr, value: 1024, msr: 3221295136
 Feb 23 23:29:59.896 INFO wrmsr, value: 0, msr: 3221295136
 Feb 23 23:29:59.950 INFO wrmsr, value: 1024, msr: 3221295136
 Feb 23 23:29:59.951 INFO wrmsr, value: 0, msr: 3221295136
 Feb 23 23:30:10.841 INFO wrmsr, value: 1024, msr: 3221295136
 Feb 23 23:30:10.841 INFO wrmsr, value: 0, msr: 3221295136
 Feb 23 23:30:10.894 INFO wrmsr, value: 1024, msr: 3221295136
 Feb 23 23:30:10.894 INFO wrmsr, value: 0, msr: 3221295136
 Feb 23 23:30:10.945 INFO wrmsr, value: 1024, msr: 3221295136
 Feb 23 23:30:10.949 INFO wrmsr, value: 0, msr: 3221295136
 Feb 23 23:30:10.949 INFO wrmsr, value: 1024, msr: 3221295136
 Feb 23 23:30:10.949 INFO wrmsr, value: 0, msr: 3221295136
 Feb 23 23:30:10.951 INFO wrmsr, value: 1024, msr: 3221295136
 Feb 23 23:30:10.951 INFO wrmsr, value: 0, msr: 3221295136
 Feb 23 23:30:12.361 INFO wrmsr, value: 1024, msr: 3221295136
 Feb 23 23:30:12.361 INFO wrmsr, value: 0, msr: 3221295136
 Feb 23 23:30:12.454 INFO wrmsr, value: 1024, msr: 3221295136
 Feb 23 23:30:12.454 INFO wrmsr, value: 0, msr: 3221295136
 Feb 23 23:30:12.509 INFO wrmsr, value: 1024, msr: 3221295136
 Feb 23 23:30:12.509 INFO wrmsr, value: 0, msr: 3221295136
 Feb 23 23:30:12.510 INFO wrmsr, value: 1024, msr: 3221295136
 Feb 23 23:30:12.510 INFO wrmsr, value: 0, msr: 3221295136
 Feb 23 23:30:12.510 INFO wrmsr, value: 1024, msr: 3221295136
 Feb 23 23:30:12.511 INFO wrmsr, value: 0, msr: 3221295136
 Feb 23 23:30:12.516 INFO wrmsr, value: 1024, msr: 3221295136
 Feb 23 23:30:12.516 INFO wrmsr, value: 0, msr: 3221295136
 Feb 23 23:30:12.567 INFO wrmsr, value: 1024, msr: 3221295136
 Feb 23 23:30:12.568 INFO wrmsr, value: 0, msr: 3221295136
 Feb 23 23:30:12.568 INFO wrmsr, value: 1024, msr: 3221295136
 Feb 23 23:30:12.568 INFO wrmsr, value: 0, msr: 3221295136
 Feb 23 23:30:12.569 INFO wrmsr, value: 1024, msr: 3221295136
 Feb 23 23:30:12.569 INFO wrmsr, value: 0, msr: 3221295136

I don't have the transcript of what else I did on the console, but it was basically just to add the "community" repository of apk packages (by uncommenting the line from /etc/apk/repositories) and then apk install for vim, git, go, bash, and build-base.

Here's the full ssh session I used to kick off the build:

dap@zathras ~ $ ssh -A 172.20.2.181
The authenticity of host '172.20.2.181 (172.20.2.181)' can't be established.
ED25519 key fingerprint is SHA256:jz7KTiR9ugljHsl7pYV6ExLw6kEukjmjmFsvDcT9UFk.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '172.20.2.181' (ED25519) to the list of known hosts.
Welcome to Alpine!

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

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

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

localhost:~$ git clone [email protected]:davepacheco/go.git
Cloning into 'go'...
The authenticity of host 'github.com (192.30.255.113)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
remote: Enumerating objects: 550873, done.
remote: Total 550873 (delta 0), reused 0 (delta 0), pack-reused 550873
Receiving objects: 100% (550873/550873), 324.03 MiB | 11.60 MiB/s, done.
Resolving deltas: 100% (433879/433879), done.
localhost:~$ cd go
localhost:~/go$ git checkout g1.19.2
error: pathspec 'g1.19.2' did not match any file(s) known to git
localhost:~/go$ git checkout go1.19.2
Note: switching to 'go1.19.2'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 895664482c [release-branch.go1.19] go1.19.2
localhost:~/go$ cd src/
localhost:~/go/src$ bash all.bash
-ash: bash: not found
localhost:~/go/src$ apk add bash
ERROR: Unable to lock database: Permission denied
ERROR: Failed to open apk database: Permission denied
localhost:~/go/src$ bash all.bash
Building Go cmd/dist using /usr/lib/go. (go1.19.4 linux/amd64)
Building Go toolchain1 using /usr/lib/go.






^Z[1]+  Stopped                    bash all.bash
localhost:~/go/src$ bg

That's where it stopped echoing keystrokes.

Data from the hung system

  • The first thing I noticed was that the build didn't finish in the time I expected it to.
  • I went to the console and ran pstree. At that point the console stopped echoing keystrokes.
  • I can ping the guest's IP.
  • Attempts to ssh to the guest IP hang, but using ssh -vvv I can see that the TCP connection does get established.
  • The existing ssh session continued to echo keystrokes, and I was able to ^Z (above), but it stopped echoing keystrokes when I ran bg.

The propolis process is using almost no CPU according to prstat -mLc -p 19442 1:

dap@ivanova propolis $ prstat -mLc -p 19442 1 3
Please wait...
   PID USERNAME USR SYS TRP TFL DFL LCK SLP LAT VCX ICX SCL SIG PROCESS/LWP   
 19442 root     0.0 1.0 0.0 0.0 0.0 0.0  99 0.0  74   0  38   0 propolis-standa/21
 19442 root     0.1 0.8 0.0 0.0 0.0 0.0  99 0.0  44   0 126   0 propolis-standa/19
 19442 root     0.0 0.8 0.0 0.0 0.0 0.0  99 0.0  62   0   2   0 propolis-standa/22
 19442 root     0.0 0.3 0.0 0.0 0.0 0.0  99 0.0   7   0   8   0 propolis-standa/20
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   7   0 propolis-standa/1
 19442 root     0.0 0.0 0.0 0.0 0.0 0.0 100 0.0  48   0   0   0 propolis-standa/38
 19442 root     0.0 0.0 0.0 0.0 0.0  98 1.6 0.0   1   0   6   0 propolis-standa/5
 19442 root     0.0 0.0 0.0 0.0 0.0  97 3.1 0.0   1   0   4   0 propolis-standa/16
 19442 root     0.0 0.0 0.0 0.0 0.0 4.8  95 0.0   1   0   4   0 propolis-standa/17
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/30
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/29
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/28
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/27
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/26
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/25
Total: 1 processes, 36 lwps, load averages: 0.02, 0.02, 0.02
   PID USERNAME USR SYS TRP TFL DFL LCK SLP LAT VCX ICX SCL SIG PROCESS/LWP   
 19442 root     0.0 0.4 0.0 0.0 0.0 0.0 100 0.0  24   0   2   0 propolis-standa/21
 19442 root     0.0 0.0 0.0 0.0 0.0 0.0 100 0.0   2   0   0   0 propolis-standa/19
 19442 root     0.0 0.0 0.0 0.0 0.0 0.0 100 0.0   1   0   0   0 propolis-standa/22
 19442 root     0.0 0.0 0.0 0.0 0.0 0.0 100 0.0   2   0   0   0 propolis-standa/38
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/15
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/14
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/13
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/12
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/11
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/10
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/9
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/8
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/7
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/6
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/5
Total: 1 processes, 36 lwps, load averages: 0.02, 0.02, 0.02
   PID USERNAME USR SYS TRP TFL DFL LCK SLP LAT VCX ICX SCL SIG PROCESS/LWP   
 19442 root     0.0 0.3 0.0 0.0 0.0 0.0 100 0.0  21   1   1   0 propolis-standa/21
 19442 root     0.0 0.0 0.0 0.0 0.0 0.0 100 0.0   2   0   0   0 propolis-standa/19
 19442 root     0.0 0.0 0.0 0.0 0.0 0.0 100 0.0   2   0   0   0 propolis-standa/22
 19442 root     0.0 0.0 0.0 0.0 0.0 0.0 100 0.0   1   0   0   0 propolis-standa/20
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/15
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/14
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/13
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/12
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/11
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/10
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/9
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/8
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/7
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/6
 19442 root     0.0 0.0 0.0 0.0 0.0 100 0.0 0.0   0   0   0   0 propolis-standa/5
Total: 1 processes, 36 lwps, load averages: 0.02, 0.02, 0.02

It is occasionally doing stuff. Here's about 10 seconds of truss output:

$ pfexec truss -p 19442
/22:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE89FE708) = 0
/20:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE4DFE708) = 0
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) = 0
/19:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE49FE708) = 0
/36:    lwp_park(0xFFFFFC7FEE339E60, 0)                 Err#62 ETIME
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) = 0
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) = 0
/21:    ioctl(16, (('V'<<16)|('C'<<8)|18), 0x00000001)  = 0
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) = 0
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) = 0
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) = 0
/13:    lwp_park(0x00000000, 0)         (sleeping...)
/30:    lwp_park(0x00000000, 0)         (sleeping...)
/3:     lwp_park(0x00000000, 0)         (sleeping...)
/7:     lwp_park(0x00000000, 0)         (sleeping...)
/12:    lwp_park(0x00000000, 0)         (sleeping...)
/27:    lwp_park(0x00000000, 0)         (sleeping...)
/26:    lwp_park(0x00000000, 0)         (sleeping...)
/22:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE89FE708) (sleeping...)
/11:    lwp_park(0x00000000, 0)         (sleeping...)
/5:     lwp_park(0x00000000, 0)         (sleeping...)
/24:    lwp_park(0x00000000, 0)         (sleeping...)
/20:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE4DFE708) (sleeping...)
/28:    lwp_park(0x00000000, 0)         (sleeping...)
/23:    lwp_park(0x00000000, 0)         (sleeping...)
/29:    lwp_park(0x00000000, 0)         (sleeping...)
/17:    ioctl(3, DP_POLL, 0xFFFFFC7FE25FE330) (sleeping...)
/1:     lwp_park(0x00000000, 0)         (sleeping...)
/2:     lwp_park(0x00000000, 0)         (sleeping...)
/6:     lwp_park(0x00000000, 0)         (sleeping...)
/31:    lwp_park(0x00000000, 0)         (sleeping...)
/15:    lwp_park(0x00000000, 0)         (sleeping...)
/8:     lwp_park(0x00000000, 0)         (sleeping...)
/19:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE49FE708) (sleeping...)
/32:    read(14, 0xFFFFFC7FE55FF93F, 1) (sleeping...)
/4:     lwp_park(0x00000000, 0)         (sleeping...)
/14:    lwp_park(0x00000000, 0)         (sleeping...)
/9:     lwp_park(0x00000000, 0)         (sleeping...)
/18:    lwp_park(0x00000000, 0)         (sleeping...)
/10:    lwp_park(0x00000000, 0)         (sleeping...)
/16:    lwp_park(0x00000000, 0)         (sleeping...)
/25:    lwp_park(0x00000000, 0)         (sleeping...)
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) = 0
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) = 0
/36:    lwp_park(0xFFFFFC7FEE339E60, 0) (sleeping...)
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) = 0
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) = 0
/21:    ioctl(16, (('V'<<16)|('C'<<8)|18), 0x00000001)  = 0
/19:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE49FE708) = 0
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) (sleeping...)
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) = 0
/21:    ioctl(16, (('V'<<16)|('C'<<8)|18), 0x00000001)  = 0
/22:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE89FE708) = 0
/19:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE49FE708) (sleeping...)
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) (sleeping...)
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) = 0
/21:    ioctl(16, (('V'<<16)|('C'<<8)|18), 0x00000001)  = 0
/22:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE89FE708) (sleeping...)
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) (sleeping...)
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) = 0
/21:    ioctl(16, (('V'<<16)|('C'<<8)|18), 0x00000001)  = 0
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) (sleeping...)
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) = 0
/21:    ioctl(16, (('V'<<16)|('C'<<8)|18), 0x00000001)  = 0
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) = 0
/19:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE49FE708) = 0
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) = 0
/21:    ioctl(16, (('V'<<16)|('C'<<8)|18), 0x00000001)  = 0
/22:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE89FE708) = 0
/19:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE49FE708) (sleeping...)
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) (sleeping...)
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) = 0
/21:    ioctl(16, (('V'<<16)|('C'<<8)|18), 0x00000001)  = 0
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) = 0
/22:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE89FE708) (sleeping...)
/21:    ioctl(11, (('v'<<16)|('p'<<8)|1), 0xFFFFFC7FE7BFE708) = 0
/21:    ioctl(16, (('V'<<16)|('C'<<8)|18), 0x00000001)  = 0

For the record, here are the open files and the process arguments and environment:

 $ pfexec pfiles 19442
19442:  target/debug/propolis-standalone config-installed.toml
  Current rlimit: 65536 file descriptors
   0: S_IFCHR mode:0620 dev:544,0 ino:730391353 uid:501 gid:7 rdev:169,3
      O_RDWR|O_NOCTTY|O_LARGEFILE
      /dev/pts/3
      offset:3385370
   1: S_IFCHR mode:0620 dev:544,0 ino:730391353 uid:501 gid:7 rdev:169,3
      O_RDWR|O_NOCTTY|O_LARGEFILE
      /dev/pts/3
      offset:3385370
   2: S_IFCHR mode:0620 dev:544,0 ino:730391353 uid:501 gid:7 rdev:169,3
      O_RDWR|O_NOCTTY|O_LARGEFILE
      /dev/pts/3
      offset:3385370
   3: S_IFCHR mode:0666 dev:543,0 ino:84410372 uid:0 gid:3 rdev:161,0
      O_RDWR|O_LARGEFILE FD_CLOEXEC
      /devices/pseudo/poll@0:poll
      offset:16
   4: S_IFIFO mode:0000 dev:541,0 ino:7818005 uid:0 gid:0 rdev:0,0
      O_RDWR|O_NONBLOCK FD_CLOEXEC
   5: S_IFIFO mode:0000 dev:541,0 ino:7818005 uid:0 gid:0 rdev:0,0
      O_RDWR|O_NONBLOCK FD_CLOEXEC
   6: S_IFCHR mode:0666 dev:543,0 ino:84410372 uid:0 gid:3 rdev:161,0
      O_RDWR|O_LARGEFILE FD_CLOEXEC
      /devices/pseudo/poll@0:poll
      offset:16
   7: S_IFSOCK mode:0666 dev:554,0 ino:751373202 uid:0 gid:0 rdev:0,0
      O_RDWR|O_NONBLOCK FD_CLOEXEC
        SOCK_STREAM
        SO_SNDBUF(16384),SO_RCVBUF(5120)
        sockname: AF_UNIX 
        peer: propolis-standa[19442] zone: global[0]
   8: S_IFSOCK mode:0666 dev:554,0 ino:1048877293 uid:0 gid:0 rdev:0,0
      O_RDWR|O_NONBLOCK FD_CLOEXEC
        SOCK_STREAM
        SO_SNDBUF(16384),SO_RCVBUF(5120)
        sockname: AF_UNIX 
        peer: propolis-standa[19442] zone: global[0]
   9: S_IFSOCK mode:0666 dev:554,0 ino:751373202 uid:0 gid:0 rdev:0,0
      O_RDWR|O_NONBLOCK FD_CLOEXEC
        SOCK_STREAM
        SO_SNDBUF(16384),SO_RCVBUF(5120)
        sockname: AF_UNIX 
        peer: propolis-standa[19442] zone: global[0]
  10: S_IFREG mode:0644 dev:259,65542 ino:1601063 uid:0 gid:0 size:92015
      O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE FD_CLOEXEC
      /home/dap/propolis/debug.out
      offset:92015
  11: S_IFCHR mode:0600 dev:544,0 ino:3305595808 uid:0 gid:3 rdev:277,22
      O_RDWR|O_LARGEFILE FD_CLOEXEC
      /dev/vmm/testvm
      offset:0
  12: S_IFSOCK mode:0666 dev:554,0 ino:751373200 uid:0 gid:0 rdev:0,0
      O_RDWR|O_NONBLOCK FD_CLOEXEC
        SOCK_STREAM
        SO_SNDBUF(16384),SO_RCVBUF(5120)
        sockname: AF_UNIX ./ttya
  13: S_IFREG mode:0600 dev:259,65542 ino:1749929 uid:501 gid:10 size:42949672960
      O_RDWR|O_LARGEFILE FD_CLOEXEC
      /home/dap/propolis/data_disk
      offset:0
  14: S_IFIFO mode:0000 dev:541,0 ino:7818010 uid:0 gid:0 rdev:0,0
      O_RDWR FD_CLOEXEC
  15: S_IFIFO mode:0000 dev:541,0 ino:7818010 uid:0 gid:0 rdev:0,0
      O_RDWR|O_NONBLOCK FD_CLOEXEC
  16: S_IFCHR mode:0000 dev:543,0 ino:39228 uid:0 gid:0 rdev:276,10
      O_RDWR|O_LARGEFILE FD_CLOEXEC
      /devices/pseudo/viona@0:viona
      offset:0
  17: S_IFCHR mode:0000 dev:543,0 ino:60435 uid:0 gid:0 rdev:161,1
      O_RDWR|O_LARGEFILE FD_CLOEXEC
      /devices/pseudo/poll@0:poll
      offset:16
  18: S_IFSOCK mode:0666 dev:554,0 ino:751373205 uid:0 gid:0 rdev:0,0
      O_RDWR|O_NONBLOCK FD_CLOEXEC
        SOCK_STREAM
        SO_SNDBUF(16384),SO_RCVBUF(5120)
        sockname: AF_UNIX ./ttya
        peername: AF_UNIX 
        peer: sercons[19445] zone: global[0]
dap@ivanova ~ $ pfexec pargs 19442
19442:  target/debug/propolis-standalone config-installed.toml
argv[0]: target/debug/propolis-standalone
argv[1]: config-installed.toml
dap@ivanova ~ $ pfexec pargs -e 19442
19442:  target/debug/propolis-standalone config-installed.toml
envp[0]: BASH_SILENCE_DEPRECATION_WARNING=1
envp[1]: BAT_THEME=ansi
envp[2]: BUNYAN_NO_PAGER=1
envp[3]: CARGO=/home/dap/.rustup/toolchains/1.66.1-x86_64-unknown-illumos/bin/cargo
envp[4]: CARGO_HOME=/home/dap/.cargo
envp[5]: CARGO_MANIFEST_DIR=/home/dap/propolis/bin/propolis-standalone
envp[6]: CARGO_PKG_AUTHORS=Patrick Mooney <[email protected]>
envp[7]: CARGO_PKG_DESCRIPTION=
envp[8]: CARGO_PKG_HOMEPAGE=
envp[9]: CARGO_PKG_LICENSE=MPL-2.0
envp[10]: CARGO_PKG_LICENSE_FILE=
envp[11]: CARGO_PKG_NAME=propolis-standalone
envp[12]: CARGO_PKG_REPOSITORY=
envp[13]: CARGO_PKG_RUST_VERSION=
envp[14]: CARGO_PKG_VERSION=0.1.0
envp[15]: CARGO_PKG_VERSION_MAJOR=0
envp[16]: CARGO_PKG_VERSION_MINOR=1
envp[17]: CARGO_PKG_VERSION_PATCH=0
envp[18]: CARGO_PKG_VERSION_PRE=
envp[19]: CSCOPEOPTIONS=-r -p8
envp[20]: EDITOR=vim
envp[21]: HOME=/home/dap
envp[22]: HOST=ivanova
envp[23]: LANG=en_US.UTF-8
envp[24]: LD_LIBRARY_PATH=/home/dap/propolis/target/debug/build/libgit2-sys-904a1e196f3b5383/out/build:/home/dap/propolis/target/debug/build/ring-6e37a49a67f3f835/out:/home/dap/propolis/target/debug/deps:/home/dap/propolis/target/debug:/home/dap/.rustup/toolchains/1.66.1-x86_64-unknown-illumos/lib/rustlib/x86_64-unknown-illumos/lib:/home/dap/.rustup/toolchains/1.66.1-x86_64-unknown-illumos/lib
envp[25]: LESS=-P ?f%f .line %lb/%L .byte %bB?s/%s. ?e(END):?pB%pB\\%..%t
envp[26]: LOGNAME=dap
envp[27]: MACH=i386
envp[28]: MACHINE_THAT_GOES_PING=1
envp[29]: OLDPWD=/home/dap
envp[30]: PAGER=less -X
envp[31]: PATH=/home/dap/.cargo/bin::/home/dap/bin:/home/dap/install/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/gnu/bin:/opt/ooce/bin:/home/dap/tools/cockroachdb/bin:/home/dap/tools/clickhouse
envp[32]: PS1=\\[\\033]0;\\w (\\h)\\007\\]\\u@ivanova \\[\033[1m\\]\\W\\[\033(B\033[m\\] $ 
envp[33]: PWD=/home/dap/propolis
envp[34]: RAWPS1=\\u@ivanova \\[\033[1m\\]\\W\\[\033(B\033[m\\] $ 
envp[35]: RUSTUP_HOME=/home/dap/.rustup
envp[36]: RUSTUP_TOOLCHAIN=1.66.1-x86_64-unknown-illumos
envp[37]: RUST_RECURSION_COUNT=1
envp[38]: SHELL=/bin/bash
envp[39]: SHLVL=1
envp[40]: SSH_AUTH_SOCK=/tmp/ssh-XXXXwSaGDx/agent.12012
envp[41]: SSH_CLIENT=172.20.16.62 54758 22
envp[42]: SSH_CONNECTION=172.20.16.62 54758 172.20.2.70 22
envp[43]: SSH_TTY=/dev/pts/3
envp[44]: SSL_CERT_DIR=/usr/ssl/certs
envp[45]: SSL_CERT_FILE=/etc/ssl/cacert.pem
envp[46]: TERM=xterm-256color
envp[47]: TMPDIR=/dangerzone/omicron_tmp
envp[48]: TZ=US/Pacific
envp[49]: USER=dap
envp[50]: VISUAL=vim
envp[51]: _=/bin/pfexec

I've saved a core file that I'll put somewhere.

Activity

  1. davepacheco commented on Feb 24, 2023

    @davepacheco
    ContributorAuthor

    I tried sending an NMI with:

    $ pfexec bhyvectl --vm=testvm --inject-nmi
    $ 
    

    That appeared to work but had no visible impact on the console, ssh session, ping behavior, or the propolis-standalone log.

    It's worth noting that it's been several minutes and the ssh session has not been terminated by TCP, which suggests that the guest is continuing to pass some packets? Otherwise I think the local networking stack would have declared it dead.

  2. davepacheco commented on Feb 24, 2023

    @davepacheco
    ContributorAuthor

    kernel stacks for that process:

    $ pfexec mdb -k
    Loading modules: [ unix genunix specfs dtrace mac cpu.generic uppc apix scsi_vhci zfs sata ip hook neti sockfs arp usba xhci sd smbios stmf stmf_sbd mm lofs random crypto cpc ufs logindmux nsmb ptm smbsrv nfs ]
    > 0t19442::pid2proc | ::walk thread | ::stacks
    THREAD           STATE    SOBJ                COUNT
    fffffe594a0cc7e0 SLEEP    CV                     26
                     swtch+0x133
                     cv_wait_sig_swap_core+0x18c
                     cv_wait_sig_swap+0xd
                     cv_waituntil_sig+0xd5
                     lwp_park+0x136
                     syslwp_park+0x51
    
    fffffe594a0b4bc0 SLEEP    CV                      4
                     swtch+0x133
                     cv_wait_sig+0x171
                     vm_handle_hlt+0x167
                     vm_run+0x485
                     vmmdev_do_ioctl+0xdb2
                     vmm_ioctl+0x144
                     cdev_ioctl+0x2b
                     spec_ioctl+0x45
                     fop_ioctl+0x5b
                     ioctl+0x153
    
    ffffff1d94097780 SLEEP    CV                      1
                     swtch+0x133
                     cv_timedwait_sig_hires+0x2fb
                     cv_waituntil_sig+0x105
                     lwp_park+0x136
                     syslwp_park+0x51
    
    fffffe5946e474a0 SLEEP    CV                      1
                     swtch+0x133
                     cv_wait_sig+0x171
                     viona_worker_rx+0x8a
                     viona_worker+0x25a
                     thread_start+0xb
    
    ffffff5e542617e0 SLEEP    CV                      1
                     swtch+0x133
                     cv_wait_sig+0x171
                     viona_worker_tx+0x134
                     viona_worker+0x126
                     thread_start+0xb
    
    fffffe594dba2460 SLEEP    CV                      1
                     swtch+0x133
                     cv_wait_sig_swap_core+0x18c
                     cv_wait_sig_swap+0xd
                     cv_timedwait_sig_hrtime+0x2d
                     dpioctl+0x491
                     cdev_ioctl+0x2b
                     spec_ioctl+0x45
                     fop_ioctl+0x5b
                     ioctl+0x153
    
    fffffea8721b2b40 SLEEP    CV                      1
                     swtch+0x133
                     cv_wait_sig_swap_core+0x18c
                     cv_wait_sig_swap+0xd
                     fifo_read+0xbf
                     fop_read+0x60        
                     read+0x2b5
    
    
    

    I don't think the host is out of memory:

    > ::memstat
    Page Summary                Pages                MB  %Tot
    ------------     ----------------  ----------------  ----
    Kernel                    2169851              8475   13%
    Boot pages                    127                 0    0%
    ZFS File Data            11695420             45685   70%
    VMM Memory                 525312              2052    3%
    Anon                        27794               108    0%
    Exec and libs               17463                68    0%
    Page cache                   5164                20    0%
    Free (cachelist)          1844682              7205   11%
    Free (freelist)            471465              1841    3%
    
    Total                    16757278             65458
    Physical                 16757277             65458
    

    Plenty of swap, I think?

    dap@ivanova ~ $ swap -sh
    total: 145.04M allocated + 22.67M reserved = 167.71M used, 64.86G available
    

    I've put the core file on catacomb:

    dap@catacomb /data/staff/core/issues/propolis-322 $ ls -l
    total 60761
    -rw-rw-r--+  1 dap      staff    31103491 Feb 24 00:53 core.19442.gz
    
  3. davepacheco commented on Feb 24, 2023

    @davepacheco
    ContributorAuthor

    Eventually I sent SIGINT to propolis-standalone:

    ^CFeb 24 00:55:38.712 INFO Destroying instance...
    Feb 24 00:55:38.712 INFO Instance event ReqHalt (User("Ctrl+C"))
    Feb 24 00:55:38.712 INFO State transition Run -> Quiesce
    Feb 24 00:55:38.713 INFO State transition Quiesce -> Halt
    Feb 24 00:55:38.714 INFO State transition Halt -> Destroy
    Feb 24 00:55:39.025 INFO Instance destroyed
    

    Within a minute or two, the ssh session reported:

    client_loop: send disconnect: Broken pipe
    

    which again suggests to me that before that point, the guest TCP stack was working.

  4. davepacheco commented on Feb 24, 2023

    @davepacheco
    ContributorAuthor

    After a reboot (around 2023-02-24T00:58Z):

    ^CFeb 24 00:55:38.712 INFO Destroying instance...
    Feb 24 00:55:38.712 INFO Instance event ReqHalt (User("Ctrl+C"))
    Feb 24 00:55:38.712 INFO State transition Run -> Quiesce
    Feb 24 00:55:38.713 INFO State transition Quiesce -> Halt
    Feb 24 00:55:38.714 INFO State transition Halt -> Destroy
    Feb 24 00:55:39.025 INFO Instance destroyed
    

    here's /var/log/messages:

    Feb 23 23:27:47 localhost syslog.info syslogd started: BusyBox v1.35.0
    Feb 23 23:27:47 localhost daemon.info init: starting pid 1733, tty '': '/sbin/openrc default'
    Feb 23 23:27:47 localhost daemon.info chronyd[1784]: chronyd version 4.3 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP -SCFILTER +SIGND +ASYNCDNS +NTS +SECHASH +IPV6 -DEBUG)
    Feb 23 23:27:47 localhost daemon.warn chronyd[1784]: Could not read valid frequency and skew from driftfile /var/lib/chrony/chrony.drift
    Feb 23 23:27:54 localhost daemon.info chronyd[1784]: System's initial offset : 1.582928 seconds slow of true (slew)
    Feb 23 23:27:56 localhost cron.info crond[1810]: crond (busybox 1.35.0) started, log level 8
    Feb 23 23:27:56 localhost auth.info sshd[1846]: Server listening on 0.0.0.0 port 22.
    Feb 23 23:27:56 localhost auth.info sshd[1846]: Server listening on :: port 22.
    Feb 23 23:27:56 localhost daemon.info init: starting pid 1853, tty '/dev/tty1': '/sbin/getty 38400 tty1'
    Feb 23 23:27:56 localhost daemon.info init: starting pid 1854, tty '/dev/tty2': '/sbin/getty 38400 tty2'
    Feb 23 23:27:56 localhost daemon.info init: starting pid 1858, tty '/dev/tty3': '/sbin/getty 38400 tty3'
    Feb 23 23:27:56 localhost daemon.info init: starting pid 1862, tty '/dev/tty4': '/sbin/getty 38400 tty4'
    Feb 23 23:27:56 localhost daemon.info init: starting pid 1866, tty '/dev/tty5': '/sbin/getty 38400 tty5'
    Feb 23 23:27:56 localhost daemon.info init: starting pid 1870, tty '/dev/tty6': '/sbin/getty 38400 tty6'
    Feb 23 23:27:56 localhost daemon.info init: starting pid 1874, tty '/dev/ttyS0': '/sbin/getty -L 0 ttyS0 vt100'
    Feb 23 23:28:01 localhost daemon.info chronyd[1784]: Selected source 45.33.53.84 (pool.ntp.org)
    Feb 23 23:28:18 localhost auth.info login[1875]: root login on 'ttyS0'
    Feb 23 23:29:59 localhost auth.info sshd[1885]: Connection closed by 172.20.16.62 port 55802 [preauth]
    Feb 23 23:30:00 localhost cron.info crond[1810]: USER root pid 1887 cmd run-parts /etc/periodic/15min
    Feb 23 23:30:12 localhost auth.info sshd[1888]: Accepted publickey for dap from 172.20.16.62 port 55803 ssh2: RSA SHA256:kHDtkfHCS+N19VW5HLd09b9YmMAyPv79OfZrh8rpR8g
    Feb 24 00:58:33 localhost syslog.info syslogd started: BusyBox v1.35.0
    Feb 24 00:58:33 localhost daemon.info init: starting pid 1731, tty '': '/sbin/openrc default'
    Feb 24 00:58:33 localhost daemon.info chronyd[1782]: chronyd version 4.3 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP -SCFILTER +SIGND +ASYNCDNS +NTS +SECHASH +IPV6 -DEBUG)
    Feb 24 00:58:33 localhost daemon.warn chronyd[1782]: Could not read valid frequency and skew from driftfile /var/lib/chrony/chrony.drift
    Feb 24 00:58:37 localhost daemon.info chronyd[1782]: System's initial offset : 2.217260 seconds slow of true (slew)
    Feb 24 00:58:39 localhost cron.info crond[1808]: crond (busybox 1.35.0) started, log level 8
    Feb 24 00:58:39 localhost auth.info sshd[1844]: Server listening on 0.0.0.0 port 22.
    Feb 24 00:58:39 localhost auth.info sshd[1844]: Server listening on :: port 22.
    Feb 24 00:58:39 localhost daemon.info init: starting pid 1851, tty '/dev/tty1': '/sbin/getty 38400 tty1'
    Feb 24 00:58:39 localhost daemon.info init: starting pid 1852, tty '/dev/tty2': '/sbin/getty 38400 tty2'
    Feb 24 00:58:39 localhost daemon.info init: starting pid 1856, tty '/dev/tty3': '/sbin/getty 38400 tty3'
    Feb 24 00:58:39 localhost daemon.info init: starting pid 1860, tty '/dev/tty4': '/sbin/getty 38400 tty4'
    Feb 24 00:58:39 localhost daemon.info init: starting pid 1864, tty '/dev/tty5': '/sbin/getty 38400 tty5'
    Feb 24 00:58:39 localhost daemon.info init: starting pid 1868, tty '/dev/tty6': '/sbin/getty 38400 tty6'
    Feb 24 00:58:39 localhost daemon.info init: starting pid 1872, tty '/dev/ttyS0': '/sbin/getty -L 0 ttyS0 vt100'
    Feb 24 00:58:44 localhost daemon.info chronyd[1782]: Selected source 152.44.36.235 (pool.ntp.org)
    Feb 24 00:58:45 localhost auth.info login[1873]: root login on 'ttyS0'
    Feb 24 00:59:01 localhost auth.info sshd[1876]: Accepted publickey for dap from 172.20.16.62 port 56570 ssh2: RSA SHA256:kHDtkfHCS+N19VW5HLd09b9YmMAyPv79OfZrh8rpR8g
    Feb 24 00:59:07 localhost auth.notice su: + pts/0 dap:root
    Feb 24 01:00:00 localhost cron.info crond[1808]: USER root pid 1887 cmd run-parts /etc/periodic/15min
    Feb 24 01:00:00 localhost cron.info crond[1808]: USER root pid 1888 cmd run-parts /etc/periodic/hourly
    
  5. davepacheco commented on Feb 24, 2023

    @davepacheco
    ContributorAuthor

    On reboot, I started with memory = 8192 (8x before). This time it quickly built Go and ran the tests. We ran into an apparently known issue related to Go on Alpine: golang/go#39857. I used a workaround I found there to run the tests as ./run.bash -run='!(^cgo_test$)' and that passed. Then I ran them again in a loop, but it seemed to be taking too long. I ^C'd that, ran git status, and that seems hung in a weird way:

    localhost:~/go/src$ while ./run.bash -run='!(^cgo_test$)' > test.out 2>&1; do date; done
    ^Clocalhost:~/go/src$ git status
    ^Cp^U^C^C^Z
    
    
    
    
    ^Z
    

    This time, the console is echoing characters, but it's apparently stuck here:

    localhost login: root
    
    
    
    

    I was able to ssh in and run pstree, but once again it got stuck (still echoing characters) doing something else:

    dap@zathras ~ $ ssh -A 172.20.2.181
    Welcome to Alpine!
    
    The Alpine Wiki contains a large amount of how-to guides and general
    information about administrating Alpine systems.
    See <https://wiki.alpinelinux.org/>.
    
    You can setup the system with the command: setup-alpine
    
    You may change this message by editing /etc/motd.
    
    localhost:~$ pstree
    init-+-acpid
         |-chronyd
         |-crond---3*[run-parts]
         |-6*[getty]
         |-login
         |-sshd-+-sshd---sshd---ash---git
         |      `-sshd---sshd---ash---pstree
         |-syslogd
         `-udhcpc---default.script---mv
    
    localhost:~$ apk add pstack
    
    ^Z^C
    

    I'm able to log in again, but it gets stuck trying to switch to root:

    dap@zathras ~ $ ssh -A 172.20.2.181
    Welcome to Alpine!
    
    The Alpine Wiki contains a large amount of how-to guides and general
    information about administrating Alpine systems.
    See <https://wiki.alpinelinux.org/>.
    
    You can setup the system with the command: setup-alpine
    
    You may change this message by editing /etc/motd.
    
    localhost:~$ dmesg
    dmesg: klogctl: Operation not permitted
    localhost:~$ su 
    Password: 
    

    It gets stuck if I try to ssh as root:

    dap@zathras ~ $ ssh [email protected]
    
    

    With -vvv:

    ...
    debug1: SSH2_MSG_SERVICE_ACCEPT received
    debug3: send packet: type 50
    debug3: receive packet: type 51
    debug1: Authentications that can continue: publickey,password,keyboard-interactive
    debug3: start over, passed a different list publickey,password,keyboard-interactive
    debug3: preferred publickey,keyboard-interactive,password
    debug3: authmethod_lookup publickey
    debug3: remaining preferred: keyboard-interactive,password
    debug3: authmethod_is_enabled publickey
    debug1: Next authentication method: publickey
    debug1: Offering public key: [email protected] RSA SHA256:kHDtkfHCS+N19VW5HLd09b9YmMAyPv79OfZrh8rpR8g agent
    debug3: send packet: type 50
    debug2: we sent a publickey packet, wait for reply
    

    I tried to read /var/log/messages as my unprivileged user, and that got stuck:

    localhost:~$ cd /var/log
    localhost:/var/log$ ls
    acpid.log  chrony     dmesg      messages   wtmp
    localhost:/var/log$ ls -l
    total 44
    -rw-r-----    1 root     wheel            0 Feb 23 23:27 acpid.log
    drwxr-s---    2 root     wheel         4096 Feb 23 23:27 chrony
    -rw-r-----    1 root     root         25734 Feb 24 01:06 dmesg
    -rw-r-----    1 root     wheel         8321 Feb 24 03:18 messages
    -rw-rw-r--    1 root     utmp             0 Feb 23 23:27 wtmp
    localhost:/var/log$ cat messages 
    

    This is obviously pretty weird behavior. I'm not sure how else to look for evidence of memory pressure (or anything else) here.

  6. davepacheco commented on Feb 24, 2023

    @davepacheco
    ContributorAuthor

    This system does not appear low on memory:

    localhost:~$ free
                  total        used        free      shared  buff/cache   available
    Mem:        8140588       99572     5587712        3828     2453304     7743948
    Swap:       1984508           0     1984508
    
  7. added
    guest-os
    on Mar 1, 2023
  8. jmpesp commented on Mar 6, 2023

    @jmpesp
    Contributor

    For what it's worth, I attempted reproducing this by following the steps here and letting ./run.bash (with the appropriate exclusions for Alpine) run in a loop for 48 hours. I did not see any instability or hanging running with stock Helios.

    Note that Alpine is not configured to write kernel messages out on the serial console by the default install. You'll need to edit /etc/default/grub and add console=ttyS0,115200 to GRUB_CMDLINE_LINUX_DEFAULT (running grub-mkconfig -o /boot/grub/grub.cfg to apply the change). If you want to log in on the serial console, you'll need to edit /etc/inittab and uncomment:

    # Put a getty on the serial port
    ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100
    

    and (optionally) comment out any other ttyS0 lines.

    I say this because before hanging there might be some messages there that could shed some light on what's happening.

  9. jmpesp commented on Mar 6, 2023

    @jmpesp
    Contributor

    When chatting about this issue, it occurred to me that I was attempting to reproduce using alpine-virt-3.17.2-x86_64.iso instead of alpine-extended-3.17.2-x86_64.iso. Attempting again with the extended install.

  10. jmpesp commented on Mar 6, 2023

    @jmpesp
    Contributor

    The difference seems to be

    Linux alpine 5.15.96-0-virt #1-Alpine SMP Sat, 25 Feb 2023 21:02:54 +0000 x86_64 Linux
    

    vs

    Linux extended 5.15.98-0-lts #1-Alpine SMP Fri, 03 Mar 2023 16:01:50 +0000 x86_64 Linux
    

    but there's still no hangs here.

  11. added this to the Investigation Needed milestone on Apr 6, 2023
  12. removed their assignment
    on Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    guest-os

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions