Fatal "unsupported VMA range" when running aarch64 TSAN binaries via qemu
01:12 18 Sep 2025

Summary

I'm trying to execute binaries compiled with TSAN for aarch64 on an x86_64 host via qemu-aarch64 and encounter

FATAL: ThreadSanitizer: unsupported VMA range
FATAL: Found 47 - Supported 39, 42 and 48

errors.

Environment is an Alpine Linux based (privileged) Docker container running on a Linux host.

Details

I compiled the tiny_race example code from the TSAN documentation with both Clang 20 (20.1.8) and 19 (19.1.4).

$ cat /etc/os-release
NAME="Alpine Linux"
[...]
VERSION_ID=3.21.4
$ clang --version
Alpine clang version 20.1.8
Target: aarch64-poky-linux
[...]
$ clang -fsanitize=thread -g -O1 [...] -o race-c tiny_race.c

Then I tried to run it using qemu 8.2.7, 9.1.2 and 10.0.0. In all cases, TSAN errors out immediately with the error message given above.

My understanding of the VMA issue is limited, but it seems to be related to the -R size (QEMU_RESERVED_VA) option for qemu, so I played around with that. When setting it to a value that matches 39 or 42 bits, TSAN does indeed initalize, but still fails:

$ TSAN_OPTIONS=verbosity=2 /usr/bin/qemu-aarch64 -R 1024G ./race-c
[...]
ThreadSanitizer:DEADLYSIGNAL
ThreadSanitizer:DEADLYSIGNAL
==274347==ERROR: ThreadSanitizer: SEGV on unknown address 0x013558139dd0 (pc 0x00aaaabaeaec bp 0x005555d54a40 sp 0x005555d54a20 T274347)
==274347==The signal is caused by a UNKNOWN memory access.
ThreadSanitizer:DEADLYSIGNAL
ThreadSanitizer: nested bug in the same thread, aborting.

Values higher than 46 bits result in:

qemu-aarch64: /src/tsan/race-c: Unable to find a guest_base to satisfy all guest address mapping requirements
  0000000000000000-00007fffffffffff

Anything else I can try? Pointers would be highly appreciated, thanks!

qemu arm64 thread-sanitizer