apport-gtk crashed with AssertionError in __setitem__()

Bug #123062 reported by Brian J. Murrell
58
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Invalid
Undecided
Unassigned
python-apt (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: apport

Was trying to report another crash and apport-gtk crashed.

ProblemType: Crash
Architecture: i386
Date: Fri Jun 29 11:03:54 2007
DistroRelease: Ubuntu 7.10
ExecutablePath: /usr/share/apport/apport-gtk
InterpreterPath: /usr/bin/python2.5
NonfreeKernelModules: vmnet vmmon via82cxxx
Package: apport-gtk 0.86
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/share/apport/apport-gtk
ProcCwd: /home/brian
ProcEnviron:
 SHELL=/bin/bash
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
 LANG=en_CA.UTF-8
PythonArgs: ['/usr/share/apport/apport-gtk']
SourcePackage: apport
Title: apport-gtk crashed with AssertionError in __setitem__()
Uname: Linux pc 2.6.22-6-generic #1 SMP Fri Jun 1 19:24:12 GMT 2007 i686 GNU/Linux

Tags: apport-crash
Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Thank you for your bug report. When this apport crash happened, there should have been another crash which Apport wanted to report. Since that crash happened more than a week ago, it most likely has been automatically deleted now. However, I need that original report to fix this apport crash.

Can you reproduce the original crash and this Apport crash? If you do, can you please attach the crash report of the original crash here? It is in /var/crash/, the application name is part of the file name. Thank you!

Changed in apport:
status: New → Incomplete
Revision history for this message
Brian J. Murrell (brian-interlinx) wrote : Re: [Bug 123062] Re: apport-gtk crashed with AssertionError in __setitem__()

On Fri, 2007-07-06 at 11:53 +0000, Martin Pitt wrote:
> Thank you for your bug report. When this apport crash happened, there
> should have been another crash which Apport wanted to report. Since that
> crash happened more than a week ago, it most likely has been
> automatically deleted now. However, I need that original report to fix
> this apport crash.

Would it be this: /var/crash/_usr_bin_seahorse.1001.crash that is
reported as being written in the ApportLog.txt attachment:
http://launchpadlibrarian.net/8255906/ApportLog.txt ? I still have that
crash in /var/crash.

I'm reluctant to upload it though as it most likely has secrets
(passwords, passphrases, etc.) in the core file that I'd rather not
share with anyone with a web browser.

b.

--
My other computer is your Microsoft Windows server.

Brian J. Murrell

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :

I just looked at that seahorse crash. I will upload it as it doesn't have anything sensitive in it (like a core dump) because of this:

UnreportableReason:
 You have some obsolete package versions installed. Please upgrade the following
 packages and check if the problem still occurs:

 libasound2

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Thank you! The seahorse crash had an empty core dump (see bug 122688), so it indeed cannot contain anything sensitive. The dump does not cause apport to crash, though, so it does not help me to reproduce the circumstances.

It looks like packaging.get_source('seahorse') returned None on your system. What does this print out for you:

  python -c "import apt; print apt.Cache()['seahorse'].sourcePackageName"

It should answer with a warning about "apt API not stable yet" and print "seahorse" as the last line.

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :

On Tue, 2007-07-24 at 12:09 +0000, Martin Pitt wrote:
> Thank you! The seahorse crash had an empty core dump (see bug 122688),
> so it indeed cannot contain anything sensitive. The dump does not cause
> apport to crash, though, so it does not help me to reproduce the
> circumstances.
>
> It looks like packaging.get_source('seahorse') returned None on your
> system. What does this print out for you:
>
> python -c "import apt; print
> apt.Cache()['seahorse'].sourcePackageName"
>
> It should answer with a warning about "apt API not stable yet" and print
> "seahorse" as the last line.

Nope:

$ python -c "import apt; print
> apt.Cache()['seahorse'].sourcePackageName"
/usr/lib/python2.5/site-packages/apt/__init__.py:18: FutureWarning: apt API not stable yet
  warnings.warn("apt API not stable yet", FutureWarning)

$

b.

--
My other computer is your Microsoft Windows server.

Brian J. Murrell

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

Ah, now that is interesting. I'll ask our python-apt guru about this.

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

Michael, any idea why python-apt cannot figure out the source package here?

Brial, just in case it has something to do with your apt sources: can you please attach your /etc/apt/sources.list here?

Thank you!

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :

On Thu, 2007-07-26 at 14:00 +0000, Martin Pitt wrote:
> Michael, any idea why python-apt cannot figure out the source package
> here?
>
> Brial, just in case it has something to do with your apt sources: can
> you please attach your /etc/apt/sources.list here?

Surely python-apt doesn't grub through the sources.list file directly.
Is there not an apt API for getting that info?

In any case:

$ sed -e 's/#.*//' -e '/^$/d' /etc/apt/sources.list
$ ls -l /etc/apt/sources.list.d/
total 9
-rw-r--r-- 1 root root 63 2007-06-03 13:39 commerical.list
-rw-r--r-- 1 root root 86 2007-03-16 13:44 edgy-src
-rw-r--r-- 1 root root 50 2007-06-03 13:38 elisa.list
-rw-r--r-- 1 root root 50 2007-06-03 13:38 elisa.list.save
-rw-r--r-- 1 root root 616 2007-04-10 18:51 feisty
-rw-r--r-- 1 root root 610 2007-06-03 13:38 gutsy.list
-rw-r--r-- 1 root root 610 2007-06-03 13:38 gutsy.list.save
-rw-r--r-- 1 root root 239 2007-06-17 10:51 medibuntu.list
-rw-r--r-- 1 root root 240 2007-06-03 13:38 medibuntu.list.save

As you can see, I prefer to use the sources.list.d structure.

> Thank you!

NP.

b.

--
My other computer is your Microsoft Windows server.

Brian J. Murrell

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for this additional information. Can you please run the attached script and attach the output to this bugreport

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

Can you please make sure that you did not actually put a space between the 'print' and the apt.Cache() in the command?

python -c "import apt; print apt.Cache()['seahorse'].sourcePackageName"

There is one in your reply in comment 7.

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :

Output from test.py:

$ python test.py
/usr/lib/python2.5/site-packages/apt/__init__.py:18: FutureWarning: apt API not stable yet
  warnings.warn("apt API not stable yet", FutureWarning)
current: <pkgCache::Version object: Pkg:'seahorse' Ver:'2.19.5-0ubuntu2' Section:'universe/gnome' Arch:'i386' Size:3831712 ISize:10444800 Hash:6104 ID:19408 Priority:4>
candidate: <pkgCache::Version object: Pkg:'seahorse' Ver:'2.19.5-0ubuntu2' Section:'universe/gnome' Arch:'i386' Size:3831712 ISize:10444800 Hash:6104 ID:19408 Priority:4>
Lookup: 1
src:
name: seahorse

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :

$ python -c "import apt; print apt.Cache()['seahorse'].sourcePackageName"
/usr/lib/python2.5/site-packages/apt/__init__.py:18: FutureWarning: apt API not stable yet
  warnings.warn("apt API not stable yet", FutureWarning)
seahorse

magically fixed?

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for apport (Ubuntu) because there has been no activity for 60 days.]

Revision history for this message
Martin Pool (mbp) wrote :

(Stupid janitor)

This just happened for me, after reporting about 5 crashes immediately after booting my machine.

Changed in apport:
status: Invalid → New
Revision history for this message
Martin Pool (mbp) wrote :

My stack trace is

Traceback:
 Traceback (most recent call last):
   File "/usr/share/apport/apport-gtk", line 252, in <module>
     app.run_argv()
   File "/var/lib/python-support/python2.5/apport/ui.py", line 260, in run_argv
     self.run_crashes()
   File "/var/lib/python-support/python2.5/apport/ui.py", line 101, in run_crashes
     self.run_crash(f)
   File "/var/lib/python-support/python2.5/apport/ui.py", line 179, in run_crash
     self.collect_info()
   File "/var/lib/python-support/python2.5/apport/ui.py", line 348, in collect_info
     icthread.exc_raise()
   File "/var/lib/python-support/python2.5/apport/REThread.py", line 37, in run
     self._retval = self.__target(*self.__args, **self.__kwargs)
   File "/var/lib/python-support/python2.5/apport/ui.py", line 37, in thread_collect_info
     report.add_package_info(package)
   File "/var/lib/python-support/python2.5/apport/report.py", line 213, in add_package_info
     self['SourcePackage'] = packaging.get_source(package)
   File "/var/lib/python-support/python2.5/problem_report.py", line 438, in __setitem__
     and (hasattr(v[0], 'isalnum') or hasattr(v[0], 'read'))))
 AssertionError

Revision history for this message
Martin Pool (mbp) wrote :

Running test.py with evolution, which seems to have been the problem here, I get:

root@hope# python /tmp/test.py
/usr/lib/python2.5/site-packages/apt/__init__.py:18: FutureWarning: apt API not stable yet
  warnings.warn("apt API not stable yet", FutureWarning)
current: <pkgCache::Version object: Pkg:'evolution' Ver:'2.12.0-0ubuntu1' Section:'gnome' Arch:'i386' Size:2610980 ISize:8110080 Hash:21414 ID:437 Priority:4>
candidate: <pkgCache::Version object: Pkg:'evolution' Ver:'2.12.0-0ubuntu1' Section:'gnome' Arch:'i386' Size:2610980 ISize:8110080 Hash:21414 ID:437 Priority:4>
Lookup: 1
src:
name: evolution

Revision history for this message
Martin Pool (mbp) wrote :

I have the evolution crash file that seems to be implicated here, but running

root@hope# apport-cli -c _usr_bin_evolution.1000.crash

does not reproduce the crash.

Since this does contain a core file I'm a bit reluctant to post it but i can send it privately if you want, or cut out the core section.

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

Martin, did you happen to try my test at that time?

  python -c "import apt; print apt.Cache()['evolution'].sourcePackageName"

did it print out a package name?

If this occasionally fails, I can just fix apport to produce an error message about temporarily broken packaging system, but I'd much rather have this fixed in python-apt properly.

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

This has been untouched in 3 months, and for 5 months before the last comment. Is it still an open issue, or has it died/resolved?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-apt - 0.7.7.1ubuntu4

---------------
python-apt (0.7.7.1ubuntu4) intrepid; urgency=low

  * apt/package.py:
    - do not return None in sourcePackageName (LP: #123062)
  * python/progress.cc:
    - when pulse() does not return a boolean assume "true"
      (thanks to Martin Pitt for telling me about the problem)
  * aptsources/__init__.py, aptsources/distinfo.py:
    - run apt_pkg.init() when aptsources gets imported and not
      the distinfo function
    - fix detection of cdrom sources and add test for it

 -- Michael Vogt <email address hidden> Thu, 18 Sep 2008 14:42:46 +0200

Changed in python-apt:
status: New → Fix Released
Revision history for this message
wolfger (wolfger) wrote :

9 months with no reply. We are closing this bug report for apport because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in apport:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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