[master] software-center crashed with AttributeError in _parse_and_or_not_tag()

Bug #620011 reported by Ken VanDine
90
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Ubuntu Software Center
Invalid
Undecided
Unassigned
Unity
Fix Released
High
Neil J. Patel
unity-lens-applications
Fix Released
High
Mikkel Kamstrup Erlandsen
software-center (Ubuntu)
Fix Released
High
Kiwinote
unity (Ubuntu)
Fix Released
Undecided
Unassigned
unity-place-applications (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: software-center

Attempting to run software-center for the first time after a fresh install of Maverick

ProblemType: Crash
DistroRelease: Ubuntu 10.10
Package: software-center 2.1.10
ProcVersionSignature: Ubuntu 2.6.35-15.21-generic 2.6.35.1
Uname: Linux 2.6.35-15-generic x86_64
Architecture: amd64
Date: Wed Aug 18 13:53:23 2010
ExecutablePath: /usr/share/software-center/software-center
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha amd64 (20100818)
InterpreterPath: /usr/bin/python2.6
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/software-center
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
PythonArgs: ['/usr/bin/software-center']
SourcePackage: software-center
Title: software-center crashed with AttributeError in _parse_and_or_not_tag()
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Related branches

Revision history for this message
Ken VanDine (ken-vandine) wrote :
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Upon further investigation, I found that creating /var/cache/software-center/xapian and making it world writeable does the trick. However, I don't think it should need to do that. I think aptdaemon should be handling that, so perhaps the root cause is aptdaemon failure.

Revision history for this message
Ken VanDine (ken-vandine) wrote :

This not only cause software-center to crash, but it makes unity-place-applications crash as well sending unity into a loop of crashing and reloading itself.

visibility: private → public
Neil J. Patel (njpatel)
Changed in unity:
assignee: nobody → Neil J. Patel (njpatel)
importance: Undecided → Critical
milestone: none → 2010-08-19
Kiwinote (kiwinote)
Changed in software-center:
status: New → Invalid
Changed in software-center (Ubuntu):
status: New → Triaged
Revision history for this message
Ken VanDine (ken-vandine) wrote :
Download full text (6.0 KiB)

Seems the postinst didn't run for software-center during install. Purging software-center and installing the package again does correct the problem, but we need to get to the root cause of the failure in the installer.

Here is a chunk of the log from the installer:

Aug 18 14:58:19 ubuntu ubiquity: Processing triggers for software-center ...
Aug 18 14:58:19 ubuntu ubiquity: No protocol specified
Aug 18 14:58:19 ubuntu ubiquity: /usr/lib/pymodules/python2.6/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
Aug 18 14:58:19 ubuntu ubiquity: warnings.warn(str(e), _gtk.Warning)
Aug 18 14:58:19 ubuntu ubiquity: Traceback (most recent call last):
Aug 18 14:58:19 ubuntu ubiquity: File "/usr/sbin/update-software-center", line 33, in <module>
Aug 18 14:58:19 ubuntu ubiquity:
Aug 18 14:58:19 ubuntu ubiquity: from softwarecenter.enums import *
Aug 18 14:58:19 ubuntu ubiquity: File "/usr/share/software-center/softwarecenter/__init__.py", line 21, in <module>
Aug 18 14:58:19 ubuntu ubiquity:
Aug 18 14:58:19 ubuntu ubiquity: from db.application import Application
Aug 18 14:58:19 ubuntu ubiquity: File "/usr/share/software-center/softwarecenter/db/application.py", line 31, in <module>
Aug 18 14:58:19 ubuntu ubiquity:
Aug 18 14:58:19 ubuntu ubiquity: from softwarecenter.backend import get_install_backend
Aug 18 14:58:19 ubuntu ubiquity: File "/usr/share/software-center/softwarecenter/backend/__init__.py", line 22, in <module>
Aug 18 14:58:19 ubuntu ubiquity: backend = AptdaemonBackend()
Aug 18 14:58:19 ubuntu ubiquity: File "/usr/share/software-center/softwarecenter/backend/aptd.py", line 97, in __init__
Aug 18 14:58:19 ubuntu ubiquity:
Aug 18 14:58:19 ubuntu ubiquity: TransactionsWatcher.__init__(self)
Aug 18 14:58:19 ubuntu ubiquity: File "/usr/share/software-center/softwarecenter/backend/transactionswatcher.py", line 33, in __init__
Aug 18 14:58:19 ubuntu ubiquity:
Aug 18 14:58:19 ubuntu ubiquity: bus = dbus.SystemBus()
Aug 18 14:58:19 ubuntu ubiquity: File "/usr/lib/pymodules/python2.6/dbus/_dbus.py", line 202, in __new__
Aug 18 14:58:19 ubuntu ubiquity:
Aug 18 14:58:19 ubuntu ubiquity: private=private)
Aug 18 14:58:19 ubuntu ubiquity: File "/usr/lib/pymodules/python2.6/dbus/_dbus.py", line 108, in __new__
Aug 18 14:58:19 ubuntu ubiquity:
Aug 18 14:58:19 ubuntu ubiquity: bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
Aug 18 14:58:19 ubuntu ubiquity: File "/usr/lib/pymodules/python2.6/dbus/bus.py", line 125, in __new__
Aug 18 14:58:19 ubuntu ubiquity:
Aug 18 14:58:19 ubuntu ubiquity: bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
Aug 18 14:58:19 ubuntu ubiquity: dbus.exceptions
Aug 18 14:58:19 ubuntu ubiquity: .
Aug 18 14:58:19 ubuntu ubiquity: DBusException
Aug 18 14:58:19 ubuntu ubiquity: :
Aug 18 14:58:19 ubuntu ubiquity: org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
Aug 18 14:58:19 ubuntu ubiquity:
Aug 18 14:58:19 ubuntu ubiquity: Error in sys.excepthook:
Aug 18 14:58:19 ubuntu ubiquity: Traceback (most recent call last):
Aug 18 14:58:19 ubuntu ubiquity: File "/usr/lib/python2.6/dist-packages/apport_p...

Read more...

Revision history for this message
Kiwinote (kiwinote) wrote :

Ok, have found what's wrong here. Will fix and test tomorrow morning (central european time).

Changed in software-center (Ubuntu):
assignee: nobody → Kiwinote (kiwinote)
status: Triaged → In Progress
Revision history for this message
Kiwinote (kiwinote) wrote :

Hm, scrub that last comment. I've found multiple things that *could* be causing this, and some other things that *do* cause probably closely related issues (which may consequently cause issues in unity), but I can't find anything that *does* reliably produce this precise traceback in the desktop edition. I also can't use unity (because of graphics corruption on this hardware and because it's uninstallable atm on other hardware) to see if this precise traceback may be a unity related issue. I'll continue to fiddle about a bit, but it's best not to give the impression that I am making any real progress on this bug :/ Best wait till mvo is back next week ;)

Changed in software-center (Ubuntu):
assignee: Kiwinote (kiwinote) → nobody
status: In Progress → New
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

For unity-place-applications I rely on the existence on that index - so guess it's also a bug that I don't check for it.

Changed in unity-place-applications:
assignee: nobody → Mikkel Kamstrup Erlandsen (kamstrup)
importance: Undecided → High
status: New → Triaged
Neil J. Patel (njpatel)
Changed in unity:
milestone: 2010-08-19 → 2010-08-26
milestone: 2010-08-26 → 2010-09-02
Revision history for this message
Neil J. Patel (njpatel) wrote :

Unity shouldn't crash because of this. We need to remove sync dbus calls to the place-daemon.

Changed in unity:
status: New → Triaged
Revision history for this message
Kiwinote (kiwinote) wrote :

Hi again!

