[Bug 1875760] Re: /usr/lib/cnf-update-db:sqlite3.OperationalError:/usr/lib/cnf-update-db at 26:create

Ɓukasz Zemczak 1875760 at bugs.launchpad.net
Wed Aug 26 15:04:23 UTC 2020


Hello errors.ubuntu.com, or anyone else affected,

Accepted command-not-found into focal-proposed. The package will build
now and be available at https://launchpad.net/ubuntu/+source/command-
not-found/20.04.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed.  Your feedback will aid us getting this
update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, what testing has been
performed on the package and change the tag from verification-needed-
focal to verification-done-focal. If it does not fix the bug for you,
please add a comment stating that, and change the tag to verification-
failed-focal. In either case, without details of your testing we will
not be able to proceed.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance for helping!

N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.

** Changed in: command-not-found (Ubuntu Focal)
       Status: In Progress => Fix Committed

** Tags added: verification-needed verification-needed-focal

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1875760

Title:
  /usr/lib/cnf-update-db:sqlite3.OperationalError:/usr/lib/cnf-update-
  db at 26:create

Status in command-not-found package in Ubuntu:
  Fix Released
Status in command-not-found source package in Focal:
  Fix Committed

Bug description:
  [Impact]

  The Ubuntu Error Tracker has been receiving reports about a problem
  regarding command-not-found. c-n-f- crashes when there are two
  parallel processes trying to update the tmpdb via its 'cnf-update-db'
  script. Only the first process can lock the sqlite3 database, the 2nd
  one will crash.

  There is no impact on users, but we want to avoid the noise about
  those crashes in the Ubuntu Error Tracker.

  This update ignores the update-db operation, if the database is
  already locked and logs a warning message.

  [Test Case]

   * Manually lock the database
   * Run 'cnf-update-db'
   * Verify it is not crashing

  sudo cp /var/lib/command-not-found/commands.db /var/lib/command-not-found/commands.db.tmp
  sudo sqlite3 /var/lib/command-not-found/commands.db.tmp
  SQLite version 3.31.1 2020-01-27 19:55:54
  Enter ".help" for usage hints.
  sqlite> PRAGMA locking_mode = EXCLUSIVE;
  exclusive
  sqlite> BEGIN EXCLUSIVE;
  sqlite>

  sudo rm /var/lib/command-not-found/commands.db.metadata
  sudo sudo /usr/lib/cnf-update-db --verbose
  echo $?

  [Regression Potential]

  This changes touches the 'cnf-update-db' script which creates or
  updates the sqlite database containing the mappings between
  executables and its corresponding packages. It it regresses the
  database might not be correctly updated anymore and thus users might
  not get proper package recommendations when they try to execute a non-
  installed application.

  [Original Bug Description]

  The Ubuntu Error Tracker has been receiving reports about a problem regarding command-not-found.  This problem was most recently seen with package version 20.04.2, the problem page at https://errors.ubuntu.com/problem/e1fb83cff555154efc036bf0674053c5e555d96b contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
  If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/command-not-found/+bug/1875760/+subscriptions



More information about the Ubuntu-sponsors mailing list