qemu-sh4-static: segmentation fault during debootstrap second stage on amd64 but not i386

Bug #1254824 reported by Ken Sharp on 2013-11-25
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
qemu-linaro (Ubuntu)
Undecided
Unassigned

Bug Description

Host: Ubuntu Precise amd64
Guest: Debian Sid (ports) sh4

While running a debootstrap for a Debian Sid sh4 guest, the process stops when attempting to run the second stage with a Segmentation Fault.

# qemu-debootstrap --no-check-gpg --arch=sh4 sid sh4 http://ftp.debian-ports.org/debian
I: Running command: debootstrap --arch sh4 --foreign --no-check-gpg sid sh4 http://ftp.debian-ports.org/debian
[...]
I: Running command: chroot sh4 /debootstrap/debootstrap --second-stage
Segmentation fault (core dumped)

Running "chroot sh4" starts a shell and running a command that requires a fork successfully completes but then the whole thing stops responding and has to be kill -9ed.

The exact same process on Precise i386 works fine (it fails much later on but is probably unrelated).

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: qemu-user-static 1.0.50-2012.03-0ubuntu2.1
ProcVersionSignature: Ubuntu 3.8.0-33.48~precise1-generic 3.8.13.11
Uname: Linux 3.8.0-33-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.0.1-0ubuntu17.6
Architecture: amd64
Date: Mon Nov 25 17:31:36 2013
Dependencies:

InstallationMedia: Ubuntu 12.04.3 LTS "Precise Pangolin" - Release amd64 (20130820.1)
MarkForUpload: True
ProcEnviron:
 LANGUAGE=en_GB:en
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: qemu-linaro
UpgradeStatus: No upgrade log present (probably fresh install)

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qemu-linaro (Ubuntu):
status: New → Confirmed

Hi!

I'm the current and only active porter for Debian sh4. I was just experimenting with qemu and sh4 chroots and just ran into the same problem and hence stumbled over this bug report. The issue is definitely reproducible. qemu-sh4-static on i386 works while it segfaults on sh4.

This should be reported to qemu upstream in case this hasn't happened yet. I will take care of that.

Adrian

Laurent Vivier (laurent-vivier) wrote :

The attached patch fixes the problem for me on an x86_64 host. It needs to be tested on a i386 host.

The attachment "Fix stack frame retcode address" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch

I have applied the patch and I can verify that qemu-sh4 now works properly on an amd64 host.

Unless there is anything else that needs to be considered, please apply the patch. Having it merged means improving sh4 support in Debian as we can use qemu-sh4 to set up virtual buildds for this architecture.

Thanks,
Adrian

Bruno Haible (bruno-clisp) wrote :

The patch has been applied to mainline qemu at https://git.qemu.org/?p=qemu.git;a=commitdiff;h=2a0fa68fb9761e2eb3dae4034131948d33018dc9 and is thus contained in qemu-2.6.0 and newer.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers