update-software-center-agent crashed with DatabaseLockError in __init__()

Bug #625189 reported by John Stevenson
464
This bug affects 71 people
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
Fix Released
High
Olivier Tilloy
Natty
Fix Released
High
Olivier Tilloy

Bug Description

Binary package hint: software-center

I had opened software center and installed homebank package. Then was browsing a few applications in software center. I moved to the new unity menu and started searching though applications, within a minute I noticed the flashing icon for a crash report

System: Maverick Meerkat - last updated on evening of 26th August

ProblemType: Crash
DistroRelease: Ubuntu 10.10
Package: software-center 2.1.14.1
ProcVersionSignature: Ubuntu 2.6.35-19.25-generic-pae 2.6.35.3
Uname: Linux 2.6.35-19-generic-pae i686
Architecture: i386
Date: Fri Aug 27 09:58:54 2010
ExecutablePath: /usr/share/software-center/update-software-center-agent
InstallationMedia: Ubuntu-Netbook 10.10 "Maverick Meerkat" - Alpha i386 (20100823)
InterpreterPath: /usr/bin/python2.6
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/share/software-center/update-software-center-agent
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_GB.utf8
PythonArgs: ['/usr/share/software-center/update-software-center-agent']
SourcePackage: software-center
Title: update-software-center-agent crashed with DatabaseLockError in __init__()
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Related branches

Revision history for this message
John Stevenson (jr0cket) wrote :
tags: removed: need-duplicate-check
tags: added: bugpattern-needed
visibility: private → public
Revision history for this message
Gary Lasker (gary-lasker) wrote :

Confirmed based on large number of duplicates.

Changed in software-center (Ubuntu):
status: New → Confirmed
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

marking as triaged/high because this is a core component affecting many users.

Changed in software-center (Ubuntu):
importance: Undecided → High
status: Confirmed → Triaged
tags: added: natty
Revision history for this message
Olivier Tilloy (osomon) wrote :

I can easily reproduce, on Maverick and Natty, by running concurrently two instances of /usr/share/software-center/update-software-center-agent.

Fixing the symptom would be trivial too: if the temporary DB file already exists, or if we catch a DatabaseLockError, exit cleanly, as this means an update is already running.

However I’d like to understand how we end up in this situation of two updates running concurrently. I’ll dig into it.

Changed in software-center (Ubuntu Natty):
assignee: nobody → Olivier Tilloy (osomon)
status: Triaged → In Progress
Revision history for this message
JIm (jim-richardson06) wrote :

I did not open two instances perhaps a double click could open two as natty appears to be very good at adding 2 double cilicks (so software runs twice) when you ment one so perhaps natty should just throw away the second instance or be a bit more careful of counting mouse clicks !!

Revision history for this message
Robert Higginson (trebornosniggih) wrote : Re: [Bug 625189] Re: update-software-center-agent crashed with DatabaseLockError in __init__()
Download full text (3.2 KiB)

Thanks for this series of discussions - having learnt programming in
my youth when FORTRAN was the thing to learn, the cooments are
interesting.

ON single or double clicks, it is a more general point that there is
not enough consistency between things that sometimes a single click is
required, sometimes a double. And if there is no immediate visible
response you think that the double click has not worked and so you
click again. This is a problem on my windows xp computer where the
slightest movement or wrong timing on a double click and it interprets
it as only single click and so does not open something from desktop.

Another problem on my Ubuntu computer. I can't use BBC iPlayer
(through Firefox) because it does not recognise the flash player which
I have installed more than once. The iplayer screen gives me an error
message saying that I need to install flash, and a link to macromedia.
 But following this and installing flash palyer still does not cure
the problem. So no iplayer. (iPlayer is a poor app. anyway, very
unfit for purpose, but unavoidable.)

Thanks

Robert

Ubuntu user

On 21 February 2011 22:36, JIm <email address hidden> wrote:
> I did not open two instances perhaps a double click could open two as
> natty appears to be very good at adding 2 double cilicks (so software
> runs twice) when you ment one so perhaps natty should just throw away
> the second instance or be a bit more careful of counting mouse clicks !!
>
> --
> You received this bug notification because you are a direct subscriber
> of a duplicate bug (653309).
> https://bugs.launchpad.net/bugs/625189
>
> Title:
>  update-software-center-agent crashed with DatabaseLockError in
>  __init__()
>
> Status in “software-center” package in Ubuntu:
>  In Progress
> Status in “software-center” source package in Natty:
>  In Progress
>
> Bug description:
>  Binary package hint: software-center
>
>  I had opened software center and installed homebank package.  Then was
>  browsing a few applications in software center.  I moved to the new
>  unity menu and started searching though applications, within a minute
>  I noticed the flashing icon for a crash report
>
>  System: Maverick Meerkat - last updated on evening of 26th August
>
>  ProblemType: Crash
>  DistroRelease: Ubuntu 10.10
>  Package: software-center 2.1.14.1
>  ProcVersionSignature: Ubuntu 2.6.35-19.25-generic-pae 2.6.35.3
>  Uname: Linux 2.6.35-19-generic-pae i686
>  Architecture: i386
>  Date: Fri Aug 27 09:58:54 2010
>  ExecutablePath: /usr/share/software-center/update-software-center-agent
>  InstallationMedia: Ubuntu-Netbook 10.10 "Maverick Meerkat" - Alpha i386 (20100823)
>  InterpreterPath: /usr/bin/python2.6
>  PackageArchitecture: all
>  ProcCmdline: /usr/bin/python /usr/share/software-center/update-software-center-agent
>  ProcEnviron:
>   SHELL=/bin/bash
>   LANG=en_GB.utf8
>  PythonArgs: ['/usr/share/software-center/update-software-center-agent']
>  SourcePackage: software-center
>  Title: update-software-center-agent crashed with DatabaseLockError in __init__()
>  UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
>
> To unsubscribe from this bug, go to:
> https://bugs....

Read more...

Revision history for this message
Olivier Tilloy (osomon) wrote :

@JIm: I didn’t imply that you had run two instances of software center. What I meant is that the executable responsible for updating software center’s database was running twice, which could be happening for various reasons.

On the issue of clicks and double clicks sensitivity, that’s a more general issue that will be better addressed separately, can you please file a separate bug report at https://bugs.launchpad.net/ubuntu/natty/+filebug ?

@Robert: thanks for your input. Concerning other issues such as the one you are experiencing with flash and the BBC iPlayer, they will also be better addressed separately. To report a bug, in Firefox’s help menu select "Report a Problem…" and follow the instructions on screen. Thanks!

tags: added: mago
Olivier Tilloy (osomon)
Changed in software-center (Ubuntu Natty):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  [ Kiwinote ]
  * data/ui/SoftwareCenter.ui,
    softwarecenter/app.py:
    - place the status label inside an eventbox to allow focus and setup a11y
      (LP: #575691)
  * softwarecenter/view/appdetailsview_gtk.py:
    - make description accessible
    - correctly update screenshot a11y text and make it less verbose
  * softwarecenter/view/catview_gtk.py:
    - rewrite recommended widget to make it suitable for i18n and a11y
  * softwarecenter/view/widgets/carousel.py:
    - don't transition when a Page has focus
  * softwarecenter/view/widgets/mkit.py:
    - some fixes to correctly update color/cursor of Button upon mouse actions

  [ Aaron Peachey ]
  * softwarecenter/db/reviews.py:
    - prevent 404 errors from outputting a traceback (especially
      caused when origin is a PPA) LP: #709408

  [ Michael Vogt ]
  * softwarecenter/backend/weblive.py:
    - add prototype backend for interacting with weblive, many
      thanks to Stephane Graber
  * merged lp:~osomon/software-center/fixDatabaseLockError, many
    thanks (LP: #625189)

  [ Gary Lasker ]
  * implement "Deauthorize my Computer"
    (lp:~gary-lasker/software-center/deauthorize-my-computer)
 -- Michael Vogt <email address hidden> Thu, 24 Feb 2011 08:47:40 +0100

Changed in software-center (Ubuntu Natty):
status: Fix Committed → Fix Released
Revision history for this message
Robert Higginson (trebornosniggih) wrote :

A thought about getting 2 updates running concurrently.

When I have not run the ubuntu computer recently (it is set up for my
wife at the moment), I tend to go to Update Manager and run it
manually. If it would also run automatically, and I do not notice
that it is already running, that could cause it to run twice.

Robert

(I am stuck with using this windows xp computer because of some
software I need to use. Ubuntu is so very much more efficient and
faster on a computer with similar hardware. If I could get everything
I want to work on ubuntu, I would abandon windows completely.)

On 21 February 2011 21:47, Olivier Tilloy <email address hidden> wrote:
> I can easily reproduce, on Maverick and Natty, by running concurrently
> two instances of /usr/share/software-center/update-software-center-
> agent.
>
> Fixing the symptom would be trivial too: if the temporary DB file
> already exists, or if we catch a DatabaseLockError, exit cleanly, as
> this means an update is already running.
>
> However I’d like to understand how we end up in this situation of two
> updates running concurrently. I’ll dig into it.
>

--
Robert Higginson

Revision history for this message
Olivier Tilloy (osomon) wrote :

@Robert: that would happen for software updates, as fetched by update-manager. The issue here was with S-C’s update-software-center-agent in charge of updating its internal database.
As Michael suggested in the merge request, « It might be that someone started s-c and exited quickly. Then started it again so (before the first update-software-center-agent would finish). »

To post a comment you must log in.