Bug 1219137 - qemu user space builds broken with kernel 6.7
Summary: qemu user space builds broken with kernel 6.7
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Kernel (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Major (vote)
Target Milestone: ---
Assignee: openSUSE Kernel Bugs
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-24 11:40 UTC by Andreas Schwab
Modified: 2024-01-24 14:09 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schwab 2024-01-24 11:40:34 UTC
Since commit 1c5976ef0f7a the kernel deregisters all binfmt_misc handler
when the binfmt_misc filesystem is unmounted.  The build script has
this:

# RPM specific post checks are in /usr/lib/build/checks
if test -n "$RPMS" -a -d "$BUILD_ROOT/usr/lib/build/checks" ; then
    # workaround for broken 13.1 check scripts which umount /proc
    if test -n "$RUNNING_IN_VM" -a "$BUILD_ROOT" = / ; then
        umount -n $BUILD_ROOT/proc/sys/fs/binfmt_misc 2>/dev/null
    fi

This means that after this point the emulation no longer works.

[  272s] ... checking for files with abuild user/group
[  272s] /.build/build: line 1922: /bin/env: cannot execute binary file: Exec format error
[  272s] /.build/build: line 1926: /bin/rpm: cannot execute binary file: Exec format error
[  272s] /.build/build: line 1926: /bin/rpm: cannot execute binary file: Exec format error
[  272s] /.build/build: line 1926: /bin/rpm: cannot execute binary file: Exec format error
[  272s] /.build/build: line 1926: /bin/rpm: cannot execute binary file: Exec format error
[  272s] /.build/build: line 1926: /bin/rpm: cannot execute binary file: Exec format error
[  272s] /.build/build: line 1926: /bin/rpm: cannot execute binary file: Exec format error
[  272s] /.build/build: line 1926: /bin/rpm: cannot execute binary file: Exec format error
[  272s] /.build/build: line 1926: /bin/rpm: cannot execute binary file: Exec format error
[  272s] /.build/build: line 1926: /bin/rpm: cannot execute binary file: Exec format error
[  272s] /.build/build: line 1926: /bin/rpm: cannot execute binary file: Exec format error

According to the commit, this should be reported as a regression so that this behaviour is reverted for the initial binfmt_misc mount.
Comment 1 Andreas Schwab 2024-01-24 11:52:01 UTC
I have now switched openSUSE:Factory:RISCV to use an older kernel-obs-build, so builds can succeed again.
Comment 2 Adrian Schröter 2024-01-24 13:01:57 UTC
mls pushed an improved workaround for this for the build script. So we avoid this situation in future.

(but keeping it open to let kernel people consider if they want to revert the behaviour change).
Comment 3 Andreas Schwab 2024-01-24 13:25:43 UTC
Please let me know when the updated build script has been deployed so that I can revert the kernel-obs-build workaround.