snek-arm fails on s390x with qemu >6.1
Hi, first of all this is a cross report to qemu (here) and snek issue 58 as I'm not yet sure on which side the issue is and we might need each others help to resolve this.
Host environment
- Operating system: Tried Ubuntu 22.04 or Fedora 35 so far
- OS/kernel version: 5.13.0-22-generic
- Architecture: s390x
- QEMU flavor: qemu-system-arm
- QEMU version: 6.2 good: 1:6.0+dfsg-2expubuntu4 bad: qemu-6.1.0-14.fc35 bad: 1:6.2+dfsg-2ubuntu3 bad: git head at 2d88a3a5
- QEMU command line:
qemu-system-arm -chardev stdio,mux=on,id=stdio0 -serial none -monitor none -semihosting-config enable=on,chardev=stdio0,arg='snek',arg=test/pass-slice.py -machine mps2-an385,accel=tcg -cpu cortex-m3 -kernel /snek-qemu-arm-1.7.elf -nographic -bios none
Emulated/Virtualized environment
- Operating system: snek elf file
- OS/kernel version: n/a
- Architecture: ARM
To ease the debugging - Ubuntu's current snek elf file can be fetched from https://people.canonical.com/~paelzer/snek-qemu-arm-1.7.elf (as extracted from the deb)
Description of problem
snek is a language inspired by python for embedded. The tests run snek code natively (in this case on s390x) as well as in python3 as well as emulated for arm. The latter is what fails...
the Ubuntu testing has spotted this in:
- https://autopkgtest.ubuntu.com/results/autopkgtest-jammy/jammy/s390x/s/snek/20220211_065108_2144a@/log.gz
- https://autopkgtest.ubuntu.com/results/autopkgtest-jammy/jammy/s390x/s/snek/20220212_050524_3b7ee@/log.gz
- https://autopkgtest.ubuntu.com/results/autopkgtest-jammy/jammy/s390x/s/snek/20220214_080226_46968@/log.gz
In there all work, but one test fails reproducible, that is test/pass-slice.py
When eliminating the automation in makefiles and all that it comes down to:
$ qemu-system-arm -chardev stdio,mux=on,id=stdio0 -serial none -monitor none -semihosting-config enable=on,chardev=stdio0,arg='snek',arg=test/pass-slice.py -machine mps2-an385,accel=tcg -cpu cortex-m3 -kernel /usr/share/snek/snek-qemu-arm-1.7.elf -nographic -bios none
fail: [::-5] (model 'o' impl '')
To be clear:
- the test for python3 works on all platforms
- the test for snek-native works on all platforms
- the test for snek-arm work on all platforms except s390x
- with qemu 6.0 this worked, but the more recent qemu 6.2 makes it fail
- only some subtests of pass-slice.py fail (see below)
I've gone into some details for the snek side of things in the bug report there.
Steps to reproduce
- get an s390x system
- get the snek elf file for arm
- run qemu-system-arm as shown above
P.S. I tried this on latest head (building qemu in an F35 container) and it fails there as well, hence I'm listing commit 2d88a3a5 as affected as well. We know 6.0 was ok, so likely 6.0->6.1 brought the issue, I have not yet checked if a bisect is feasible for this.