libapt-pkg-libc6.9-6.so.4.7.0 segfaults in pkgCache::FindPkg ()

Bug #340742 reported by Martin Olsson
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
New
Undecided
Unassigned
Nominated for Jaunty by Ariel Faigon

Bug Description

I just went through this very painful situation, after which my dmesg look like this:

[ 7074.740126] apt-check[10413]: segfault at 7f1b9408fd75 ip 00007f1b5d698066 sp 00007fff66b93820 error 4 in libapt-pkg-libc6.9-6.so.4.7.0[7f1b5d65f000+bc000]
[ 7085.117862] apt-check[10506]: segfault at 7f863158ed75 ip 00007f85fab97066 sp 00007fff04091d20 error 4 in libapt-pkg-libc6.9-6.so.4.7.0[7f85fab5e000+bc000]
[ 7092.590232] apt-check[10993]: segfault at 7fe51c7f9d75 ip 00007fe4e5e02066 sp 00007fffef2ff380 error 4 in libapt-pkg-libc6.9-6.so.4.7.0[7fe4e5dc9000+bc000]
[ 7112.957720] apport-gtk[11129]: segfault at 7f679c8b9d75 ip 00007f676a3f9066 sp 00007f6766160820 error 4 in libapt-pkg-libc6.9-6.so.4.7.0[7f676a3c0000+bc000]
[ 7150.135892] apt-check[11386]: segfault at 7fbc75cd2d75 ip 00007fbc3f2db066 sp 00007fff487d6460 error 4 in libapt-pkg-libc6.9-6.so.4.7.0[7fbc3f2a2000+bc000]
[ 7208.025538] apport-gtk[11401]: segfault at 7f331aeccd75 ip 00007f32e9794066 sp 00007f32e4773820 error 4 in libapt-pkg-libc6.9-6.so.4.7.0[7f32e975b000+bc000]
[ 7233.203051] apport-gtk[11495]: segfault at 3c4871e5 ip 00007f6b75570066 sp 00007f6b6fa5d820 error 4 in libapt-pkg-libc6.9-6.so.4.7.0[7f6b75537000+bc000]
[ 7337.790197] apport-gtk[11499]: segfault at 7fcd6d222d65 ip 00007fcd3b1bd066 sp 00007fcd36ac8820 error 4 in libapt-pkg-libc6.9-6.so.4.7.0[7fcd3b184000+bc000]
[ 7357.158640] apport-gtk[11588]: segfault at 7f55058f4d65 ip 00007f54d3ef9066 sp 00007f54cf19a820 error 4 in libapt-pkg-libc6.9-6.so.4.7.0[7f54d3ec0000+bc000]

What happened was that apport failed to report a bug in apt, and then apport itself crashed during this process and I get this dialog saying "Do you want to report a bug in " (empty string instead of filename). And then apport crashed again with some other bug (see different EIP above).

Based on this, I think some basic testing would be useful for apport-gtk... like for example, what happens if you do " kill -s SIGSEGV `pidof apport-gtk`" or something equivalent?

Is there a plan in place to handle bugs in apport? Bugs in apport can potentially be very nasty because they could hide other super common bugs that are not being reported correctly (like my apt bug clearly wasnt).

Revision history for this message
Martin Olsson (mnemo) wrote :

Maybe this has something to do with the fact that apport-gtk sometimes runs with sudo and sometimes not?

Anyway, I also found I had two unsubmitted apport-gtk crashes in /var/crashes folder after this:
http://temp.minimum.se/apport-gtk-crashes/

Revision history for this message
Martin Pitt (pitti) wrote :

Darn, I saw this bug report too late, and now /var/log/apport.log is gone. Actually apport has a built-in crash counter, so it stops to report crashes of a program after the third time in a day. Apparently this didn't work? Did you get a neverending succession of crash reports?

If you encounter this again, can you please attach /var/log/apport.log here?

Of course apport could refuse to report crashes of its own, but in 99% of the cases these are actually useful. SIGSEGV are never related to apport itself, but often to python-gtk, or python itself, and thus releavant to other system parts as well.

Do you still happen to have the apport-gtk related .crash file? Could you please report it through

  apport-cli -c /var/crash/_usr_bin_apport-gtk*.crash

?

Changed in apport (Ubuntu):
status: New → Incomplete
Revision history for this message
Martin Olsson (mnemo) wrote :

Both the apport-gtk*.crash files are available for download at the URL I posted in my previous comment. I had accidently chmod'ed them 600 but they are 644. I believe you will be able to extract two SEGV stacks from these crash files.

If there is any confusion, I actually want apport to be able to submit crashes in itself but that process isn't working right now. That's why I suggested some testing with "kill -s SIGSEGV" to make sure it can indeed report a crash inside itself.

As you mention, the apport.log is gone already. :-(

Changed in apport:
status: Incomplete → New
Revision history for this message
Lapaj (lapaj) wrote :

I have the same problem, i can't use apt-get or aptitude because of this.
My apport.log part:
apport (pid 4935) Sat Apr 11 20:21:06 2009: called for pid 4924, signal 11
apport (pid 4935) Sat Apr 11 20:21:06 2009: script: /usr/share/apport/apport-gtk, interpreted by /usr/bin/python2.6 (command line "/usr/bin/python /usr/share/apport/apport-gtk")
apport (pid 4935) Sat Apr 11 20:21:06 2009: apport: report /var/crash/_usr_share_apport_apport-gtk.0.crash already exists and unseen, doing nothing to avoid disk usage DoS

Revision history for this message
Martin Pitt (pitti) wrote :

Both crashes happen in python-apt:

 #0 0x00007fcd3b1bd066 in pkgCache::FindPkg () from /usr/lib/libapt-pkg-libc6.9-6.so.4.7
 #1 0x00007fcd3b1e9068 in pkgCacheGenerator::NewPackage () from /usr/lib/libapt-pkg-libc6.9-6.so.4.7
 #2 0x00007fcd3b1e9dcc in pkgCacheGenerator::MergeList () from /usr/lib/libapt-pkg-libc6.9-6.so.4.7
 #3 0x00007fcd3b21d6a5 in debStatusIndex::Merge () from /usr/lib/libapt-pkg-libc6.9-6.so.4.7
 #4 0x00007fcd3b1e99c8 in ?? () from /usr/lib/libapt-pkg-libc6.9-6.so.4.7
 #5 0x00007fcd3b1eca31 in pkgMakeStatusCache () from /usr/lib/libapt-pkg-libc6.9-6.so.4.7
 #6 0x00007fcd3b1e3670 in pkgCacheFile::BuildCaches () from /usr/lib/libapt-pkg-libc6.9-6.so.4.7
 #7 0x00007fcd3b1e3791 in pkgCacheFile::Open () from /usr/lib/libapt-pkg-libc6.9-6.so.4.7
 #8 0x00007fcd3b45703e in TmpGetCache () from /usr/lib/python2.6/dist-packages/apt_pkg.so

Your dmesg shows that other applications using apt segfault for the same reason. I'm afraid there isn't much that I can do about this in apport.

summary: - apport-gtk fails to report bugs on itself?
+ libapt-pkg-libc6.9-6.so.4.7.0 segfaults in pkgCache::FindPkg ()
affects: apport (Ubuntu) → apt (Ubuntu)
Revision history for this message
joe (mjoachimiak) wrote :

I confirm:
from /var/log/syslog
Nov 26 17:04:44 kitchen-computer kernel: [ 124.818477] update-manager[3840]: segfault at 7f7c26ed033e ip 00007f7bf72fd066 sp 00007fff0a9b25a0 error 4 in libapt-pkg-libc6.9-6.so.4.7.0[7f7bf72c4000+bc000]

Nov 26 17:05:01 kitchen-computer kernel: [ 142.342055] apt-check[5344]: segfault at 7f024529533e ip 00007f0210d11066 sp 00007fff1a20bd10 error 4 in libapt-pkg-libc6.9-6.so.4.7.0[7f0210cd8000+bc000]

Nov 26 13:45:51 kitchen-computer kernel: [ 2270.509856] synaptic[5381]: segfault at 7f4862446280 ip 00007f3eca35f784 sp 00007fffd27efc10 error 4 in libapt-pkg-libc6.9-6.so.4.7.0[7f3eca314000+bc000]

and so on....

system is : Linux kitchen-computer 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:58:03 UTC 2009 x86_64 GNU/Linux

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.