[master] software-center crashed with DatabaseModifiedError in _database_gen_postlist_iter()

Bug #507836 reported by Hardy-Hard on 2010-01-15
This bug affects 255 people
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
High
Michael Vogt
Natty
High
Michael Vogt

Bug Description

Binary package hint: software-center

I was browsing the software store, after Delete Solitaire, the software store crashed.
I'm running Lucid Lynx from USB, 2GB and was trying to get some free space.
Ubuntu 10.4 AMD64

ProblemType: Crash
Architecture: amd64
Date: Fri Jan 15 09:08:52 2010
DistroRelease: Ubuntu 10.04
ExecutablePath: /usr/share/software-center/software-center
InterpreterPath: /usr/bin/python2.6
LiveMediaBuild: Ubuntu 10.04 "Lucid Lynx" - Alpha amd64 (20100113)
Package: software-center 1.1.8
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/software-center
ProcEnviron:
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-10.14-generic
PythonArgs: ['/usr/bin/software-center']
SourcePackage: software-center
Tags: lucid
Title: software-center crashed with DatabaseModifiedError in _database_gen_postlist_iter()
Uname: Linux 2.6.32-10-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Related branches

Hardy-Hard (renegeipel) wrote :
tags: removed: need-duplicate-check
Gary Lasker (gary-lasker) wrote :

Confirmed based on number of dupes.

