Debian Bug report logs - #495120
apt crash on debian lenny and sid on powerpc: Illegal instruction

Packages: gcc, libstdc++6; Maintainer for gcc is Debian GCC Maintainers <debian-gcc@lists.debian.org>; Source for gcc is src:gcc-defaults. Maintainer for libstdc++6 is Debian GCC Maintainers <debian-gcc@lists.debian.org>; Source for libstdc++6 is src:gcc-4.9.

Reported by: nathael.pajani@ed3l.fr

Date: Thu, 14 Aug 2008 17:15:01 UTC

Severity: normal

Tags: wontfix

Merged with 520877, 520885

Done: Matthias Klose <doko@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, APT Development Team <deity@lists.debian.org>:
Bug#495120; Package apt. Full text and rfc822 format available.

Acknowledgement sent to nathael.pajani@ed3l.fr:
New Bug report received and forwarded. Copy sent to APT Development Team <deity@lists.debian.org>. Full text and rfc822 format available.

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

From: Nathael Pajani <nathael.pajani@ed3l.fr>
To: submit@bugs.debian.org
Subject: apt crash on debian lenny and sid on powerpc: Illegal instruction
Date: Thu, 14 Aug 2008 19:12:51 +0200
Package: apt
Version: 0.7.14

Hi all
in fact the bug may come from either apt or libstdc++, from what this gdb 
backtrace gives.

The symptoms:

# apt-get update
Illegal instruction
# apt-get
Illegal instruction
#


This on a system I just installed with debootstrap.
The system is a custom powerpc board with a custom kernel (2.6.26).
Running Etch on it gives no error of any kind. (apt on etch is 
apt_0.6.46.4-0.1_powerpc.deb)
I tried another custom board, with another kernel (2.6.22-rc5) based on a denx 
kernel (http://www.denx.de/en/) and I have the same error with sid (did not try 
lenny yet..) and once again no error with etch version.

dpkg is all right, I have been able to install ntp, file, gdb, .... but had to 
use wget to download the archives.

For all the tests, the system is using an NFS root file system.

If you need any more info than the following, even access to a board with ssh 
for tests on your own, mail me (nathael.pajani -- ed3l.fr) .

# uname -a
Linux csbx3545 2.6.26-actis #1 Tue Aug 12 21:41:24 CEST 2008 ppc GNU/Linux

# dpkg --status apt
Package: apt
Status: install ok installed
[...]
Maintainer: APT Development Team <deity@lists.debian.org>
Architecture: powerpc
Version: 0.7.14
[...]

# dpkg -s libc6 | grep ^Version
Version: 2.7-13

# dpkg --status libstdc++6
Package: libstdc++6
Status: install ok installed
[...]
Architecture: powerpc
Source: gcc-4.3
Version: 4.3.1-2


# file /usr/bin/apt-get
/usr/bin/apt-get: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 
(SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, with unknown 
capability 0x41000000 = 0xf676e75, stripped

aptitude has problem also:
http://www.nathael.org/Data/aptitude_error_powerpc_lenny.jpg


# gdb apt-get
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "powerpc-linux-gnu"...
(no debugging symbols found)
(gdb) run
Starting program: /usr/bin/apt-get
(no debugging symbols found)
[....]
(no debugging symbols found)

Program received signal SIGILL, Illegal instruction.
0x0fe85bd4 in __cxa_guard_release () from /usr/lib/libstdc++.so.6
(gdb) bt
#0  0x0fe85bd4 in __cxa_guard_release () from /usr/lib/libstdc++.so.6
#1  0x0fe04b08 in ?? () from /usr/lib/libstdc++.so.6
#2  0x0fe0570c in std::locale::locale () from /usr/lib/libstdc++.so.6
#3  0x0fe01284 in std::ios_base::Init::Init () from /usr/lib/libstdc++.so.6
#4  0x0ffb1cc4 in ?? () from /usr/lib/libapt-pkg-libc6.7-6.so.4.6
#5  0x0ffb7028 in ?? () from /usr/lib/libapt-pkg-libc6.7-6.so.4.6
#6  0x0ff2b838 in _init () from /usr/lib/libapt-pkg-libc6.7-6.so.4.6
#7  0x4800efd0 in ?? () from /lib/ld.so.1
#8  0x4800f15c in ?? () from /lib/ld.so.1
#9  0x48016d24 in ?? () from /lib/ld.so.1
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) quit


