Debian Bug report logs - #641270
qemu-user-static: qemu-arm-static doesn't support armhf

version graph

Package: qemu-user-static; Maintainer for qemu-user-static is Debian QEMU Team <pkg-qemu-devel@lists.alioth.debian.org>; Source for qemu-user-static is src:qemu (PTS, buildd, popcon).

Reported by: "Trent W. Buck" <trentbuck@gmail.com>

Date: Mon, 12 Sep 2011 09:45:42 UTC

Severity: wishlist

Found in version qemu/0.15.0~rc2+dfsg-1

Fixed in version 1.0+dfsg-1

Done: Vagrant Cascadian <vagrant@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian QEMU Team <pkg-qemu-devel@lists.alioth.debian.org>:
Bug#641270; Package qemu-user-static. (Mon, 12 Sep 2011 09:45:46 GMT) (full text, mbox, link).


Acknowledgement sent to "Trent W. Buck" <trentbuck@gmail.com>:
New Bug report received and forwarded. Copy sent to Debian QEMU Team <pkg-qemu-devel@lists.alioth.debian.org>. (Mon, 12 Sep 2011 09:45:48 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: "Trent W. Buck" <trentbuck@gmail.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: aptitude segfault in qemu-arm-static.
Date: Mon, 12 Sep 2011 19:18:40 +1000
Package: qemu-user-static
Version: 0.15.0~rc2+dfsg-1
Severity: normal
File: /usr/bin/qemu-arm-static

I did this:

    mkdir -p target/usr/bin
    cp /usr/bin/qemu-arm-static target/usr/bin
    cdebootstrap -f minimal -k /etc/debmirror/trustedkeys.gpg -a armhf unstable target http://apt/debian-ports

Where http://apt/debian-ports is a partial mirror of debian-ports.org, made today.

When this finished, I chrooted in and installed aptitude.  Running
aptitude --help works, but aptitude -u clears the screen then prints

    Segmentation fault

And aptitude (without arguments) was printing something different
about the stack being uninitialized or something, but now it's also
printing "Segmentation fault".

I tried stracing it, but strace says that ptrace isn't supported by
qemu-user-static.

Ref. http://wiki.debian.org/QemuUserEmulation

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

qemu-user-static depends on no packages.

Versions of packages qemu-user-static recommends:
ii  binfmt-support                2.0.6      Support for extra binary formats

Versions of packages qemu-user-static suggests:
ii  sudo                          1.7.4p6-1  Provide limited super user privile

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Debian QEMU Team <pkg-qemu-devel@lists.alioth.debian.org>:
Bug#641270; Package qemu-user-static. (Mon, 12 Sep 2011 10:51:03 GMT) (full text, mbox, link).


Acknowledgement sent to "Trent W. Buck" <trentbuck@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian QEMU Team <pkg-qemu-devel@lists.alioth.debian.org>. (Mon, 12 Sep 2011 10:51:09 GMT) (full text, mbox, link).


Message #10 received at 641270@bugs.debian.org (full text, mbox, reply):

From: "Trent W. Buck" <trentbuck@gmail.com>
To: 641270@bugs.debian.org
Subject: Re: Bug#641270: Acknowledgement (aptitude segfault in qemu-arm-static.)
Date: Mon, 12 Sep 2011 20:46:49 +1000
Here's another one:

    (bootstrap)root@twb:~# git clone git://github.com/lilstevie/CrOS-Hybrid-Kernel.git
    Cloning into CrOS-Hybrid-Kernel...
    *** longjmp causes uninitialized stack frame ***: /usr/bin/qemu-arm-static terminated
    ======= Backtrace: =========
    [0x600d6395]
    [0x600d6329]
    [0x600d6293]
    [0x6002ee60]
    [0x6001f2f8]
    [0x600184cd]
    [0x6008e400]
    [0x6037f69d]
    ======= Memory map: ========
    ^C^C^C^C^Z
    [1]+  Stopped                 git clone git://github.com/lilstevie/CrOS-Hybrid-Kernel.git
    (bootstrap)root@twb:~# kill -9 %1

    [1]+  Stopped                 git clone git://github.com/lilstevie/CrOS-Hybrid-Kernel.git
    (bootstrap)root@twb:~#
    [1]+  Killed                  git clone git://github.com/lilstevie/CrOS-Hybrid-Kernel.git
    (bootstrap)root@twb:~# exit
    root@twb:~# qemu-arm-static --version | head -1
    qemu-arm version 0.14.92 (Debian 0.15.0~rc2+dfsg-1), Copyright (c) 2003-2008 Fabrice Bellard

Because it was on faster hardware, I also tried copying that sid armhf
rootfs onto an Ubuntu Lucid system, with similar results

   root@lucid:~/twb-abuse# chroot squashfs-root/           # NOTE: at this point, sid's qemu-arm-static is in the chroot's usr/bin/
   (bootstrap)root@lucid:/# cd root
   (bootstrap)root@lucid:~# export LC_ALL=C
   (bootstrap)root@lucid:~# git clone git://github.com/lilstevie/CrOS-Hybrid-Kernel.git
   Cloning into CrOS-Hybrid-Kernel...
   Segmentation fault
   (bootstrap)root@lucid:~# exit
   root@lucid:~/twb-abuse# cp -b /usr/bin/qemu-arm-static squashfs-root/usr/bin/    # now it has lucid's qemu
   root@lucid:~/twb-abuse# chroot squashfs-root
   qemu: fatal: cp15 insn ee1d7f70

   R00=4009f958 R01=0d696914 R02=000190e0 R03=00018e00
   R04=42082988 R05=00021106 R06=420829a8 R07=00000000
   R08=00000000 R09=000ae62c R10=4009f000 R11=00000000
   R12=000ae62c R13=4007f450 R14=4008f538 R15=4008b116
   PSR=20000030 --C- T usr32
   ^C^C^C^Z

   # at this point I had to kill -9 the qemu process.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian QEMU Team <pkg-qemu-devel@lists.alioth.debian.org>:
Bug#641270; Package qemu-user-static. (Mon, 12 Sep 2011 17:03:08 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@freegeek.org>:
Extra info received and forwarded to list. Copy sent to Debian QEMU Team <pkg-qemu-devel@lists.alioth.debian.org>. (Mon, 12 Sep 2011 17:03:08 GMT) (full text, mbox, link).


Message #15 received at 641270@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@freegeek.org>
To: "Trent W. Buck" <trentbuck@gmail.com>, 641270@bugs.debian.org
Subject: Re: Bug#641270: aptitude segfault in qemu-arm-static.
Date: Mon, 12 Sep 2011 10:01:54 -0700
retitle 641270 qemu-user-static: qemu-arm-static doesn't support armhf
severity 641270 wishlist
thanks

On Mon, Sep 12, 2011 at 07:18:40PM +1000, Trent W. Buck wrote:
>     mkdir -p target/usr/bin
>     cp /usr/bin/qemu-arm-static target/usr/bin
>     cdebootstrap -f minimal -k /etc/debmirror/trustedkeys.gpg -a armhf unstable target http://apt/debian-ports
> 
> Where http://apt/debian-ports is a partial mirror of debian-ports.org, made today.

armhf is currently unsupported or poorly supported, as far as i know.

can you reproduce with an armel chroot?


live well,
  vagrant




Changed Bug title to 'qemu-user-static: qemu-arm-static doesn't support armhf' from 'aptitude segfault in qemu-arm-static.' Request was from Vagrant Cascadian <vagrant@freegeek.org> to control@bugs.debian.org. (Mon, 12 Sep 2011 17:03:12 GMT) (full text, mbox, link).


Severity set to 'wishlist' from 'normal' Request was from Vagrant Cascadian <vagrant@freegeek.org> to control@bugs.debian.org. (Mon, 12 Sep 2011 17:03:13 GMT) (full text, mbox, link).


Reply sent to Vagrant Cascadian <vagrant@debian.org>:
You have taken responsibility. (Thu, 05 Jan 2012 00:48:04 GMT) (full text, mbox, link).


Notification sent to "Trent W. Buck" <trentbuck@gmail.com>:
Bug acknowledged by developer. (Thu, 05 Jan 2012 00:48:04 GMT) (full text, mbox, link).


Message #24 received at 641270-done@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@debian.org>
To: "Trent W. Buck" <trentbuck@gmail.com>, 641270-done@bugs.debian.org
Subject: Re: Bug#641270: aptitude segfault in qemu-arm-static.
Date: Wed, 4 Jan 2012 16:45:14 -0800
Version: 1.0+dfsg-1

On Mon, Sep 12, 2011 at 07:18:40PM +1000, Trent W. Buck wrote:
> Package: qemu-user-static
> Version: 0.15.0~rc2+dfsg-1
> Severity: normal
> File: /usr/bin/qemu-arm-static
> 
> I did this:
> 
>     mkdir -p target/usr/bin
>     cp /usr/bin/qemu-arm-static target/usr/bin
>     cdebootstrap -f minimal -k /etc/debmirror/trustedkeys.gpg -a armhf unstable target http://apt/debian-ports
> 
> Where http://apt/debian-ports is a partial mirror of debian-ports.org, made today.
> 
> When this finished, I chrooted in and installed aptitude.  Running
> aptitude --help works, but aptitude -u clears the screen then prints
> 
>     Segmentation fault

apparently, armhf is at least reasonably well supported now(maybe it always 
was), and so i tested with aptitude 0.6.4-1.2+b1 in an armhf sid chroot.

i was able to reproduce this behavior with qemu-user-static 0.15.1+dfsg-3, but 
not with qemu-user-static 1.0+dfsg-1, so it appears to be fixed in newer 
versions.

live well,
  vagrant




Information forwarded to debian-bugs-dist@lists.debian.org, Debian QEMU Team <pkg-qemu-devel@lists.alioth.debian.org>:
Bug#641270; Package qemu-user-static. (Thu, 05 Jan 2012 03:03:07 GMT) (full text, mbox, link).


Acknowledgement sent to "Trent W. Buck" <trentbuck@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian QEMU Team <pkg-qemu-devel@lists.alioth.debian.org>. (Thu, 05 Jan 2012 03:03:07 GMT) (full text, mbox, link).


Message #29 received at 641270@bugs.debian.org (full text, mbox, reply):

From: "Trent W. Buck" <trentbuck@gmail.com>
To: 641270@bugs.debian.org
Cc: Vagrant Cascadian <vagrant@debian.org>
Subject: Re: Bug#641270: aptitude segfault in qemu-arm-static.
Date: Thu, 5 Jan 2012 14:01:19 +1100
Vagrant Cascadian wrote:
> Version: 1.0+dfsg-1
>
> On Mon, Sep 12, 2011 at 07:18:40PM +1000, Trent W. Buck wrote:
> > Package: qemu-user-static
> > Version: 0.15.0~rc2+dfsg-1
> > Severity: normal
> > File: /usr/bin/qemu-arm-static
> >
> > I did this:
> >
> >     mkdir -p target/usr/bin
> >     cp /usr/bin/qemu-arm-static target/usr/bin
> >     cdebootstrap -f minimal -k /etc/debmirror/trustedkeys.gpg -a armhf unstable target http://apt/debian-ports
> >
> > Where http://apt/debian-ports is a partial mirror of debian-ports.org, made today.
> >
> > When this finished, I chrooted in and installed aptitude.  Running
> > aptitude --help works, but aptitude -u clears the screen then prints
> >
> >     Segmentation fault
>
> apparently, armhf is at least reasonably well supported now(maybe it always
> was), and so i tested with aptitude 0.6.4-1.2+b1 in an armhf sid chroot.
>
> i was able to reproduce this behavior with qemu-user-static 0.15.1+dfsg-3, but
> not with qemu-user-static 1.0+dfsg-1, so it appears to be fixed in newer
> versions.

Sorry, I forgot all about this ticket.  I don't remember if I said so
when I reported this, but (assuming I'm remembering the right bug) it
turned out to be something about qemu not zeroing memory before
handing it out to the guest process or something.

Someone on #kvm or #qemu gave me a short (~dozen lines) patch that I
applied to debian's qemu source package, and after doing that I
compiled a qemu-arm-static binary that didn't exhibit this behaviour.

Sorry for dropping the ball on this one.  Fortunately it looks like
the chap from IRC pushed the patch into upstream, since Vagrant
indicates it has trickled down to Debian in the current version :-)




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 17 Feb 2012 07:40:21 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Jan 12 18:09:47 2018; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.