Bare chroot in linux-user fails with pgb_reserved_va: Assertion `guest_base != 0' failed.

Bug #1888728 reported by John Paul Adrian Glaubitz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Richard Henderson

Bug Description

Trying to run a bare chroot with no additional bind mounts fails on git master (8ffa52c20d5693d454f65f2024a1494edfea65d4) with:

root@nofan:~/qemu> chroot /local_scratch/sid-m68k-sbuild/
qemu-m68k-static: /root/qemu/linux-user/elfload.c:2315: pgb_reserved_va: Assertion `guest_base != 0' failed.
Aborted
root@nofan:~/qemu>

The problem can be worked around by bind-mounting /proc from the host system into the target chroot:

root@nofan:~/qemu> mount -o bind /proc/ /local_scratch/sid-m68k-sbuild/proc/
root@nofan:~/qemu> chroot /local_scratch/sid-m68k-sbuild/
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
(sid-m68k-sbuild)root@nofan:/#

Host system is an up-to-date Debian unstable (2020-07-23).

I have not been able to bisect the issue yet since there is another annoying linux-user bug (virtual memory exhaustion) that was somewhere introduced and fixed between v5.0.0 and HEAD and overshadows the original Assertion failure bug.

Tags: linux-user
tags: added: linux-user
Revision history for this message
Alex Bennée (ajbennee) wrote :

Could you point me to a tar.gz with your rootfs?

Revision history for this message
John Paul Adrian Glaubitz (glaubitz) wrote :

Here you go: https://people.debian.org/~glaubitz/sid-m68k-sbuild.tgz

Thanks for looking into it!

Revision history for this message
Richard Henderson (rth) wrote :

For the record, reproducing this problem requires root, thus
trying to reproduce it outside of a chroot is non-obvious.

https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg07224.html

Changed in qemu:
status: New → In Progress
assignee: nobody → Richard Henderson (rth)
Revision history for this message
Laurent Vivier (laurent-vivier) wrote :
Changed in qemu:
status: In Progress → Fix Committed
Thomas Huth (th-huth)
Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.