# strace apt-get
execve("/usr/bin/apt-get", ["apt-get"], [/* 17 vars */]) = 0
brk(0)                                  = 0x1002e000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x4801f000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=10872, ...}) = 0
mmap(NULL, 10872, PROT_READ, MAP_PRIVATE, 3, 0) = 0x48020000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/libapt-pkg-libc6.7-6.so.4.6", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\2(P"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=880248, ...}) = 0
mmap(0xff09000, 944736, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0xff09000
mprotect(0xffdd000, 61440, PROT_NONE)   = 0
mmap(0xffec000, 16384, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd3000) = 0xffec000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libutil.so.1", O_RDONLY)     = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\t"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9772, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x48023000
mmap(0xfee6000, 73876, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0xfee6000
mprotect(0xfee8000, 61440, PROT_NONE)   = 0
mmap(0xfef7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 
3, 0x1000) = 0xfef7000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/libstdc++.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\5\5"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=1181880, ...}) = 0
mmap(0xfda0000, 1269412, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0xfda0000
mprotect(0xfebb000, 65536, PROT_NONE)   = 0
mmap(0xfecb000, 24576, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11b000) = 0xfecb000
mmap(0xfed1000, 20132, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xfed1000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libm.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\313"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=706940, ...}) = 0
mmap(0xfcd3000, 770764, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0xfcd3000
mprotect(0xfd7c000, 65536, PROT_NONE)   = 0
mmap(0xfd8c000, 16384, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa9000) = 0xfd8c000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY)    = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\'"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=90000, ...}) = 0
mmap(0xfc9d000, 154592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0xfc9d000
mprotect(0xfcb3000, 61440, PROT_NONE)   = 0
mmap(0xfcc2000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 
3, 0x15000) = 0xfcc2000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\1\351"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1458348, ...}) = 0
mmap(0xfb17000, 1528408, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0xfb17000
mprotect(0xfc75000, 65536, PROT_NONE)   = 0
mmap(0xfc85000, 20480, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15e000) = 0xfc85000
mmap(0xfc8a000, 8792, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, 
-1, 0) = 0xfc8a000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x48024000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x48025000
mprotect(0xfc85000, 4096, PROT_READ)    = 0
mprotect(0xfd8c000, 12288, PROT_READ)   = 0
mprotect(0xfecb000, 16384, PROT_READ)   = 0
mprotect(0xfef7000, 4096, PROT_READ)    = 0
mprotect(0x4802f000, 4096, PROT_READ)   = 0
munmap(0x48020000, 10872)               = 0
--- SIGILL (Illegal instruction) @ 0 (0) ---
+++ killed by SIGILL +++
Process 2022 detached
#



-- 
Nathaël PAJANI
ED3L - Etude et Développement - Linux et Logiciels Libres
Adresse :
   25 av. Alexandre Godard
   69150 Décines-Charpieu
   FRANCE
Mail : nathael.pajani@ed3l.fr
Tel : 06 19 35 33 91
Internet : http://www.ed3l.fr




Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#495120; Package apt. Full text and rfc822 format available.

Acknowledgement sent to nathael@nathael.net:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. Full text and rfc822 format available.

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

From: nathael <nathael@nathael.net>
To: 495120@bugs.debian.org
Subject: more informations: problem comes from libstdc++6
Date: Thu, 14 Aug 2008 21:29:24 +0200
One of my friends found this:

http://gcc.gnu.org/ml/gcc-patches/2006-11/msg01238.html

Both boards have e500 cores.

I think this locates the problem both in libstdc++6 and in the compiler used to 
compile the powerpc packages which should be compiled with options to support 
e500 cores (either TARGET_NO_LWSYNC or TARGET_E500), for this may be present in 
other packages.

Here are some tests I did:



gdb backtrace gives:
#0  0x0fe85bd4 in __cxa_guard_release () from /usr/lib/libstdc++.so.6

# objdump -d /usr/lib/libstdc++.so.6.0.10
[....]
000e5b30 <__cxa_guard_release>:
[....]
   e5bd4:       7c 20 04 ac     lwsync
[....]


# cat test.c
#include <stdio.h>

int main( int argc, char *argv[] )
{
        printf("doing lwsync in asm.\n");
        asm volatile("lwsync" : : : "memory");
        printf("done lwsync in asm.\n");
        return 0;
}

# gcc test.c -o test

# ./test
doing lwsync in asm.
Illegal instruction
#

# gdb test
[....]
(gdb) run
Starting program: /root/test
doing lwsync in asm.

Program received signal SIGILL, Illegal instruction.
0x10000494 in main ()
Current language:  auto; currently asm
(gdb) bt
#0  0x10000494 in main ()
(gdb)

# objdump -d test
[....]
10000494:       7c 20 04 ac     lwsync
[....]





Bug reassigned from package `apt' to `libstdc++6,gcc'. Request was from nathael <nathael@nathael.net> to control@bugs.debian.org. (Sat, 23 Aug 2008 10:27:04 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#495120; Package libstdc++6,gcc. Full text and rfc822 format available.

Acknowledgement sent to Matthias Klose <doko@cs.tu-berlin.de>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. Full text and rfc822 format available.

Message #17 received at 495120@bugs.debian.org (full text, mbox):

From: Matthias Klose <doko@cs.tu-berlin.de>
To: nathael <nathael@nathael.net>, 495120@bugs.debian.org
Subject: Re: more informations: problem comes from libstdc++6
Date: Sun, 24 Aug 2008 04:15:46 +0200
both 4.2 and 4.3 have applied this patch, so how this is a regression
to our previous compiler version.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#495120; Package libstdc++6,gcc. (Mon, 16 Feb 2009 06:45:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to janos.priv@gmail.com:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. (Mon, 16 Feb 2009 06:45:03 GMT) Full text and rfc822 format available.

Message #22 received at 495120@bugs.debian.org (full text, mbox):

From: Janos Laube <janos.priv@gmail.com>
To: 495120@bugs.debian.org
Subject: why it isn't fixed yet
Date: Mon, 16 Feb 2009 07:42:50 +0100
it makes lenny pretty much unusable for me :-) if you need more
information let me know, but i think all relevant details are posted
already :-)

Janos




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#495120; Package libstdc++6,gcc. (Mon, 16 Feb 2009 09:03:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Gorguès <nicolas.gorgues@siloh.fr>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. (Mon, 16 Feb 2009 09:03:04 GMT) Full text and rfc822 format available.

Message #27 received at 495120@bugs.debian.org (full text, mbox):

From: Nicolas Gorguès <nicolas.gorgues@siloh.fr>
To: 495120@bugs.debian.org
Subject: Re: Bug#495120: why it isn't fixed yet
Date: Mon, 16 Feb 2009 10:00:56 +0100
I have to second this, Janos...

I'm using Debian chroots on Synology boxes. These tend to become very 
common, and the lastest one (DS-209+) comes with a e500v2 PowerPC 
processor. Some previous and widely used models were based on e500v1 
(DS-107).

Being unable to apt-get (or aptitude) anything with lenny, I'm stuck 
with etch... which has just been obsoleted, while the buggy release 
became "stable"...

I tried to rebuild libstdc++.so.6.0.10 with a chrooted Gentoo (emerging 
gcc-4.3.2-r3), without any change regarding the "illegal instruction" 
error... It seems I wasn't able to guess the special compilation option 
that would have done the magic...

Any help - compilation instructions, patched library, dirty workaround 
to make package management work in lenny, anything... - regarding this 
issue would be greatly appreciated!

Regards,

Nicolas.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#495120; Package libstdc++6,gcc. (Fri, 27 Feb 2009 21:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sebastian Andrzej Siewior <sebastian@breakpoint.cc>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. (Fri, 27 Feb 2009 21:33:08 GMT) Full text and rfc822 format available.

Message #32 received at 495120@bugs.debian.org (full text, mbox):

From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
To: 495120@bugs.debian.org
Cc: Nicolas Gorgu <nicolas.gorgues@siloh.fr>, Matthias Klose <doko@cs.tu-berlin.de>, Nathael Pajani <nathael.pajani@ed3l.fr>
Subject: could a e500 be a solution?
Date: Fri, 27 Feb 2009 22:26:59 +0100
Hi,

as I announced it earlier this week at debian ppc ml [1].

[1] http://lists.debian.org/debian-powerpc/2009/02/msg00128.html

Sebastian




Merged 495120 520877 520885. Request was from Steve Cotton <steve0001@s.cotton.clara.co.uk> to control@bugs.debian.org. (Thu, 23 Apr 2009 14:57:06 GMT) Full text and rfc822 format available.

Added tag(s) wontfix. Request was from Matthias Klose <doko@debian.org> to control@bugs.debian.org. (Mon, 04 Jan 2010 13:42:06 GMT) Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 09 Feb 2010 07:28:59 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 24 19:56:49 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.