It turned out that yesterday I was looking in the wrong direction to solve this. Whoops.

Anyway, what is more important is that now it is quite obvious what is going on.

How to reproduce the precise error message (in bug description):
- delete /var/cache/software-center/xapian
- now attempt to start software-center

What causes this folder to not be present on a fresh install?
- the update-software-center script which is meant to create and populate this folder crashes during a fresh install (see traceback in one of the comments)

How to reproduce:
- I set up a chroot environment following the guide at https://help.ubuntu.com/community/BasicChroot
- install software-center from the archives and note the crash

I have fixed this crash in my branch at lp:~kiwinote/software-center/init-without-dbus

How to test the fix:
- branch my branch and build a deb (the history test may fail, but that isn't new)
- create a chroot environment
- install the deb you built, for instance via http://ubuntuforums.org/showpost.php?p=410016&postcount=12
- notice that /var/cache/software-center/xapian is built properly, hence we should not get the original s-c crash anymore.

As for the upgrade path: anyone who has already installed software-center and upgrades to any newer version (ie not necessarily the version in my branch) of software-center in an environment running dbus (or reinstalls software-center) will no longer face this issue.

Profit! ;)

Changed in software-center (Ubuntu):
assignee: nobody → Kiwinote (kiwinote)
importance: Undecided → High
status: New → Fix Committed
Kiwinote (kiwinote)
summary: - software-center crashed with AttributeError in _parse_and_or_not_tag()
+ [master] software-center crashed with AttributeError in
+ _parse_and_or_not_tag()
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-center - 2.1.11

---------------
software-center (2.1.11) maverick; urgency=low

  [ Kiwinote ]
  * softwarecenter/__init__.py:
    - don't import Application
  * softwarecenter/db/application.py:
    - only import get_install_backend when we actually need it (LP: #620011)
  * softwarecenter/db/database.py,
    test/test_appview.py:
    - import Application from the correct location

  [ Michael Vogt ]
  * merged lp:~mpt/software-center/fit-and-finish, many thanks
  * merged lp:~mmcg069/software-center/mkit-theme-tweaks, many thanks
  * merged lp:~and471/software-center/a-few-of-my-favorite-things, many
    thanks
  * merged lp:~mmcg069/software-center/mkit-theme-tweaks, many thanks
  * merged lp:~mmcg069/software-center/visual-overhaul
  * softwarecenter/backend/login_sso.py:
    - updated for the latest ubuntu-sso-client API
 -- Michael Vogt <email address hidden> Tue, 24 Aug 2010 14:59:36 +0200

Changed in software-center (Ubuntu):
status: Fix Committed → Fix Released
David Barth (dbarth)
Changed in unity:
assignee: Neil J. Patel (njpatel) → Mikkel Kamstrup Erlandsen (kamstrup)
milestone: 2010-09-02 → 2010-09-09
Revision history for this message
David Barth (dbarth) wrote :

Not critical in that it was triggered by another bug in SC, but still worth fixing for the release, just in case.

Changed in unity:
importance: Critical → High
David Barth (dbarth)
Changed in unity:
milestone: 2010-09-09 → 2010-09-16
Revision history for this message
Neil J. Patel (njpatel) wrote :

Unity no-longer uses sync dbus calls to places.

Changed in unity:
assignee: Mikkel Kamstrup Erlandsen (kamstrup) → Neil J. Patel (njpatel)
status: Triaged → Fix Released
Revision history for this message
Apport retracing service (apport) wrote : This bug is a duplicate

Thank you for taking the time to report this crash and helping to make Ubuntu better. This particular crash has already been reported and is a duplicate of bug #618855, so is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Please continue to report any other bugs you may find.

tags: removed: need-duplicate-check
Changed in unity-place-applications:
status: Triaged → Fix Released
Changed in unity-place-applications (Ubuntu):
status: New → Fix Released
Changed in unity (Ubuntu):
status: New → Fix Released
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.