Skip to content

bFLT triggers accel/tcg/user-exec.c:505: page_set_flags: Assertion `have_mmap_lock()' failed.

As of v9.1.0-rc2 when running tests/avocado/load_bflt.py I get:

./qemu-arm -L test_arm_bflt.LoadBFLT.test_stm32/lib/ test_arm_bflt.LoadBFLT.test_stm32/bin/busybox
qemu-arm: ../../accel/tcg/user-exec.c:505: page_set_flags: Assertion `have_mmap_lock()' failed.
Aborted (core dumped)

backtrace:

Thread 1 "qemu-arm" received signal SIGABRT, Aborted.
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140737340860416) at ./nptl/pthread_kill.c:44
44	./nptl/pthread_kill.c: No such file or directory.
(gdb) bt
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737340860416) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=140737340860416) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=140737340860416, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007ffff746f476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007ffff74557f3 in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007ffff745571b in __assert_fail_base (fmt=0x7ffff760a130 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=0x55555577ae46 "have_mmap_lock()", file=0x55555577c7fe "../accel/tcg/user-exec.c", line=505, function=<optimized out>)
    at ./assert/assert.c:92
#6  0x00007ffff7466e96 in __GI___assert_fail (assertion=assertion@entry=0x55555577ae46 "have_mmap_lock()", 
    file=file@entry=0x55555577c7fe "../accel/tcg/user-exec.c", line=line@entry=505, 
    function=function@entry=0x55555577cc38 <__PRETTY_FUNCTION__.40> "page_set_flags") at ./assert/assert.c:101
#7  0x0000555555692c61 in page_set_flags (start=start@entry=4294901760, last=last@entry=4294905855, flags=flags@entry=13)
    at ../accel/tcg/user-exec.c:505
#8  0x000055555569f216 in init_guest_commpage () at ../linux-user/elfload.c:502
#9  probe_guest_base (
    image_name=0x55555587ad00 <real_exec_path> "test_arm_bflt.LoadBFLT.test_stm32/bin/busybox", guest_loaddr=guest_loaddr@entry=0, guest_hiaddr=guest_hiaddr@entry=221679) at ../linux-user/elfload.c:3034
#10 0x00005555556cc90b in load_flat_file (id=0, extra_stack=<synthetic pointer>, libinfo=0x7fffffffda90, bprm=0x7fffffffdd10)
    at ../linux-user/flatload.c:262
#11 load_flt_binary (bprm=bprm@entry=0x7fffffffdd10, info=info@entry=0x7fffffffdc20) at ../linux-user/flatload.c:490
#12 0x00005555556a23c4 in loader_exec (fdexec=fdexec@entry=3, filename=<optimized out>, argv=argv@entry=0x55555589e660, 
    envp=envp@entry=0x5555558c8880, regs=regs@entry=0x7fffffffdcc0, infop=infop@entry=0x7fffffffdc20, bprm=<optimized out>)
    at ../linux-user/linuxload.c:169
#13 0x000055555559c9b0 in main (argc=<optimized out>, argv=0x7fffffffe2b8, envp=<optimized out>) at ../linux-user/main.c:959
(gdb) q

Host: Linux hackbox2 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Edited by Philippe Mathieu-Daudé
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information