[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#112361: apt-get bug similar to bug #112361



Hi,

Running Woody latest on ppc. I never had trouble running apt-get but today I
got it to exit with with a SIGSEGV twice in a row. Fortunately, the second
time I was running the bogger with gdb and I caught this:

This GDB was configured as "powerpc-unknown-linux-gnu".
(gdb) file apt-get
Reading symbols from apt-get...(no debugging symbols found)...done.
(gdb) run -b source openmotif
Starting program: /usr/bin/apt-get -b source openmotif
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
Reading Package Lists... Done
Building Dependency Tree... Done
(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0xff7dc64 in pkgSrcRecords::~pkgSrcRecords ()
  from /usr/lib/libapt-pkg-libc6.2-3-2.so.3.1
(gdb) bt
#0  0xff7dc64 in pkgSrcRecords::~pkgSrcRecords ()
  from /usr/lib/libapt-pkg-libc6.2-3-2.so.3.1
#1  0x1001519c in _init ()
#2  0xff4bebc in CommandLine::DispatchArg ()
  from /usr/lib/libapt-pkg-libc6.2-3-2.so.3.1
#3  0x1001a248 in _init ()
#4  0xfc9a820 in __libc_start_main () from /lib/libc.so.6
#5  0x0 in ?? ()

Is this enough information to track the problem? I still have my gdb session
opened and can dump more if needed.

My apt-get is a vanilla testing release as shown below:

apt 0.5.3 for linux powerpc compiled on Mar  8 2001 20:47:22
Supported Modules:
*Ver: Standard .deb
*Pkg:  Debian dpkg interface (Priority 30)
S.L: 'deb' Standard Debian binary tree
S.L: 'deb-src' Standard Debian source tree
Idx: Debian Source Index
Idx: Debian Package Index
Idx: Debian dpkg status file


This problem is reproducible 100% when I edit my /etc/apt/sources.files and
switch from testing to unstable and vice-and-versa without doing an apt-get
update and just directly doing an apt-get source of some package. So doing
the required apt-get update after editing the file  won't show the problem
(that's the workaround.)


Doing an rm /var/cache/apt/*.bin didn't resolve the problem (as I read it
did in the case of bug #112361.)


Here is the source file and the gdb disasm with *** CRASH HERE *** showing
the ppc instruction the pc is sitting when entering the debugger. FYI, r9 is
null when reaching this location, causing the exception.


// SrcRecords::pkgSrcRecords - Constructor
/*{{{*/
// ---------------------------------------------------------------------
/* Open all the source index files */
pkgSrcRecords::pkgSrcRecords(pkgSourceList &List) : Files(0), Current(0)
{
  Files = new Parser *[List.end() - List.begin() + 1];

  unsigned int Count = 0;
  pkgSourceList::const_iterator I = List.begin();
  for (; I != List.end(); I++)
  {
     Files[Count] = (*I)->CreateSrcParser();
     if (_error->PendingError() == true)
        return;
     if (Files[Count] != 0)
        Count++;
  }
  Files[Count] = 0;

  // Doesn't work without any source index files
  if (Count == 0)
  {
     _error->Error(_("Sorry, you must put some 'source' URIs"
                   " in your sources.list"));
     return;
  }

  Restart();
}
                   
/*}}}*/
// SrcRecords::~pkgSrcRecords - Destructor
/*{{{*/
// ---------------------------------------------------------------------
/* */
pkgSrcRecords::~pkgSrcRecords()
{
  if (Files == 0)
     return;

  // Blow away all the parser objects
  for (unsigned int Count = 0; Files[Count] != 0; Count++)
     delete Files[Count];
  delete [] Files;
}

(gdb) x/50i 0xff7dc64-92
0xff7dc08 <_._13pkgSrcRecords>:    stwu    r1,-32(r1)
0xff7dc0c <_._13pkgSrcRecords+4>:    mflr    r0
0xff7dc10 <_._13pkgSrcRecords+8>:    stw    r28,16(r1)
0xff7dc14 <_._13pkgSrcRecords+12>:    stw    r29,20(r1)
0xff7dc18 <_._13pkgSrcRecords+16>:    stw    r30,24(r1)
0xff7dc1c <_._13pkgSrcRecords+20>:    stw    r31,28(r1)
0xff7dc20 <_._13pkgSrcRecords+24>:    stw    r0,36(r1)
0xff7dc24 <_._13pkgSrcRecords+28>:    mr    r31,r3
0xff7dc28 <_._13pkgSrcRecords+32>:    lwz    r9,0(r31)
0xff7dc2c <_._13pkgSrcRecords+36>:    mr    r28,r4
0xff7dc30 <_._13pkgSrcRecords+40>:    cmpwi    r9,0
0xff7dc34 <_._13pkgSrcRecords+44>:    beq    0xff7dc90
<_._13pkgSrcRecords+136>
0xff7dc38 <_._13pkgSrcRecords+48>:    lwz    r0,0(r9)
0xff7dc3c <_._13pkgSrcRecords+52>:    cmpwi    r0,0
0xff7dc40 <_._13pkgSrcRecords+56>:    beq    0xff7dc80
<_._13pkgSrcRecords+120>
0xff7dc44 <_._13pkgSrcRecords+60>:    li    r29,0
0xff7dc48 <_._13pkgSrcRecords+64>:    li    r30,0
0xff7dc4c <_._13pkgSrcRecords+68>:    lwz    r9,0(r31)
0xff7dc50 <_._13pkgSrcRecords+72>:    li    r4,3
0xff7dc54 <_._13pkgSrcRecords+76>:    lwzx    r3,r30,r9
0xff7dc58 <_._13pkgSrcRecords+80>:    addi    r29,r29,4
0xff7dc5c <_._13pkgSrcRecords+84>:    lwz    r9,4(r3)
0xff7dc60 <_._13pkgSrcRecords+88>:    addi    r30,r30,4
0xff7dc64 <_._13pkgSrcRecords+92>:    lwz    r0,56(r9)        *** CRASH
HERE ***
0xff7dc68 <_._13pkgSrcRecords+96>:    mtlr    r0
0xff7dc6c <_._13pkgSrcRecords+100>:    blrl
0xff7dc70 <_._13pkgSrcRecords+104>:    lwz    r9,0(r31)
0xff7dc74 <_._13pkgSrcRecords+108>:    lwzx    r0,r29,r9
0xff7dc78 <_._13pkgSrcRecords+112>:    cmpwi    r0,0
0xff7dc7c <_._13pkgSrcRecords+116>:     bne    0xff7dc4c
<_._13pkgSrcRecords+68>
0xff7dc80 <_._13pkgSrcRecords+120>:    lwz    r3,0(r31)
0xff7dc84 <_._13pkgSrcRecords+124>:    cmpwi    r3,0
0xff7dc88 <_._13pkgSrcRecords+128>:    beq    0xff7dc90
<_._13pkgSrcRecords+136>
0xff7dc8c <_._13pkgSrcRecords+132>:    bl    0xffeef44 <debVS+3200>
0xff7dc90 <_._13pkgSrcRecords+136>:    andi.    r0,r28,1
0xff7dc94 <_._13pkgSrcRecords+140>:    beq    0xff7dca0
<_._13pkgSrcRecords+152>
0xff7dc98 <_._13pkgSrcRecords+144>:    mr    r3,r31
0xff7dc9c <_._13pkgSrcRecords+148>:    bl    0xffef0d4 <debVS+3600>
0xff7dca0 <_._13pkgSrcRecords+152>:    lwz    r0,36(r1)
0xff7dca4 <_._13pkgSrcRecords+156>:    mtlr    r0
0xff7dca8 <_._13pkgSrcRecords+160>:    lwz    r28,16(r1)
0xff7dcac <_._13pkgSrcRecords+164>:    lwz    r29,20(r1)
0xff7dcb0 <_._13pkgSrcRecords+168>:    lwz    r30,24(r1)
0xff7dcb4 <_._13pkgSrcRecords+172>:    lwz    r31,28(r1)
0xff7dcb8 <_._13pkgSrcRecords+176>:    addi    r1,r1,32
0xff7dcbc <_._13pkgSrcRecords+180>:    blr
0xff7dcc0 <Restart__13pkgSrcRecords>:    stwu    r1,-16(r1)
0xff7dcc4 <Restart__13pkgSrcRecords+4>:    mflr    r0
0xff7dcc8 <Restart__13pkgSrcRecords+8>:    stw    r31,12(r1)
0xff7dccc <Restart__13pkgSrcRecords+12>:    stw    r0,20(r1)


Let me know if I can be of any further help,

Laurent




Reply to: