Skip to content

Virtual devices 'missing' in 0.6.x releases #719

@rrjjvv

Description

@rrjjvv

I'm attempting to get a buildkit-based tool (not directly pertinent to this report)l to work under sysbox. I was contemplating filing an issue for the problem I was facing, but realized I wasn't running the latest version. I upgraded in the hopes of the problem being addressed, but the upgrade (0.5.2 -> 0.6.2) resulted in another problem (this report) much earlier in the startup process, which had worked before. The tool has a startup script which auto-detects/configures MTUs, which stopped working in 0.6.1. The failure manifests slightly different in 0.6.2, so including here as well.

Host system:

$ uname -a
Linux l-9jylpn3 5.19.0-46-generic #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jun 21 15:35:31 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

$ docker version -f json | jq -r '.Server.Version'
24.0.4

Settings-related startup logs (0.5.2, 'working' version):

ul 21 19:43:05 sysbox-fs[1094146]: time="2023-07-21 19:43:05" level=info msg="Initializing with 'allow-immutable-remounts' knob disabled (default)"
Jul 21 19:43:05 sysbox-fs[1094146]: time="2023-07-21 19:43:05" level=info msg="Initializing with 'allow-immutable-unmounts' knob enabled (default)"
Jul 21 19:43:05 sysbox-fs[1094146]: time="2023-07-21 19:43:05" level=info msg="FUSE dir = /var/lib/sysboxfs"
Jul 21 19:43:05 sysbox-fs[1094146]: time="2023-07-21 19:43:05" level=info msg="IOvec memParser elected"
$ sysbox-mgr --version && sysbox-fs --version && sysbox-runc --version
sysbox-mgr
	edition: 	Community Edition (CE)
	version: 	0.5.2
	commit: 	ea1b7db91031355cb10b850125e0d6502dc38962
	built at: 	Wed May 18 19:49:36 UTC 2022
	built by: 	Rodny Molina
sysbox-fs
	edition: 	Community Edition (CE)
	version: 	0.5.2
	commit: 	95a773a6ea3920f7ab454f1583465c7aea4c701f
	built at: 	Wed May 18 19:49:30 UTC 2022
	built by: 	Rodny Molina
sysbox-runc
	edition: 	Community Edition (CE)
	version: 	0.5.2
	commit: 	d91c42c2125fd7aaf46f66307eb5c2a025f30289
	built at: 	Wed May 18 19:49:04 UTC 2022
	built by: 	Rodny Molina
	oci-specs: 	1.0.2-dev

$ docker run --runtime sysbox-runc --rm -it alpine sh -c 'ls -al /sys/class/net/ && ls -al /sys/devices/virtual/net'
total 0
drwxr-xr-x    2 nobody   nobody           0 Jul 22 01:06 .
drwxr-xr-x   88 nobody   nobody           0 Jul 22 01:06 ..
lrwxrwxrwx    1 root     root             0 Jul 22 01:06 eth0 -> ../../devices/virtual/net/eth0
lrwxrwxrwx    1 root     root             0 Jul 22 01:06 lo -> ../../devices/virtual/net/lo
total 0
drwxr-xr-x   31 nobody   nobody           0 Jul 22 01:06 .
drwxr-xr-x   25 nobody   nobody           0 Jul 22 01:06 ..
drwxr-xr-x    5 root     root             0 Jul 22 01:06 eth0
drwxr-xr-x    5 root     root             0 Jul 22 01:06 lo

Unlike below, the symlink to eth0 is intact, and the routine that auto-configures CNI MTUs works just fine.

Settings-related logs for 0.6.1, the first version with the problem:

Jul 21 19:53:15 sysbox-mgr[1096596]: time="2023-07-21 19:53:15" level=info msg="Shiftfs module found in kernel: yes"
Jul 21 19:53:15 sysbox-mgr[1096596]: time="2023-07-21 19:53:15" level=info msg="Shiftfs works properly: no"
Jul 21 19:53:15 sysbox-mgr[1096596]: time="2023-07-21 19:53:15" level=info msg="Shiftfs-on-overlayfs works properly: no"
Jul 21 19:53:15 sysbox-mgr[1096596]: time="2023-07-21 19:53:15" level=info msg="ID-mapped mounts supported by kernel: yes"
Jul 21 19:53:15 sysbox-mgr[1096596]: time="2023-07-21 19:53:15" level=info msg="Overlayfs on ID-mapped mounts supported by kernel: yes"
Jul 21 19:53:15 sysbox-mgr[1096596]: time="2023-07-21 19:53:15" level=info msg="Operating in system container mode."
Jul 21 19:53:15 sysbox-mgr[1096596]: time="2023-07-21 19:53:15" level=info msg="Inner container image preloading enabled."

