summary refs log tree commit diff stats
path: root/results/scraper/launchpad/1878413
blob: 603fa708749b6a6c61c65cab0e920d0384d5cc5f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/proc/sys/fs/binfmt_misc/ empty even though binfmt_misc is loaded

_apksigner_ uses binfmt to execute via _jarwrapper_, since it is a JAR.  We have a test suite that relies on _apksigner_ working.  It was running fine in Ubuntu/bionic.  Since it was pegged to LTS, it got upgraded to Ubuntu/focal and it stopped working.  This is likely because /proc/sys/fs/binfmt_misc/ is totally empty.  The "binfmt_misc" kernel module shows as loaded:

$ grep binfmt /proc/modules
binfmt_misc 20480 1 - Live 0xffffffffc0452000

This relies on binfmt support in gitlab.com's CI runner setup, based on Docker.  binfmt works in containers there, for example on Ubuntu/bionic:
https://gitlab.com/fdroid/fdroidserver/-/jobs/516857857

Something in Ubuntu/focal broke this when running focal in the container on the same Docker host runners:
https://gitlab.com/fdroid/fdroidserver/-/jobs/547148092

Debian's ci.debian.net lxc runners also have a similar problem, it might be related:
https://salsa.debian.org/ci-team/debian-ci-config/-/issues/1

The binfmt_misc filesystem must be mounted on /proc/sys/fs/binfmt_misc to work.

$ mount|grep ^binfmt_misc
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)


From my experience, that mounting happens automatically once
binfmt-support is installed.  At least that is the case on the
Ubuntu/bionic jobs and on my own Debian machines.  Did something change
so that now it must be manually mounted?


It seems in the focal container, binfmt_misc doesn't get setup properly:
https://gitlab.com/eighthave/fdroidserver/-/jobs/550962360

$ grep binfmt /proc/modules
binfmt_misc 20480 1 - Live 0xffffffffc0461000
$ mount | grep binfmt_misc || mount binfmt_misc /proc/sys/fs/binfmt_misc
mount: /proc/sys/fs/binfmt_misc: special device binfmt_misc does not exist.
$

Ok, your hint lead me to the fix:

$ mount | grep binfmt_misc || mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc

I guess this mounting was somehow happening automatically before, but now it seems that it is handled by systemd in a user system.  But a container usually doesn't run systemd.