[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
** Tags removed: server-todo
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
Fix Released
Status in qemu-hwe package in Ubuntu:
Fix Released
Status in qemu source package in Noble:
Won't Fix
Status in qemu-hwe source package in Noble:
Won't Fix
Status in qemu source package in Plucky:
Won't Fix
Status in qemu-hwe source package in Plucky:
Won't Fix
Status in qemu source package in Questing:
Won't Fix
Status in qemu-hwe source package in Questing:
Won't Fix
Status in qemu source package in Resolute:
Fix Released
Status in qemu-hwe source package in Resolute:
Fix Released
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from source inside container):
apt source cmake
cd cmake
apt-get build-dep .
dpkg-buildpackage -us -uc -b
-> Bootstrapping error:
Illegal instruction (core dumped)
Error when bootstrapping CMake:
Problem while running initial CMake
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
** Changed in: qemu-hwe (Ubuntu Questing)
Status: New => Won't Fix
** Changed in: qemu (Ubuntu Questing)
Status: New => Won't Fix
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
Fix Released
Status in qemu-hwe package in Ubuntu:
Fix Released
Status in qemu source package in Noble:
Won't Fix
Status in qemu-hwe source package in Noble:
Won't Fix
Status in qemu source package in Plucky:
Won't Fix
Status in qemu-hwe source package in Plucky:
Won't Fix
Status in qemu source package in Questing:
Won't Fix
Status in qemu-hwe source package in Questing:
Won't Fix
Status in qemu source package in Resolute:
Fix Released
Status in qemu-hwe source package in Resolute:
Fix Released
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from source inside container):
apt source cmake
cd cmake
apt-get build-dep .
dpkg-buildpackage -us -uc -b
-> Bootstrapping error:
Illeg
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
@Hector. I don't think that it is worth the effort looking at the 26.04
release next week.
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
Fix Released
Status in qemu-hwe package in Ubuntu:
Fix Released
Status in qemu source package in Noble:
Won't Fix
Status in qemu-hwe source package in Noble:
Won't Fix
Status in qemu source package in Plucky:
Won't Fix
Status in qemu-hwe source package in Plucky:
Won't Fix
Status in qemu source package in Questing:
New
Status in qemu-hwe source package in Questing:
New
Status in qemu source package in Resolute:
Fix Released
Status in qemu-hwe source package in Resolute:
Fix Released
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from source inside container):
apt source cmake
cd cmake
apt-get build-dep .
dpkg-buildpackage -us -uc -b
-> Bootstrapping error:
Illegal instruction (core dumped)
Error when bootstrapping CMak
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
Hey Heinrich, do you think that it makes sense to SRU this to Questing ?
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
Fix Released
Status in qemu-hwe package in Ubuntu:
Fix Released
Status in qemu source package in Noble:
Won't Fix
Status in qemu-hwe source package in Noble:
Won't Fix
Status in qemu source package in Plucky:
Won't Fix
Status in qemu-hwe source package in Plucky:
Won't Fix
Status in qemu source package in Questing:
New
Status in qemu-hwe source package in Questing:
New
Status in qemu source package in Resolute:
Fix Released
Status in qemu-hwe source package in Resolute:
Fix Released
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from source inside container):
apt source cmake
cd cmake
apt-get build-dep .
dpkg-buildpackage -us -uc -b
-> Bootstrapping error:
Illegal instruction (core dumped)
Error when bootstrapping CMake:
Problem
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
QEMU 8.2 does not have full support for RVA23. Backporting this single
patch series would not resolve this.
** Changed in: qemu-hwe (Ubuntu Noble)
Status: New => Won't Fix
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
Fix Released
Status in qemu-hwe package in Ubuntu:
Fix Released
Status in qemu source package in Noble:
Won't Fix
Status in qemu-hwe source package in Noble:
Won't Fix
Status in qemu source package in Plucky:
Won't Fix
Status in qemu-hwe source package in Plucky:
Won't Fix
Status in qemu source package in Questing:
New
Status in qemu-hwe source package in Questing:
New
Status in qemu source package in Resolute:
Fix Released
Status in qemu-hwe source package in Resolute:
Fix Released
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from source inside container):
apt source cmake
cd cmake
apt-get build-dep .
dpkg-buildpackage -us -uc -b
-> Bootstrappi
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
Plucky is not supported anymore.
** Changed in: qemu-hwe (Ubuntu Plucky)
Status: New => Won't Fix
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
Fix Released
Status in qemu-hwe package in Ubuntu:
Fix Released
Status in qemu source package in Noble:
Won't Fix
Status in qemu-hwe source package in Noble:
Won't Fix
Status in qemu source package in Plucky:
Won't Fix
Status in qemu-hwe source package in Plucky:
Won't Fix
Status in qemu source package in Questing:
New
Status in qemu-hwe source package in Questing:
New
Status in qemu source package in Resolute:
Fix Released
Status in qemu-hwe source package in Resolute:
Fix Released
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from source inside container):
apt source cmake
cd cmake
apt-get build-dep .
dpkg-buildpackage -us -uc -b
-> Bootstrapping error:
Illegal instruction (core dumped)
Error when boo
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
QEMU 8.2 does not have full support for RVA23. Backporting this single
patch series would not resolve this.
** Changed in: qemu (Ubuntu Noble)
Status: New => Won't Fix
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
Fix Released
Status in qemu-hwe package in Ubuntu:
Fix Released
Status in qemu source package in Noble:
Won't Fix
Status in qemu-hwe source package in Noble:
Won't Fix
Status in qemu source package in Plucky:
Won't Fix
Status in qemu-hwe source package in Plucky:
Won't Fix
Status in qemu source package in Questing:
New
Status in qemu-hwe source package in Questing:
New
Status in qemu source package in Resolute:
Fix Released
Status in qemu-hwe source package in Resolute:
Fix Released
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from source inside container):
apt source cmake
cd cmake
apt-get build-dep .
dpkg-buildpackage -us -uc -b
-> Bootstrapping e
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
Hello Christian,
I can start a resolute riscv64 container on Ubuntu 24.04 amd64, but
running
cmake --system-information
ends in the same error as reported here.
QEMU 8.2 lacks support for extensions zicbop (Cache-Block Prefetch
Instructions), zicbom (Maybe Operations) required by RVA23 which is
presumed by Ubuntu 25.10+.
Zicbop opcodes are encoded as HINT instructions (ORI with rd=x0). So these
should not trap.
Zicbom are probably unused in Ubuntu 26.04.
I was not able to start the preinstalled resolute RISC-V server image
using QEMU from Ubuntu 24.04 amd64.
Best regards
Heinrich
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
Fix Released
Status in qemu-hwe package in Ubuntu:
Fix Released
Status in qemu source package in Noble:
New
Status in qemu-hwe source package in Noble:
New
Status in qemu source package in Plucky:
Won't Fix
Status in qemu-hwe source package in Plucky:
New
Status in qemu source package in Questing:
New
Status in qemu-hwe source package in Questing:
New
Status in qemu source package in Resolute:
Fix Released
Status in qemu-hwe source package in Resolute:
Fix Released
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
print
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
@Heinrich - it is fixed in resolute with the preliminary changes known.
A decision for backporting should wait for whatever will be the final form to
make it upstream and your judgement - do you have an opinion?
Do you think this change is SRUable?
Do you think it is needed - can someone run resolute guests on e.g. noble
without this?
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
Fix Released
Status in qemu-hwe package in Ubuntu:
Fix Released
Status in qemu source package in Noble:
New
Status in qemu-hwe source package in Noble:
New
Status in qemu source package in Plucky:
Won't Fix
Status in qemu-hwe source package in Plucky:
New
Status in qemu source package in Questing:
New
Status in qemu-hwe source package in Questing:
New
Status in qemu source package in Resolute:
Fix Released
Status in qemu-hwe source package in Resolute:
Fix Released
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
This bug was fixed in the package qemu-hwe - 1:10.2.1+ds-1ubuntu4
---
qemu-hwe (1:10.2.1+ds-1ubuntu4) resolute; urgency=medium
* d/t/*: fix test-helper-script.py test failure
- d/t/control : allow stderr for test-helper-script.py
- d/t/test-helper-script.py : skip checking for removed qemu-efi-arm
(LP: #2147320)
qemu-hwe (1:10.2.1+ds-1ubuntu3) resolute; urgency=medium
* d/{hwe-helper/*, control}: add virt helper package
(LP: #2145809)
- d/t/test-helper-script.py : add test for hwe helper script
* d/control: remove dependency on deprecated edk2 arm
(LP: #2145209)
[ Heinrich Schuchardt ]
* d/p/u/lp2133188/*: Add riscv64 vector state to signal context
(LP: #2133188)
* d/p/u/hw-acpi-correct-field-sequence-in-SPCR-table (LP: #2146419)
-- Hector Cao Mon, 06 Apr 2026 09:27:23
+0200
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
Fix Released
Status in qemu-hwe package in Ubuntu:
Fix Released
Status in qemu source package in Noble:
New
Status in qemu-hwe source package in Noble:
New
Status in qemu source package in Plucky:
Won't Fix
Status in qemu-hwe source package in Plucky:
New
Status in qemu source package in Questing:
New
Status in qemu-hwe source package in Questing:
New
Status in qemu source package in Resolute:
Fix Released
Status in qemu-hwe source package in Resolute:
Fix Released
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6.
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
This bug was fixed in the package qemu - 1:10.2.1+ds-1ubuntu3 --- qemu (1:10.2.1+ds-1ubuntu3) resolute; urgency=medium * d/control: remove dependency on deprecated edk2 arm (LP: #2145209) * d/control-in: add dependency on the virt hwe helper package (LP: #2145809) [ Heinrich Schuchardt ] * d/p/u/lp2133188/*: Add riscv64 vector state to signal context (LP: #2133188) * d/p/u/hw-acpi-correct-field-sequence-in-SPCR-table (LP: #2146419) -- Hector Cao Fri, 27 Mar 2026 10:43:10 +0100 ** Changed in: qemu (Ubuntu Resolute) Status: In Progress => Fix Released ** Changed in: qemu-hwe (Ubuntu Resolute) Status: In Progress => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/2133188 Title: [SRU] RISC-V vector state not restored by signal handler Status in QEMU: New Status in qemu package in Ubuntu: Fix Released Status in qemu-hwe package in Ubuntu: Fix Released Status in qemu source package in Noble: New Status in qemu-hwe source package in Noble: New Status in qemu source package in Plucky: Won't Fix Status in qemu-hwe source package in Plucky: New Status in qemu source package in Questing: New Status in qemu-hwe source package in Questing: New Status in qemu source package in Resolute: Fix Released Status in qemu-hwe source package in Resolute: Fix Released Bug description: # Title qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset (vse64.v) when running cmake in riscv64 container (Ubuntu 26.04) ## Summary While running cmake (and other build steps) inside a linux/riscv64 Ubuntu 26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static) registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction (core dumped)" or "died with signal 4". The illegal instruction is observed inside glibc's memset implementation at an instruction that uses RISC-V vector extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb / enabling QEMU_STRACE significantly reduces or eliminates the failure, which strongly suggests a qemu-user/emulation bug (vector handling / code generation / state corruption), not a cmake bug. ## Affects - qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu 10.1.0+ds-5ubuntu3) - Running in Docker container for riscv64 on x86_64 host via binfmt_misc qemu-user static interpreter ## Environment / Context - Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64) - Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10) - Container image: ubuntu:26.04 for riscv64 - qemu package used: - downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1, qemu-user_10.0.6+ds-0+deb13u2). - copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host and registered via /proc/sys/fs/binfmt_misc/register - CMake version used inside container (bootstrap/build may use system-provided cmake binary): cmake 3.x (bootstrapping cmake while building also triggers crash) - Reproduction frequency: intermittent, ~50% (can get large variance: several consecutive successes or failures) - Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) — almost completely avoids crash; running under gdb or enabling QEMU_STRACE also makes it much harder to reproduce. ## Full reproduction steps 1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary: wget https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb qemu-user_10.1.0+ds-5ubuntu3_amd64 sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64 /usr/bin/qemu-riscv64-static 2. Register qemu-riscv64 with binfmt_misc: echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64 echo ':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF' >/proc/sys/fs/binfmt_misc/register 3. Start riscv64 ubuntu container: docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash docker exec -it ubuntu26 bash -i 4. Inside container: apt update apt install -y build-essential cmake 5. Reproducer 1: cmake --system-information -> Often fails with: bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device Illegal instruction (core dumped) 6. Reproducer 2 (minimal C project): Create test_cmake/CMakeLists.txt: cmake_minimum_required(VERSION 3.10) project(HelloCMake C) add_executab
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
All the MRs are ready - combiningand uploading
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
In Progress
Status in qemu-hwe package in Ubuntu:
In Progress
Status in qemu source package in Noble:
New
Status in qemu-hwe source package in Noble:
New
Status in qemu source package in Plucky:
Won't Fix
Status in qemu-hwe source package in Plucky:
New
Status in qemu source package in Questing:
New
Status in qemu-hwe source package in Questing:
New
Status in qemu source package in Resolute:
In Progress
Status in qemu-hwe source package in Resolute:
In Progress
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from source inside container):
apt source cmake
cd cmake
apt-get build-dep .
dpkg-buildpackage -us -uc -b
-> Bootstrapping error:
Illegal instruction (core dumped)
Error when bootstrapping CMake:
Problem while running initial CMake
8. Observed cras
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
Hector was so kind to bump this to v3 and extend it to cover qemu-hwe -
MRs supersede the former ones and are both referenced from this bug
already.
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
In Progress
Status in qemu-hwe package in Ubuntu:
In Progress
Status in qemu source package in Noble:
New
Status in qemu-hwe source package in Noble:
New
Status in qemu source package in Plucky:
Won't Fix
Status in qemu-hwe source package in Plucky:
New
Status in qemu source package in Questing:
New
Status in qemu-hwe source package in Questing:
New
Status in qemu source package in Resolute:
In Progress
Status in qemu-hwe source package in Resolute:
In Progress
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from source inside container):
apt source cmake
cd cmake
apt-get build-dep .
dpkg-buildpackage -us -uc -b
-> Bootstrapping error:
Illegal instruction (core dumped)
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
** Changed in: qemu-hwe (Ubuntu Resolute)
Status: New => In Progress
** Changed in: qemu (Ubuntu Resolute)
Status: Confirmed => In Progress
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
In Progress
Status in qemu-hwe package in Ubuntu:
In Progress
Status in qemu source package in Noble:
New
Status in qemu-hwe source package in Noble:
New
Status in qemu source package in Plucky:
Won't Fix
Status in qemu-hwe source package in Plucky:
New
Status in qemu source package in Questing:
New
Status in qemu-hwe source package in Questing:
New
Status in qemu source package in Resolute:
In Progress
Status in qemu-hwe source package in Resolute:
In Progress
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from source inside container):
apt source cmake
cd cmake
apt-get build-dep .
dpkg-buildpackage -us -uc -b
-> Bootstrapping error:
Illegal instruction (core dum
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
The MR looks good, I'm soon uploading together with other changes queued up for
qemu.
And in regard to the timing it is a pure bug fix not needing an FFE AFAICS.
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
Confirmed
Status in qemu-hwe package in Ubuntu:
New
Status in qemu source package in Noble:
New
Status in qemu-hwe source package in Noble:
New
Status in qemu source package in Plucky:
Won't Fix
Status in qemu-hwe source package in Plucky:
New
Status in qemu source package in Questing:
New
Status in qemu-hwe source package in Questing:
New
Status in qemu source package in Resolute:
Confirmed
Status in qemu-hwe source package in Resolute:
New
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from source inside container):
apt source cmake
cd cmake
apt-get build-dep .
dpkg-buildpackage -us -uc -b
-> Bootstrapping error:
Illegal instruction (core dumped)
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
** Merge proposal linked:
https://code.launchpad.net/~hectorcao/ubuntu/+source/qemu/+git/qemu/+merge/502787
** Merge proposal linked:
https://code.launchpad.net/~hectorcao/ubuntu/+source/qemu/+git/qemu/+merge/502788
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
Confirmed
Status in qemu-hwe package in Ubuntu:
New
Status in qemu source package in Noble:
New
Status in qemu-hwe source package in Noble:
New
Status in qemu source package in Plucky:
Won't Fix
Status in qemu-hwe source package in Plucky:
New
Status in qemu source package in Questing:
New
Status in qemu-hwe source package in Questing:
New
Status in qemu source package in Resolute:
Confirmed
Status in qemu-hwe source package in Resolute:
New
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from source inside container):
apt source cmake
cd cmake
apt-get build-dep .
dpkg-buildpackage -us -uc -b
-> Bootstra
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
There is a v3 series: https://lore.kernel.org/all/[email protected]/ It received Reviewed-by but a rebase was requested. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/2133188 Title: [SRU] RISC-V vector state not restored by signal handler Status in QEMU: New Status in qemu package in Ubuntu: Confirmed Status in qemu-hwe package in Ubuntu: New Status in qemu source package in Noble: New Status in qemu-hwe source package in Noble: New Status in qemu source package in Plucky: Won't Fix Status in qemu-hwe source package in Plucky: New Status in qemu source package in Questing: New Status in qemu-hwe source package in Questing: New Status in qemu source package in Resolute: Confirmed Status in qemu-hwe source package in Resolute: New Bug description: # Title qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset (vse64.v) when running cmake in riscv64 container (Ubuntu 26.04) ## Summary While running cmake (and other build steps) inside a linux/riscv64 Ubuntu 26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static) registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction (core dumped)" or "died with signal 4". The illegal instruction is observed inside glibc's memset implementation at an instruction that uses RISC-V vector extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb / enabling QEMU_STRACE significantly reduces or eliminates the failure, which strongly suggests a qemu-user/emulation bug (vector handling / code generation / state corruption), not a cmake bug. ## Affects - qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu 10.1.0+ds-5ubuntu3) - Running in Docker container for riscv64 on x86_64 host via binfmt_misc qemu-user static interpreter ## Environment / Context - Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64) - Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10) - Container image: ubuntu:26.04 for riscv64 - qemu package used: - downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1, qemu-user_10.0.6+ds-0+deb13u2). - copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host and registered via /proc/sys/fs/binfmt_misc/register - CMake version used inside container (bootstrap/build may use system-provided cmake binary): cmake 3.x (bootstrapping cmake while building also triggers crash) - Reproduction frequency: intermittent, ~50% (can get large variance: several consecutive successes or failures) - Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) — almost completely avoids crash; running under gdb or enabling QEMU_STRACE also makes it much harder to reproduce. ## Full reproduction steps 1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary: wget https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb qemu-user_10.1.0+ds-5ubuntu3_amd64 sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64 /usr/bin/qemu-riscv64-static 2. Register qemu-riscv64 with binfmt_misc: echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64 echo ':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF' >/proc/sys/fs/binfmt_misc/register 3. Start riscv64 ubuntu container: docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash docker exec -it ubuntu26 bash -i 4. Inside container: apt update apt install -y build-essential cmake 5. Reproducer 1: cmake --system-information -> Often fails with: bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device Illegal instruction (core dumped) 6. Reproducer 2 (minimal C project): Create test_cmake/CMakeLists.txt: cmake_minimum_required(VERSION 3.10) project(HelloCMake C) add_executable(hello main.c) Create test_cmake/main.c: #include int main() { printf("Hello, CMake!\n"); return 0; } cd test_cmake cmake . -> Crash with: -- Detecting C compiler ABI info bash: line 1: 8489 Illegal instruction(core dumped) cmake . 7. Reproducer 3 (rebuild cmake from source inside container): apt source cmake cd cmake apt-get build-dep . dpkg-buildpackage -us -uc -b -> Bootstrapping error: Illegal instruction (core dumped) Error when boots
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
** Also affects: qemu-hwe (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
Confirmed
Status in qemu-hwe package in Ubuntu:
New
Status in qemu source package in Noble:
New
Status in qemu-hwe source package in Noble:
New
Status in qemu source package in Plucky:
Won't Fix
Status in qemu-hwe source package in Plucky:
New
Status in qemu source package in Questing:
New
Status in qemu-hwe source package in Questing:
New
Status in qemu source package in Resolute:
Confirmed
Status in qemu-hwe source package in Resolute:
New
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from source inside container):
apt source cmake
cd cmake
apt-get build-dep .
dpkg-buildpackage -us -uc -b
-> Bootstrapping error:
Illegal instruction (core dumped)
Error when bootstrapping CMake:
Problem while running initial CMake
8. O
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
** Tags added: server-todo
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
Confirmed
Status in qemu source package in Noble:
New
Status in qemu source package in Plucky:
Won't Fix
Status in qemu source package in Questing:
New
Status in qemu source package in Resolute:
Confirmed
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from source inside container):
apt source cmake
cd cmake
apt-get build-dep .
dpkg-buildpackage -us -uc -b
-> Bootstrapping error:
Illegal instruction (core dumped)
Error when bootstrapping CMake:
Problem while running initial CMake
8. Observed crash location (from gdb/QEMU_STRACE when available):
- Illegal instruction is in memset@@GLIBC_2.27+0x52
- Faulting instruction: vse64.v v1,(a5)(RISC-V vector store of 64-bit
elements)
## Workarounds
- LD_PRELOAD a scalar-only memset library (libnovecmem.so) to avoid glibc
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
QEMU 10.2.1+ds-1ubuntu3~ppa1 currently building in ppa:xypron/qemu solve
the reported issue for me.
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
Confirmed
Status in qemu source package in Noble:
New
Status in qemu source package in Plucky:
Won't Fix
Status in qemu source package in Questing:
New
Status in qemu source package in Resolute:
Confirmed
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from source inside container):
apt source cmake
cd cmake
apt-get build-dep .
dpkg-buildpackage -us -uc -b
-> Bootstrapping error:
Illegal instruction (core dumped)
Error when bootstrapping CMake:
Problem while running initial CMake
8. Observed crash location (from gdb/QEMU_STRACE when available):
- Illegal instruction is in memset@@GLIBC_2.27+0x52
- Faulting instruction: vse64.v v1,(a5)(RISC-V vector store of 64-bit
elements)
## Workarounds
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
** Merge proposal linked:
https://code.launchpad.net/~xypron/ubuntu/+source/qemu/+git/qemu/+merge/502458
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
Confirmed
Status in qemu source package in Noble:
New
Status in qemu source package in Plucky:
Won't Fix
Status in qemu source package in Questing:
New
Status in qemu source package in Resolute:
Confirmed
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from source inside container):
apt source cmake
cd cmake
apt-get build-dep .
dpkg-buildpackage -us -uc -b
-> Bootstrapping error:
Illegal instruction (core dumped)
Error when bootstrapping CMake:
Problem while running initial CMake
8. Observed crash location (from gdb/QEMU_STRACE when available):
- Illegal instruction is in memset@@GLIBC_2.27+0x52
- Faulting instruction: vse64.v v1,(a5)(RISC-V vector store of 64-bit
elements)
## Worka
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
The issue is reproducible with 1:10.2.1+ds-1ubuntu2.
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
Confirmed
Status in qemu source package in Noble:
New
Status in qemu source package in Plucky:
Won't Fix
Status in qemu source package in Questing:
New
Status in qemu source package in Resolute:
Confirmed
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from source inside container):
apt source cmake
cd cmake
apt-get build-dep .
dpkg-buildpackage -us -uc -b
-> Bootstrapping error:
Illegal instruction (core dumped)
Error when bootstrapping CMake:
Problem while running initial CMake
8. Observed crash location (from gdb/QEMU_STRACE when available):
- Illegal instruction is in memset@@GLIBC_2.27+0x52
- Faulting instruction: vse64.v v1,(a5)(RISC-V vector store of 64-bit
elements)
## Workarounds
- LD_PRELOAD a scalar-only memset library (libn
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
Sadly this has gotten stuck upstream, there have been patches and people
willing to test but nothing concluded. We will have to check if/what we
can merge along 10.2 in the next few days or if it has to be a bug-fix
upload afterwards but hopefully before 26.04 release.
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
Confirmed
Status in qemu source package in Noble:
New
Status in qemu source package in Plucky:
Won't Fix
Status in qemu source package in Questing:
New
Status in qemu source package in Resolute:
Confirmed
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from source inside container):
apt source cmake
cd cmake
apt-get build-dep .
dpkg-buildpackage -us -uc -b
-> Bootstrapping error:
Illegal instruction (core dumped)
Error when bootstrapping CMake:
Problem while running initial CMake
8. Observed crash location (from gdb/QEMU_STRACE when available)
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
Ubuntu 25.04 (Plucky Puffin) has reached end of life, so this bug will
not be fixed for that specific release.
** Changed in: qemu (Ubuntu Plucky)
Status: New => Won't Fix
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
Confirmed
Status in qemu source package in Noble:
New
Status in qemu source package in Plucky:
Won't Fix
Status in qemu source package in Questing:
New
Status in qemu source package in Resolute:
Confirmed
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from source inside container):
apt source cmake
cd cmake
apt-get build-dep .
dpkg-buildpackage -us -uc -b
-> Bootstrapping error:
Illegal instruction (core dumped)
Error when bootstrapping CMake:
Problem while running initial CMake
8. Observed crash location (from gdb/QEMU_STRACE when available):
- Illegal instruction is in memset@@GLIBC_2.27+0x52
- Faulting instruction: vs
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
** Changed in: qemu (Ubuntu Noble)
Milestone: None => ubuntu-24.04.4
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
Confirmed
Status in qemu source package in Noble:
New
Status in qemu source package in Plucky:
New
Status in qemu source package in Questing:
New
Status in qemu source package in Resolute:
Confirmed
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from source inside container):
apt source cmake
cd cmake
apt-get build-dep .
dpkg-buildpackage -us -uc -b
-> Bootstrapping error:
Illegal instruction (core dumped)
Error when bootstrapping CMake:
Problem while running initial CMake
8. Observed crash location (from gdb/QEMU_STRACE when available):
- Illegal instruction is in memset@@GLIBC_2.27+0x52
- Faulting instruction: vse64.v v1,(a5)(RISC-V vector store of 64-bit
elements)
## Workarounds
- LD_PRELOAD a scalar-only memset
[Bug 2133188] Re: [SRU] RISC-V vector state not restored by signal handler
** Also affects: qemu (Ubuntu Plucky)
Importance: Undecided
Status: New
** Also affects: qemu (Ubuntu Noble)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/2133188
Title:
[SRU] RISC-V vector state not restored by signal handler
Status in QEMU:
New
Status in qemu package in Ubuntu:
Confirmed
Status in qemu source package in Noble:
New
Status in qemu source package in Plucky:
New
Status in qemu source package in Questing:
New
Status in qemu source package in Resolute:
Confirmed
Bug description:
# Title
qemu-user (qemu-riscv64-static): intermittent Illegal instruction in memset
(vse64.v) when running cmake in riscv64 container (Ubuntu 26.04)
## Summary
While running cmake (and other build steps) inside a linux/riscv64 Ubuntu
26.04 container on an x86_64 host using qemu-user (qemu-riscv64-static)
registered via binfmt_misc, cmake sometimes crashes with "Illegal instruction
(core dumped)" or "died with signal 4". The illegal instruction is observed
inside glibc's memset implementation at an instruction that uses RISC-V vector
extension (vse64.v). The failure is intermittent (~50% reproducer rate). Using
a scalar-only memset (libnovecmem.so via LD_PRELOAD) or running under gdb /
enabling QEMU_STRACE significantly reduces or eliminates the failure, which
strongly suggests a qemu-user/emulation bug (vector handling / code generation
/ state corruption), not a cmake bug.
## Affects
- qemu-user qemu-riscv64-static (as packaged in Ubuntu qemu
10.1.0+ds-5ubuntu3)
- Running in Docker container for riscv64 on x86_64 host via binfmt_misc
qemu-user static interpreter
## Environment / Context
- Host CPU: x86_64 (Docker multiarch running qemu-user for riscv64)
- Host OS:multiple Ubuntu releases (22.04, 24.04, 25.10)
- Container image: ubuntu:26.04 for riscv64
- qemu package used:
- downloaded .deb from Launchpad: qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
and on several Debian qemu-user packages (qemu-user_10.2.0~rc1+ds-1,
qemu-user_10.0.6+ds-0+deb13u2).
- copied qemu-riscv64 binary into /usr/bin/qemu-riscv64-static inside host
and registered via /proc/sys/fs/binfmt_misc/register
- CMake version used inside container (bootstrap/build may use
system-provided cmake binary): cmake 3.x (bootstrapping cmake while building
also triggers crash)
- Reproduction frequency: intermittent, ~50% (can get large variance: several
consecutive successes or failures)
- Observed behavior changes when: LD_PRELOAD libnovecmem.so (scalar memset) —
almost completely avoids crash; running under gdb or enabling QEMU_STRACE also
makes it much harder to reproduce.
## Full reproduction steps
1. On x86_64 host, fetch qemu-user .deb and extract the riscv static binary:
wget
https://launchpad.net/ubuntu/+source/qemu/1:10.1.0+ds-5ubuntu3/+build/31393935/+files/qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
dpkg-deb -x qemu-user_10.1.0+ds-5ubuntu3_amd64.deb
qemu-user_10.1.0+ds-5ubuntu3_amd64
sudo cp qemu-user_10.1.0+ds-5ubuntu3_amd64/usr/bin/qemu-riscv64
/usr/bin/qemu-riscv64-static
2. Register qemu-riscv64 with binfmt_misc:
echo -1 > /proc/sys/fs/binfmt_misc/qemu-riscv64
echo
':qemu-riscv64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-riscv64-static:POCF'
>/proc/sys/fs/binfmt_misc/register
3. Start riscv64 ubuntu container:
docker run --platform=linux/riscv64 --name ubuntu26 -itd ubuntu:26.04 bash
docker exec -it ubuntu26 bash -i
4. Inside container:
apt update
apt install -y build-essential cmake
5. Reproducer 1:
cmake --system-information
-> Often fails with:
bash: [15: 1 (255)] tcsetattr: Inappropriate ioctl for device
Illegal instruction (core dumped)
6. Reproducer 2 (minimal C project):
Create test_cmake/CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(HelloCMake C)
add_executable(hello main.c)
Create test_cmake/main.c:
#include
int main() {
printf("Hello, CMake!\n");
return 0;
}
cd test_cmake
cmake .
-> Crash with:
-- Detecting C compiler ABI info
bash: line 1: 8489 Illegal instruction(core dumped) cmake .
7. Reproducer 3 (rebuild cmake from source inside container):
apt source cmake
cd cmake
apt-get build-dep .
dpkg-buildpackage -us -uc -b
-> Bootstrapping error:
Illegal instruction (core dumped)
Error when bootstrapping CMake:
Problem while running initial CMake
8. Observed crash location (from gdb/QEMU_STRACE when available):
- Illegal instruction is in memset@@GLIBC_2.27+0x52
- Faulting instruction: vse64.v v1,(a5)(RISC