Jul 21 19:53:15 sysbox-fs[1096618]: time="2023-07-21 19:53:15" level=info msg="Initializing with 'allow-immutable-remounts' knob disabled (default)"
Jul 21 19:53:15 sysbox-fs[1096618]: time="2023-07-21 19:53:15" level=info msg="Initializing with 'allow-immutable-unmounts' knob enabled (default)"
Jul 21 19:53:15 sysbox-fs[1096618]: time="2023-07-21 19:53:15" level=info msg="FUSE dir = /var/lib/sysboxfs"
Jul 21 19:53:15 sysbox-fs[1096618]: time="2023-07-21 19:53:15" level=info msg="IOvec memParser elected"
$ sysbox-mgr --version && sysbox-fs --version && sysbox-runc --version
sysbox-mgr
	edition: 	Community Edition (CE)
	version: 	0.6.1
	commit: 	ba99c0e7088f1e1ab51f95551f50de9524176655
	built at: 	Sat Apr  8 06:08:57 UTC 2023
	built by: 	Rodny Molina
sysbox-fs
	edition: 	Community Edition (CE)
	version: 	0.6.1
	commit: 	a2631f69c62722c67dfd3aa97a8412b5c4db6a8a
	built at: 	Sat Apr  8 06:08:45 UTC 2023
	built by: 	Rodny Molina
sysbox-runc
	edition: 	Community Edition (CE)
	version: 	0.6.1
	commit: 	278997aab055ad6eec9e48a555b90eef877596b7
	built at: 	Sat Apr  8 06:08:15 UTC 2023
	built by: 	Rodny Molina
	oci-specs: 	1.0.2-dev

$ docker run --runtime sysbox-runc --rm -it alpine sh -c 'ls -al /sys/class/net/ && ls -al /sys/devices/virtual/net'
total 0
drwxr-xr-x    2 nobody   nobody           0 Jul 22 01:08 .
drwxr-xr-x   88 nobody   nobody           0 Jul 22 01:08 ..
lrwxrwxrwx    1 root     root             0 Jul 22 01:08 eth0 -> ../../devices/virtual/net/eth0
lrwxrwxrwx    1 root     root             0 Jul 22 01:08 lo -> ../../devices/virtual/net/lo
total 0
drwxr-xr-x    7 nobody   nobody           0 Jul 20 06:59 br-cfb30d4453e7
drwxr-xr-x    7 nobody   nobody           0 Jul 22 00:28 docker0
drwxr-xr-x    5 nobody   nobody           0 Jul 20 06:59 gpd0
drwxr-xr-x    5 nobody   nobody           0 Jul 20 06:59 lo
drwxr-xr-x    7 nobody   nobody           0 Jul 20 06:59 lxcbr0
drwxr-xr-x    5 nobody   nobody           0 Jul 21 17:26 tun0
drwxr-xr-x    6 nobody   nobody           0 Jul 22 01:08 vethaad19ee

