ps segfaults with qemu-{arm,armel,mips,powerpc}-static

Bug #1254672 reported by Ken Sharp on 2013-11-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro QEMU
New
Undecided
Unassigned
QEMU
Undecided
Unassigned
qemu-linaro (Ubuntu)
Undecided
Unassigned

Bug Description

Host: Ubuntu Precise AMD64
Guest: Debian Testing armhf (or armel)

After running a debootstrap for Debian testing/armhf and entering the chroot, simply running "ps" causes a segmentation fault.

$ sudo qemu-debootstrap --arch=armhf testing armhf http://ftp.uk.debian.org/debian/
[...]
$ sudo chroot armhf
# ps
Signal 11 (SEGV) caught by ps (procps-ng version 3.3.4).
/bin/ps:display.c:59: please report this bug

I couldn't find a bug report for procps, which would be unusual if such a bug existed, so I'm assuming the bug is in qemu.

Unfortunately trying to run debootstrap for an Ubuntu variant fails to find the release file.

ps is used a lot, as you can imagine, but specifically it fails when trying to install some packages via "apt-get install" and no attempt is made to recover.

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 10:43:12 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)

Ken Sharp (kennybobs) wrote :
Ken Sharp (kennybobs) on 2013-11-25
description: updated
Ken Sharp (kennybobs) wrote :

Same thing with qemu-mips-static too by the looks of things.

Ken Sharp (kennybobs) wrote :

qemu-powerpc-static on i386:

# ps
Invalid data memory access: 0x00000000
NIP 0feb05e4 LR 0feb1440 CTR 0feb13f0 XER 00000000
MSR 00006040 HID0 00000000 HF 00006000 idx 0
TB 00000000 00000000
GPR00 000000000ffc178c 00000000407fffa0 000000004083f720 0000000000000001
GPR04 0000000029292929 000000000a000000 00000000fefefeff 000000007f7f7f7f
GPR08 0000000000000000 0000000080808080 0000000000000008 00000000ffffffff
GPR12 0000000024000442 000000001002c180 0000000000000000 0000000000000000
GPR16 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR20 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR24 0000000000000000 0000000000000000 0000000000000000 0000000000000001
GPR28 000000004080088c 0000000000000000 000000000ffa6ff4 0000000000000029
CR 44000444 [ G G - - - G G G ] RES ffffffff
FPR00 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR04 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR08 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR12 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR16 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR20 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR24 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR28 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPSCR 00000000
Signal 11 (SEGV) caught by ps (procps-ng version 3.3.4).
/bin/ps:display.c:59: please report this bug

tags: added: i386
Peter Maydell (pmaydell) wrote :

I suspect this is a NULL pointer access that happens in procps where it isn't handling an error path that it's not expecting somehow (either a syscall we're not implementing, or perhaps something like /proc not being mounted in your chroot environment, or something about qemu's emulation of some file in /proc isn't right). The next stage would be to debug where exactly ps is crashing (attaching a debugger to the qemu gdbstub is probably easiest, or good old printfs...)

Ken Sharp (kennybobs) on 2013-11-27
summary: - ps segfaults with qemu-arm-static
+ ps segfaults with qemu-{arm,armel,mips,powerpc}-static
Ken Sharp (kennybobs) wrote :

Version: 1.6.0+dfsg-2ubuntu4

This is fixed in Trusty in the qemu package. Doesn't look like qemu-linaro has been updated for Trusty. I don't know what is going on with these two packages.

Changed in qemu-linaro (Ubuntu):
status: New → Fix Committed
Changed in qemu:
status: New → Fix Committed
Ken Sharp (kennybobs) on 2014-01-15
tags: added: saucy
Ken Sharp (kennybobs) on 2014-01-16
Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers