#828041 Panic when attempting to enter Sparc64 QEMU guest

Package:
qemu-user-static
Source:
qemu
Description:
QEMU user mode emulation binaries (static version)
Submitter:
Date:
2023-12-11 14:30:03 UTC
Severity:
normal
#828041#5
Date:
2016-06-24 09:17:16 UTC
From:
To:
I have a Debian 8.5 on amd64/x86_64 host with Testing enabled. I setup
a QEMU Sparc64 guest with Unstable enabled using the following
command:

qemu-debootstrap --arch=sparc64 --keyring
/usr/share/keyrings/debian-ports-archive-keyring.gpg \
  --variant=buildd --exclude=debfoster unstable debian-sparc64
http://ftp.ports.debian.org/debian-ports/

When I attempt to enter the QEMU guest environment:

# chroot debian-sparc64
pc: 0000000000163860  npc: 0000000000163864
%g0-3: 0000000000000000 0000000000008004 0000000000000000 0000000000000000
%g4-7: 0000000000000002 0000000000000008 4765744346410000 0000004000ee2700
%o0-3: 0000000000000004 00000040007fe839 00000040007fe839 00000000002f09a8
%o4-7: 0000000000000003 00000000002ef400 00000040007fe779 00000040007fe8e1
%l0-3: 000000000000005b 00000000002fc268 0000000000000010 0000000000000000
%l4-7: 00000000002fc268 0000000000000001 000000000000005d 0000004000edc000
%i0-3: 0000004000d778a0 00000040007fff48 0000000000000000 0000000000000004
%i4-7: 0000004000ee08c8 0000004000ee08b0 00000040007ff691 0000004000d77b00
%f00:  0000000000000000 0000000000000000 0000000000000000 0000000000000000
%f08:  0000000000000000 0000000000000000 0000000000000000 0000000000000000
%f16:  0000000000000003 0000000000000000 0000000000000000 0000000000000000
%f24:  0000000000000000 0000000000000000 0000000100000000 0000000000000000
%f32:  0000000000000000 0000000000000000 0000000000000000 0000000000000000
%f40:  0000000000000000 0000000000000000 0000000000000000 0000000000000000
%f48:  0000000000000000 0000000000000000 0000000000000000 0000000000000000
%f56:  0000000000000001 0000000000000000 0000000000000000 0000000000000000
pstate: 00000092 ccr: 44 (icc: -Z-- xcc: -Z--) asi: f0 tl: 0 pil: 0
cansave: 5 canrestore: 1 otherwin: 0 wstate: 0 cleanwin: 7 cwp: 2
fsr: 0000000000000000 y: 0000000000000000 fprs: 0000000000000004

Unhandled trap: 0x34

#828041#10
Date:
2016-06-24 11:41:28 UTC
From:
To:
There's some information missing from this bug. I'm not sure why tee
did not capture it because I used `choot debian-sparc64 2>&1 | tee
...`

Here's the missing preamble that tee failed to capture. I transcribed
it, so my apologies for typos:

# choot debian-sparc64
*** longjmp causes unintialized stack frame ***: /bin/bash terminate
Unhandled trap: 0x34
pc: 0000000000163860 ...
...

#828041#15
Date:
2016-06-24 12:38:12 UTC
From:
To:
I can reproduce the issue on a Debian kernel booted with
'syscall.x32=y'. The failure looks a little different:

# chroot debian-sparc64
*** longjmp causes uninitialized stack frame ***: /bin/bash terminated
Unhandled trap: 0x34
pc: 0000000000163860  npc: 0000000000163864
%g0-3: 0000000000000000 0000000000008004 0000000000000000 0000000000000000
%g4-7: 0000000000000002 0000000000000008 4765744346410000 0000004000ee2700
%o0-3: 0000000000000004 00000040007fde59 00000040007fde59 00000000002f09a8
%o4-7: 0000000000000003 00000000002ef400 00000040007fdd99 00000040007fdf01
%l0-3: 000000000000005b 00000000002fced8 0000000000000010 0000000000000000
%l4-7: 00000000002fced8 0000000000000001 000000000000005d 0000004000edc000
%i0-3: 0000004000d778a0 00000040007ff568 0000000000000000 0000000000000004
%i4-7: 0000004000ee08c8 0000004000ee08b0 00000040007fecb1 0000004000d77b00
%f00:  0000000000000000 0000000000000000 0000000000000000 0000000000000000
%f08:  0000000000000000 0000000000000000 0000000000000000 0000000000000000
%f16:  0000000000000003 0000000000000000 0000000000000000 0000000000000000
%f24:  0000000000000000 0000000000000000 0000000100000000 0000000000000000
%f32:  0000000000000000 0000000000000000 0000000000000000 0000000000000000
%f40:  0000000000000000 0000000000000000 0000000000000000 0000000000000000
%f48:  0000000000000000 0000000000000000 0000000000000000 0000000000000000
%f56:  0000000000000001 0000000000000000 0000000000000000 0000000000000000
pstate: 00000092 ccr: 44 (icc: -Z-- xcc: -Z--) asi: f0 tl: 0 pil: 0
cansave: 5 canrestore: 1 otherwin: 0 wstate: 0 cleanwin: 7 cwp: 2
fsr: 0000000000000000 y: 0000000000000000 fprs: 0000000000000004

#828041#20
Date:
2017-01-26 14:50:32 UTC
From:
To:
Hi,
I just happened to realize that this seems to be a really long term bug -
maybe it never worked.
I came by an older Ubuntu Report of the same issue.

See: https://bugs.launchpad.net/debian/+source/qemu/+bug/1254828

And based on the info there this might have been broken at least since it
still was
qemu-linaro 1.0.50-2012.03-0ubuntu2.1

#828041#29
Date:
2023-12-11 13:46:14 UTC
From:
To:
I tested Bookworm (1:7.2+dfsg-7+deb12u3) and it works fine, but when
trying all releases all the way back to Buster (1:3.1+dfsg-8+deb10u8) I
was hit by:

chroot: failed to run command '/bin/true': No such file or directory

Fixed in Bookworm. Not clear if it works in the earlier releases.