It isn't as obvious without color, but eth0 is a broken symlink; it is not present in the devices hierarchy. This is the ultimate problem (cat: can't open '/sys/class/net/eth0/mtu': No such file or directory). Whether pertinent or not,

  1. the number of virtual devices that show up has increased (not a problem for me... just an observation), but not the one I care about
  2. owership changed (not a total surprise given the 0.6.1 changelog, but don't know if this a "feature", part of the issue, or irrelevant)
  3. the autodetection stuff paints a sad picture, but may be a manifestation of the bug that was fixed in the next release

Logs for 0.6.2 (also not working):

Jul 21 20:08:10 sysbox-fs[1100888]: time="2023-07-21 20:08:10" level=info msg="Initializing with 'allow-immutable-remounts' knob disabled (default)"
Jul 21 20:08:10 sysbox-fs[1100888]: time="2023-07-21 20:08:10" level=info msg="Initializing with 'allow-immutable-unmounts' knob enabled (default)"
Jul 21 20:08:10 sysbox-fs[1100888]: time="2023-07-21 20:08:10" level=info msg="FUSE dir = /var/lib/sysboxfs"
Jul 21 20:08:10 sysbox-fs[1100888]: time="2023-07-21 20:08:10" level=info msg="IOvec memParser elected"

Jul 21 20:08:10 sysbox-mgr[1100864]: time="2023-07-21 20:08:10" level=info msg="Sysbox data root: /var/lib/sysbox"
Jul 21 20:08:10 sysbox-mgr[1100864]: time="2023-07-21 20:08:10" level=info msg="Shiftfs module found in kernel: yes"
Jul 21 20:08:10 sysbox-mgr[1100864]: time="2023-07-21 20:08:10" level=info msg="Shiftfs works properly: yes"
Jul 21 20:08:10 sysbox-mgr[1100864]: time="2023-07-21 20:08:10" level=info msg="Shiftfs-on-overlayfs works properly: yes"
Jul 21 20:08:10 sysbox-mgr[1100864]: time="2023-07-21 20:08:10" level=info msg="ID-mapped mounts supported by kernel: yes"
Jul 21 20:08:10 sysbox-mgr[1100864]: time="2023-07-21 20:08:10" level=info msg="Overlayfs on ID-mapped mounts supported by kernel: yes"
Jul 21 20:08:10 sysbox-mgr[1100864]: time="2023-07-21 20:08:10" level=info msg="Operating in system container mode."
Jul 21 20:08:10 sysbox-mgr[1100864]: time="2023-07-21 20:08:10" level=info msg="Inner container image preloading enabled."
$ sysbox-mgr --version && sysbox-fs --version && sysbox-runc --version
sysbox-mgr
	edition: 	Community Edition (CE)
	version: 	0.6.2
	commit: 	4b5fb1def9abe6a256cfe62bacaf2a7d333d81d2
	built at: 	Mon Jun 12 03:49:55 UTC 2023
	built by: 	Cesar Talledo
sysbox-fs
	edition: 	Community Edition (CE)
	version: 	0.6.2
	commit: 	30fd49edbd51048fed8b2ad0af327598d30b29eb
	built at: 	Mon Jun 12 03:49:46 UTC 2023
	built by: 	Cesar Talledo
sysbox-runc
	edition: 	Community Edition (CE)
	version: 	0.6.2
	commit: 	60ca93c783b19c63581e34aa183421ce0b9b26b7
	built at: 	Mon Jun 12 03:49:19 UTC 2023
	built by: 	Cesar Talledo
	oci-specs: 	1.0.2-dev

$ docker run --runtime sysbox-runc --rm -it alpine sh -c 'ls -al /sys/class/net/ && ls -al /sys/devices/virtual/net/'
total 0
drwxr-xr-x    2 nobody   nobody           0 Jul 22 01:11 .
drwxr-xr-x   88 nobody   nobody           0 Jul 22 01:11 ..
lrwxrwxrwx    1 root     root             0 Jul 22 01:11 eth0 -> ../../devices/virtual/net/eth0
lrwxrwxrwx    1 root     root             0 Jul 22 01:11 lo -> ../../devices/virtual/net/lo
ls: /sys/devices/virtual/net/eth0: No such file or directory
total 0
drwxr-xr-x    5 nobody   nobody           0 Jul 20 06:59 lo

I thought this failure may be of interest due to how it's different than the previous version. First, the 'extra' devices that appeared in 0.6.1 disappeared. And second, even though the symlink is still broken, it actively emits an error, even though it's not directly being referenced.

Other notes:

  1. My physical host does not have a real eth0 device (in the off-chance that matters)
  2. Another bug report regarding /sys/devices issues suggested disabling shiftfs (--disable-shiftfs) even though the similarity between that issue and this were superficial; I tried it anyway, with no change in results (so I did not explicitly post those results).
  3. My original issue was around mounts, so for a time these experiments were run with --allow-immutable-remounts. That flag had no bearing on this issue (so not included), but I undid that change prior to this report to be safe. In other words, everything above is using out-of-the-box settings.

If I've omitted or oversimplified any pertinent information let me know, This seems easy to replicate, but this is fairly new (low-level) territory for me, and I've only been 'seriously' using/investigating this for a couple days now.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions