USC doesn't launch in guest session (OSError: [Errno 13] Permission denied)

Bug #741069 reported by Matthew Paul Thomas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
Fix Released
High
Kiwinote

Bug Description

Binary package hint: software-center

Ubuntu Software Center 3.1.24, Ubuntu Natty

1. Switch to a guest session.
2. At a terminal, enter "software-center" (without quotes).

What should happen: USC launches.

What actually happens:
------------
2011-03-23 15:35:53,772 - softwarecenter.fixme - WARNING - logs to the root logger: '('/usr/share/software-center/softwarecenter/db/database.py', 154, 'open')'
2011-03-23 15:35:53,772 - root - WARNING - failed to add sca db Couldn't stat '/tmp/guest-home.d0EQHC/.cache/software-center/software-center-agent.db' (No such file or directory)
Traceback (most recent call last):
  File "/usr/bin/software-center", line 110, in <module>
    app = SoftwareCenterApp(datadir, xapian_base_path, options, args)
  File "/usr/share/software-center/softwarecenter/app.py", line 172, in __init__
    self.review_loader = get_review_loader(self.cache, self.db)
  File "/usr/share/software-center/softwarecenter/db/reviews.py", line 757, in get_review_loader
    review_loader = ReviewLoaderThreadedRNRClient(cache, db)
  File "/usr/share/software-center/softwarecenter/db/reviews.py", line 346, in __init__
    self._new_review_stats = Queue()
  File "/usr/lib/python2.7/multiprocessing/__init__.py", line 215, in Queue
    return Queue(maxsize)
  File "/usr/lib/python2.7/multiprocessing/queues.py", line 63, in __init__
    self._rlock = Lock()
  File "/usr/lib/python2.7/multiprocessing/synchronize.py", line 147, in __init__
    SemLock.__init__(self, SEMAPHORE, 1, 1)
  File "/usr/lib/python2.7/multiprocessing/synchronize.py", line 75, in __init__
    sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue)
OSError: [Errno 13] Permission denied
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 109, in apport_excepthook
    os.O_WRONLY|os.O_CREAT|os.O_EXCL, 0o600), 'w')
OSError: [Errno 13] Permission denied: '/var/crash/_usr_share_software-center_software-center.113.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/software-center", line 110, in <module>
    app = SoftwareCenterApp(datadir, xapian_base_path, options, args)
  File "/usr/share/software-center/softwarecenter/app.py", line 172, in __init__
    self.review_loader = get_review_loader(self.cache, self.db)
  File "/usr/share/software-center/softwarecenter/db/reviews.py", line 757, in get_review_loader
    review_loader = ReviewLoaderThreadedRNRClient(cache, db)
  File "/usr/share/software-center/softwarecenter/db/reviews.py", line 346, in __init__
    self._new_review_stats = Queue()
  File "/usr/lib/python2.7/multiprocessing/__init__.py", line 215, in Queue
    return Queue(maxsize)
  File "/usr/lib/python2.7/multiprocessing/queues.py", line 63, in __init__
    self._rlock = Lock()
  File "/usr/lib/python2.7/multiprocessing/synchronize.py", line 147, in __init__
    SemLock.__init__(self, SEMAPHORE, 1, 1)
  File "/usr/lib/python2.7/multiprocessing/synchronize.py", line 75, in __init__
    sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue)
OSError: [Errno 13] Permission denied
------------

Revision history for this message
Kiwinote (kiwinote) wrote :

Hi mpt! Thanks for noticing this. It has been fixed in the branch linked.

Technical comments:
It would seem that we can't use the python multiprocessing module due to the limitations of the guest session. I have implemented a fallback from ReviewLoaderThreadedRNRClient to ReviewLoaderJsonAsync in this case. As the Json loader hasn't been used in a while I've also made some tweaks to make it work again in the most common cases.

Changed in software-center (Ubuntu):
assignee: nobody → Kiwinote (kiwinote)
importance: Undecided → High
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.7 KiB)

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

---------------
software-center (3.1.25) natty; urgency=low

  [ Kiwinote ]
  * data/ui/SoftwareCenter.ui:
    - mark the back/forward actions as translatable (LP: #742129)
  * softwarecenter/db/database.py,
    softwarecenter/models/appstore.py,
    softwarecenter/view/availablepane.py,
    others:
    - make custom lists work (LP: #712903)
  * softwarecenter/app.py,
    softwarecenter/distro/Ubuntu.py,
    softwarecenter/view/widgets/pathbar_gtk_atk.py:
    - when the supported filter is set to supported_only, navigate up if:
      - we are in a details view of an app which is not supported (LP: #480827)
      - we are in a list view which becomes empty
  * softwarecenter/app.py,
    softwarecenter/view/catview_gtk.py:
    - correctly count the nr of apps displayed in the recommended category and
      update it when needed (LP: #735634)
    - only display subcategories if they are non-empty (LP: #419270)
  * softwarecenter/backend/weblive.py:
    - don't crash if we try to delete a non-existent file (LP: #743511)
  * softwarecenter/db/reviews.py,
    softwarecenter/distro/Ubuntu.py:
    - fallback to ReviewLoaderJsonAsync when we can't use multiprocessing
      (LP: #741069)
    - fixes to make ReviewLoaderJsonAsync 'work' (ie most common cases)
  * softwarecenter/db/update.py:
    - don't import softwarecenter.log
  * softwarecenter/view/appdetailsview_gtk.py:
    - don't draw random boxes when we have an error layout (LP: #739269)
    - retire share button as we now have full microblogging support in the
      review dialog (LP: #592619, LP: #743765)
  * softwarecenter/view/appview.py:
    - correctly refresh listview when supported filters are changed
  * softwarecenter/view/catview.py:
    - if a category has subcategories, then category.query should include all
      items included in the subcategories, not a subset of these
  * softwarecenter/view/widgets/pathbar_gtk_atk.py:
    - avoid having a half-height pathbar (LP: #743614)
  * refresh .pot file

  [ Gary Lasker ]
  * softwarecenter/view/widgets/reviews.py:
    - fix crash if app_version is not defined when
      calling upstream_version_compare (LP: #746120)
  * softwarecenter/view/purchaseview.py:
    - disconnect webkit signal handlers when the webkit view
      is not showing (LP: #696861)
    - support 'user_cancelled' from the software-center-agent
      (LP: #641321)
  * softwarecenter/view/softwarepane.py,
    softwarecenter/view/widgets/actionbar.py:
    - animate the action bar show/hide
  * softwarecenter/view/appview.py:
    - in the AppViewFilter, also consider apps in the for-purchase
      channel as available; this allows them to show up in
      e.g. What's New (LP: #746679)

  [ Michael Vogt ]
  * softwarecenter/db/update.py:
    - ensure the iconname that comes from the software-center-agent
      does not contain a ".", the icon cache gets confused otherwise
  * merged lp:~evfool/software-center/sfix672229, many thanks to
    Robert Roth (LP: #672229)
  * merged lp:~alexeftimie/software-center/fix-704719-briefly-wrong-display,
    many thanks to Alex Eftimie (LP: #704719)
  * softwarecenter/view/purc...

Read more...

Changed in software-center (Ubuntu):
status: Fix Committed → 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.