visibility: private → public
Changed in software-center (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
ralemi (alemi-reza) wrote :

This also happened to me when I was installing Adobe Flash plugin, however I later realized that the plugin has indeed been installed and runs correctly, so the crash should have been in a cleanup code or something.

Lucid 64bit Desktop Beta2. Sony VGN-Z555DN

Kamus (kamus) wrote :

Please could you check if this issue is still occuring under software-center 2.0? Thanks!

Changed in software-center (Ubuntu):
status: Confirmed → Incomplete

Kamus schrieb:
> Please could you check if this issue is still occuring under software-
> center 2.0? Thanks!
>
> ** Changed in: software-center (Ubuntu)
> Status: Confirmed => Incomplete
>
>
With the Beta2 Release, it's running how it should be!

Just got a similar error. Also running the LTS from USB. I was installing simple-ccsm and it told me it crashed, but was still able to continue working and installed the program.

Also 64bit HP dv4 2045dx

avcascade (andrew-villeneuves) wrote :

This happened to me, but wasn't doing anything with Software Center at the time. It was minimized. I simply had it open on the taskbar. After maybe fifteen minutes of being open and idle, it crashed, and I was prompted by Apport to report bug to Launchpad as usual.

Like Kage, was running from USB. But 32bit.

I wasn't doing anything, just waiting for updating process completed. Running from USB (4G) on HP nx7300

Why is this bug marked incomplete? There are lots of comments here and backtraces in duplicate bugs.

Gary Lasker (gary-lasker) wrote :

Indeed, this bug still occurs in version 2.0 of Software Center as evidenced by duplicate bug 584391. Therefore, I'll set this back to confirmed. Thanks!

Changed in software-center (Ubuntu):
status: Incomplete → Confirmed
Kiwinote (kiwinote) on 2010-08-22
summary: - software-center crashed with DatabaseModifiedError in
+ [master] software-center crashed with DatabaseModifiedError in
_database_gen_postlist_iter()
tags: added: iso-testing
Kiwinote (kiwinote) wrote :

Increasing importance based on number of duplicates (will be more once we get all the bugs being held back by the retracers).

Changed in software-center (Ubuntu):
importance: Low → High
status: Confirmed → Triaged
Michael Vogt (mvo) wrote :

It looks like the following is triggering this problem (a clasical race condition):

- a update() operation from the backend (reload, enable channel) triggers a apt-xapian-index update with --update
- when the update is finished, a cache-ready signal is emited, that causes the various views to be refreshed
- during this refresh the gtk event loop keeps running to keep the UI alive
- when apt-xapian-index finishes, it reopens the DB
- if the a-x-i update finishes quicker than the refresh triggered by the cache update finishes (its runs with --update so that can happen) then it can be in the middle of a "for m in self.xapiandb.postlist() operation. at this point the returned iterators are no longer valid because the DB got reopenend and xapian detects that (the iterators are for the previous generation of the DB)

Michael Vogt (mvo) wrote :

I commited a possible fix/workaround to turnk, it will not fix the exceptions, but should fix the UI

Thank you! I was figuring out a way out of that error!
And it worked!
Uninstall and reinstall the programs, that was it!

Thank you for your concern to that problem!
S.

________________________________
From:Michael Vogt <email address hidden>
To:<email address hidden>
Sent: Fri, September 24, 2010 2:57:32 PM
Subject: [Bug 507836] Re: [master] software-center crashed with
DatabaseModifiedError in _database_gen_postlist_iter()

It looks like the following is triggering this problem (a clasical race
condition):

- a update() operation from the backend (reload, enable channel) triggers a
apt-xapian-index update with --update
- when the update is finished, a cache-ready signal is emited, that causes the
various views to be refreshed
- during this refresh the gtk event loop keeps running to keep the UI alive
- when apt-xapian-index finishes, it reopens the DB
- if the a-x-i update finishes quicker than the refresh triggered by the cache
update finishes (its runs with --update so that can happen) then it can be in
the middle of a "for m in self.xapiandb.postlist() operation. at this point the
returned iterators are no longer valid because the DB got reopenend and xapian
detects that (the iterators are for the previous generation of the DB)

--
[master] software-center crashed with DatabaseModifiedError in
_database_gen_postlist_iter()
https://bugs.launchpad.net/bugs/507836
You received this bug notification because you are a direct subscriber
of a duplicate bug (619142).

Status in “software-center” package in Ubuntu: Triaged

Bug description:
Binary package hint: software-center

I was browsing the software store, after Delete Solitaire, the software store
crashed.
I'm running Lucid Lynx from USB, 2GB and was trying to get some free space.
Ubuntu 10.4 AMD64

ProblemType: Crash
Architecture: amd64
Date: Fri Jan 15 09:08:52 2010
DistroRelease: Ubuntu 10.04
ExecutablePath: /usr/share/software-center/software-center
InterpreterPath: /usr/bin/python2.6
LiveMediaBuild: Ubuntu 10.04 "Lucid Lynx" - Alpha amd64 (20100113)
Package: software-center 1.1.8
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/software-center
ProcEnviron:
LANG=de_DE.UTF-8
SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-10.14-generic
PythonArgs: ['/usr/bin/software-center']
SourcePackage: software-center
Tags: lucid
Title: software-center crashed with DatabaseModifiedError in
_database_gen_postlist_iter()
Uname: Linux 2.6.32-10-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

To unsubscribe from this bug, go to:
https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/507836/+subscribe

Markus Korn (thekorn) on 2010-10-15
tags: added: bugpattern-written
Changed in software-center (Ubuntu):
status: Triaged → Confirmed
Charlie Kravetz (charlie-tca) wrote :

Please do not change the status of bugs without commenting. Moving the status of this from Triaged to Confirmed says the bug may not actually be ready for the developers to begin working to resolve your issue. https://wiki.ubuntu.com/Bugs/Status expains the status. Thanks for trying to help.

Changed in software-center (Ubuntu):
status: Confirmed → Triaged

Software center also crashed on me right after i had finished installing Mozilla Thunderbird. I'm running the live DVD for Ubuntu 10.10. This was the first and only thing i had done once i had launched the DVD and tried Ubuntu. Hope this helps.

javier oscar (metalheavy) wrote :

!que garron vieja!!!

Jan Kocábek (sehes) on 2011-01-01
description: updated
Rod Davis (ahylianhuman) wrote :

This occurs in Natty Narwhal Alpha 1. I was installing Chromium when Apport told me Software Center has crashed and that the bug is already known (so it pointed me here). The odd thing, though, is that the Software Center window didn't go away...

Max (kolotilkin) wrote :

Just got the same issue. Reproduced on newly installed Ubuntu 11.04 Alpha 2
Steps to reproduce:
1. Open dropbox web-site in Firefox
2. Press "Download Dropbox"
3. From Save dialog choose Open with "Ubuntu Software Center"
4. After download dropbox installer to /tmp it will be opened in Software Center but in a several seconds Soft Cetner will crash

Changed in software-center (Ubuntu Natty):
assignee: nobody → Melinda Bahra (melindabahra)
status: Triaged → Incomplete
status: Incomplete → Fix Committed
Béné (bene-d) wrote :

I still get this bug in Natty Daily.

Gary Lasker (gary-lasker) wrote :

Hi Melinda, I'm not sure if you intended to mark this bug as Fix Committed but there is no fix for this committed for Software Center at this time. Therefore, I'll reset to Confirmed. Please feel free to comment if you have more information. Thanks!

Changed in software-center (Ubuntu Natty):
status: Fix Committed → Confirmed
assignee: Melinda Bahra (melindabahra) → nobody
Martin Pitt (pitti) on 2011-03-11
Changed in software-center (Ubuntu Natty):
assignee: nobody → Michael Vogt (mvo)
bjinwright (bjinwright) wrote :

This happened to me when trying to install VirtualBox.

Whisky (paddy-paddydevine) wrote :

I had this problem when trying to install snippets datafile editor (K advanced text editor)
Newly installed Natty, upgrade from 10.10

Whisky (paddy-paddydevine) wrote :

after the crash, and well after the above statement (#23) I tried to install snippets datafile again. This time everything went smooth. No crashes. Could not duplicate the problem.

Mark Ulmer (markulmer) wrote :

I just upgraded from 10.10 to 11.04 today. I encountered this issue in the software center removing xtrlock from previous install. Reinstalled and removed again and was unable to recreate to crash.

Kate Stewart (kate.stewart) wrote :

Did an upgrade from a clean 10.10 to 11.04 beta 2 candidate today. I went into software center, looked at installed software, and pressed the "info" button on compiz (which was already installed).

Michael Vogt (mvo) wrote :

I tried hard to repdocue this today in natty without success. We changed the code that rebuilds the database in natty so it would explain why there are no natty backtraces since some time. If you encounter this problem after you upgraded I would really like to see the crash file and see if the backtrace to double check.

Kate Stewart (kate.stewart) wrote :
Michael Vogt (mvo) wrote :

Thanks Kate! Here is the traceback:

Traceback:
 Traceback (most recent call last):
   File "/usr/share/software-center/softwarecenter/models/appstore.py", line 486, in on_get_value
     if self.db.is_appname_duplicated(appname):
   File "/usr/share/software-center/softwarecenter/db/database.py", line 396, in is_appname_duplicated
     for (i, m) in enumerate(self.xapiandb.postlist("AA"+appname)):
   File "/usr/lib/python2.7/dist-packages/xapian/__init__.py", line 6700, in _database_gen_postlist_iter
     return PostingIter(self.postlist_begin(tname), self.postlist_end(tname),
 DatabaseModifiedError: The revision being read has been discarded - you should call Xapian::Database::reopen() and retry the operation

Zenon Piatek (zpiatek) wrote :

I was simply searching for an app in the Software Center when the error appeared. I am running Ubuntu 11.04 beta 1.

The bug is still present in beta2.

Changed in software-center (Ubuntu Natty):
status: Confirmed → Fix Committed
milestone: none → ubuntu-11.04
Launchpad Janitor (janitor) wrote :

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

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

  [ Michael Vogt ]
  * softwarecenter/db/reviews.py:
    - do not crash on multiple origins for the same version
      (LP: #756415)
  * softwarecenter/db/application.py:
    - ensure docid is updated on database reopen() (LP: #757054)
  * softwarecenter/models/appstore.py:
    - refresh docids in active searches if the database is reopend
      (LP: #710920)
  * softwarecenter/backend/aptd.py:
    - do not run update-apt-xapian-index in --update mode to avoid
      in-place database modfications (LP: #507836)
  * test/test_load_icons.py:
    - add test for the icon loader
  * merged lp:~glatzor/software-center/force-bad-quality, this
    fixes the missing ability to override the lintian warning
    (LP: #712377)
  * don't show reviews if we can't determine the origin
  * fix crash when enabling new components (LP: #636429)
  * fix missing details when a channel or a component just got added

  [ Gary Lasker ]
  * softwarecenter/app.py:
    - temporarily disable the deauth option until we have support
      for remove repository in aptdaemon (see LP: #723911)
  * softwarecenter/backend/aptd.py :
    - fix empty error dialog for the case where aptdaemon returns
      an error code with no value (LP: #747172)
    - fix intermittent crash when updating the a-x-i (LP: #657494)
  * softwarecenter/models/viewswitcherlist.py:
    - mark string "In Progress..." for translation, many thanks to
      Hendrik Knackstedt and Florian Greinus for finding this
      (LP: #759240)
  * softwarecenter/view/catview_gtk.py:
    - fix broken translation string (LP: #758656)
  * refresh .pot file
  * softwarecenter/db/update.py:
    - fix crash when reinstalling previous purchases (LP: #760353)
 -- Michael Vogt <email address hidden> Thu, 14 Apr 2011 19:59:42 +0200

Changed in software-center (Ubuntu Natty):
status: Fix Committed → Fix Released
Cas (calumlind) wrote :

I just encountered this error while testing Oneiric and Apport redirected me to this bug.

I had Software Centre open but it was minimized and the crash seemed to coincide with updating packages in Synaptic.

Not much else to add I'm afraid.

ShepHeard (shep-bug) wrote :

Just encountered this bug - running 10.04.3 live USB. tried to install skype from the Software Centre, and it crashed. I don't normally use the SC, so can't comment on its frequency. The only caveat is that I'm at work, and my internet quota has expired so I'm being severely throttled - could that play a role?

ShepHeard (shep-bug) wrote :

Just to add - Thinking about it, I had SC open but idle. In the meantime, I did an apt-get update, then once that was complete, tried to install skype (via SC). This is similar to #33...

I was testing Oneiric. Since my Synaptic was giving an error (anothe Lauchpad bug), I used SC to install graphviz when it crashed. The software installed though.

Michael Vogt (mvo) wrote :

Hello Saravanan, what version of software-center were you using when you got the crash? Could you attach your /var/crash/_usr_bin/software-center.1000.crash file please?

Sasa Paporovic (melchiaros) wrote :

I got this on Ubuntu11.10 64bit updated to 2.2.2012.

The version of software center is 5.0.4.

Christo Joseph (christo-j-g) wrote :

Got this bug on 12.04 Beta while trying to install 7-zip accessories.

Tigerboy (tigersands) wrote :

This seems to happen frequently. Also the Synaptic program manager button fails to launch the program after I install the KDE desktop. Interestingly when I go to KDE there are 2 Synaptic buttons in the menu, one works and the other doesn't whereas when I go to Gnome there is only one and it fails but if I type gksu synaptic at the shell prompt it launches just fine. This is a persistent error over the past 3 weeks of installs at least.

The failure of the Ubuntu software centre seems to be based upon how many things you do so if you limit to just one install at a time it works a bit better. I suggest you consider just having the program run as super user maybe... but I haven't probed the problem seriously. I still think the program is very useful-- I flip between command line apt-get/aptitude and synaptic which is the best way to do it anyway. You should install Synaptic as a default so people have the most freedom stop trying to herd people into a certain pathway.

Tigerboy (tigersands) wrote :

Ok regarding the problem that occurs after one installs KDE-Desktop:
Synaptic package manager no longer launches from menu -- that is because synaptic-pkexec is failing to launch-- edit menu and the individual item (Synaptic) and replace synaptic-pkexec with gksu synaptic in the Gnome environments whether Gnome 3 or 2 or even Ubuntu based.

Sasa Paporovic (melchiaros) wrote :

Still on precise: updated to 17.3.2012

tags: added: precise
Gary Lasker (gary-lasker) wrote :

Appears from comments above and from new duplicates that we are getting these errors in Precise, so I've reopened the bug and will assign the duplicates accordingly.

Changed in software-center (Ubuntu):
status: Fix Released → Triaged
Michael Vogt (mvo) wrote :

So for anyone who can still gets this bug, could you please attach the crash file from /var/crash to this report?
We are interessted in the "Traceback" information to get hints what might cause the problem.

Thanks,
 Michael

no longer affects: software-center
Michael Vogt (mvo) wrote :

Some additional data point, the traceback data from the recent duplicates: #902480, #911251, #837736 (5.x and 4.x) show:

Traceback (most recent call last):
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/appdetailsview.py", line 1605, in _on_cache_ready
    self.show_app(self.app)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/appdetailsview.py", line 1506, in show_app
    self.app_details = app.get_details(self.db)
  File "/usr/share/software-center/softwarecenter/db/application.py", line 77, in get_details
    return AppDetails(db, application=self)
  File "/usr/share/software-center/softwarecenter/db/application.py", line 195, in __init__
    self._app.appname, self._app.pkgname)
  File "/usr/share/software-center/softwarecenter/db/database.py", line 439, in get_xapian_document
    for m in self.xapiandb.postlist("AA"+appname):
  File "/usr/lib/python2.7/dist-packages/xapian/__init__.py", line 7222, in _database_gen_postlist_iter
    return PostingIter(self.postlist_begin(tname), self.postlist_end(tname),
DatabaseModifiedError: The revision being read has been discarded - you should call Xapian::Database::reopen() and retry the operation

I wonder if its a race condition in cache-open and the software-center-agent finishing at the same time.

Matthew Paul Thomas (mpt) wrote :

Apport says this is the same story. The last couple of lines are the same, at least:

 Traceback (most recent call last):
   File "/usr/share/software-center/softwarecenter/ui/gtk3/widgets/cellrenderers.py", line 390, in do_render
     is_rtl)
   File "/usr/share/software-center/softwarecenter/ui/gtk3/widgets/cellrenderers.py", line 162, in _render_summary
     layout.set_markup(self.model.get_markup(app), -1)
   File "/usr/share/software-center/softwarecenter/ui/gtk3/models/appstore2.py", line 174, in get_markup
     appname = self.get_appname(doc)
   File "/usr/share/software-center/softwarecenter/ui/gtk3/models/appstore2.py", line 166, in get_appname
     return app.get_display_name(self.db, doc)
   File "/usr/share/software-center/softwarecenter/db/application.py", line 106, in get_display_name
     if db.is_appname_duplicated(appname):
   File "/usr/share/software-center/softwarecenter/db/database.py", line 472, in is_appname_duplicated
     for (i, m) in enumerate(self.xapiandb.postlist("AA"+appname)):
   File "/usr/lib/python2.7/dist-packages/xapian/__init__.py", line 7222, in _database_gen_postlist_iter
     return PostingIter(self.postlist_begin(tname), self.postlist_end(tname),
 DatabaseModifiedError: The revision being read has been discarded - you should call Xapian::Database::reopen() and retry the operation

Sasa Paporovic (melchiaros) wrote :

The asked .crash of Ubuntu12.04 64bit updated to 18.3.2012

Sasa Paporovic (melchiaros) wrote :

I got this also on oneiric.

As requested in comment #44 I attach the .crash

tags: added: oneiric
Sasa Paporovic (melchiaros) wrote :
Don Myers (donmyers) wrote :

I just installed Ubuntu 12.04 Beta 2 64 bit. There are things I like synaptic for. I installed synaptic though the software center. then I installed cups-pdf through synaptic. When the install was complete, I got the error message that the software center had crashed. The same thing happened when I installed Gimp through synaptic. Attached is the crash file.

This bug definitely happens for me if I open software-center, minimize it or send it to a second monitor, and forget about it for many hours. Sometimes also when the PC wakes up from suspend. BTW, apport data is being inserted to a dup of this bug.

Dave Morley (davmor2) on 2012-04-05
tags: added: top10bug
Benni Tampubolon (bennlucky7) wrote :

this happens when i install GetDeb

Benni Tampubolon (bennlucky7) wrote :

error when trying remove completely the putty from synaptic manager

Dave Morley (davmor2) on 2012-04-10
tags: added: ca-escalated
removed: top10bug
Michael Vogt (mvo) on 2012-04-11
Changed in software-center (Ubuntu):
milestone: ubuntu-11.04 → ubuntu-12.04
Changed in software-center (Ubuntu):
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

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

---------------
software-center (5.2) precise; urgency=low

  [ Michael Vogt ]
  * debian/control:
    - recommend xz-lmza instead of lzma (LP: #878354)
  * lp:~mvo/software-center/track-axi-changes:
    - add a monitor for changes in the apt-xapian-index to ensure
      the DB is reopened if the cron job changes the apt-xapian-index
      database (LP: #507836)
  * lp:~mvo/software-center/lp970342:
    - do not crash if the parent goes away (and therefore the pipe)
      and the token can not be obtained (LP: #970342)
  * lp:~mvo/software-center/lp967036:
    - fix UnicodeDecodeError crash for apps with hardware
      requirements in the details view (LP: #967036)
  * lp:~mvo/software-center/list-a11y:
    - restore the a11y support for orca/accerciser/ldtp for
      the listview and treeview
  * lp:~mvo/software-center/lp979013:
    - fix a bug in the review display for certain language
      environments (LP: #979013)
  * lp:~mvo/software-center/appview-tweaks:
    - code cleanup in the sortmode code
  * lp:~mvo/software-center/lp772549:
    - fix a bug that can result in a blank software center
      screen on startup (LP: #772549)
  * lp:~mvo/software-center/lp914393:
    - adds an explicit sys.exit() to ensure all gtk event
      processing is stopped on application quit (LP: #914393)
  * lp:~mvo/software-center/lp976169:
    - do not crash if apt-xapian-index is not installed
      (LP: #976337)
    - ignore xapian.DatabaseOpeningError here (happens when
      there is no a-x-i so we don't care) (LP: #976169)
  * lp:~mvo/software-center/lp976525:
    - do not show "upgradable" button when there should be "remove"
      (LP: #976525)

  [ Gary Lasker ]
  * lp:~gary-lasker/software-center/sorting-fix-lp969215:
    - fix sort combo box inconsistencies (LP: #969215)

  [ Dave Morley ]
  * lp:~davmor2/software-center/remove_two_lines:
    - small fixes for test script USC-start-stop-times.py

  [ Kiwinote ]
  * sc/ui/gtk3/widgets/apptreeview.py:
    - everyone tries to expand a category in the installed pane by clicking
      on the text rather than the expander arrow (LP: #877130)
 -- Michael Vogt <email address hidden> Fri, 13 Apr 2012 18:35:13 +0200

Changed in software-center (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers