update-manager crashed with OSError in _get_application_for_package(): [Errno 5] Eingabe-/Ausgabefehler

Bug #1428297 reported by Toby
122
This bug affects 15 people
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Medium
Unassigned
Xenial
Fix Released
Medium
Brian Murray
Zesty
Fix Released
Medium
Brian Murray
Artful
Fix Released
Medium
Unassigned

Bug Description

[Impact]
Users are experiencing a crash when there is a failure to load the desktop file for a package while updating packages with update-manager. This crash is handled with an exception but the action for the exception is to print a message (which causes an OSError Traceback) but it really should be logged. The crash is causing a lot of noise as people are receiving crash dialogs about it regularly.

[Test Case]
Its not clear to me which packages to update to recreate the crash however the bucket in the Error Tracker, https://errors.ubuntu.com/bucket/?id=/usr/bin/update-manager%3AOSError%3A_get_application_for_package%3A/usr/bin/update-manager%40121%3Astart_update%3Astart_available%3Arefresh_cache%3Aupdate%3A_make_groups%3A_get_application_for_package, has a sufficient number of crashes that occur quite frequently that we should be able to prove that the new version is not affected.

[Regression Potential]
The print() is just changing to a logging.warning() a regression would be possible if I were to have mistyped the patch.

---

ProblemType: CrashDistroRelease: Ubuntu 15.04
Package: update-manager 1:15.04.2
ProcVersionSignature: Ubuntu 3.19.0-7.7-generic 3.19.0
Uname: Linux 3.19.0-7-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 2.16.2-0ubuntu1
Aptdaemon:

Architecture: i386
CrashCounter: 1
Date: Wed Mar 4 21:02:29 2015
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/update-manager
GsettingsChanges:
 b'com.ubuntu.update-manager' b'window-height' b'371'
 b'com.ubuntu.update-manager' b'first-run' b'false'
 b'com.ubuntu.update-manager' b'window-width' b'439'
 b'com.ubuntu.update-manager' b'launch-time' b'1425499338'
InstallationDate: Installed on 2013-02-10 (752 days ago)
InstallationMedia: Xubuntu 12.10 "Quantal Quetzal" - Release i386 (20121017.1)
InterpreterPath: /usr/bin/python3.4
PackageArchitecture: all
ProcCmdline: /usr/bin/python3 /usr/bin/update-manager --no-update --no-focus-on-map
PythonArgs: ['/usr/bin/update-manager', '--no-update', '--no-focus-on-map']SourcePackage: update-manager
Title: update-manager crashed with OSError in _get_application_for_package(): [Errno 5] Eingabe-/Ausgabefehler
UpgradeStatus: Upgraded to vivid on 2015-02-27 (5 days ago)
UserGroups: adm cdrom dip fuse lpadmin plugdev sambashare sudo

Related branches

Revision history for this message
Toby (chieftoby) wrote :
tags: removed: need-duplicate-check
Changed in update-manager (Ubuntu):
importance: Undecided → Medium
tags: added: xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in update-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Brian Murray (brian-murray) wrote :

Here is the traceback:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/UpdateManager/Core/UpdateList.py", line 267, in _get_application_for_package
    desktop_file)
TypeError: constructor returned NULL

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/update-manager", line 121, in <module>
    app.start_update()
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 209, in start_update
    self.start_available()
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 221, in start_available
    self.refresh_cache()
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 349, in refresh_cache
    self.update_list.update(self.cache, eventloop_callback=iterate)
  File "/usr/lib/python3/dist-packages/UpdateManager/Core/UpdateList.py", line 484, in update
    eventloop_callback)
  File "/usr/lib/python3/dist-packages/UpdateManager/Core/UpdateList.py", line 395, in _make_groups
    app = self._get_application_for_package(pkg)
  File "/usr/lib/python3/dist-packages/UpdateManager/Core/UpdateList.py", line 271, in _get_application_for_package
    (desktop_file, e))
OSError: [Errno 5] Eingabe-/Ausgabefehler

information type: Private → Public
Revision history for this message
Brian Murray (brian-murray) wrote :

I investigated the _get_application_for_package function some and couldn't see anything obviously wrong with it.

tags: added: rls-aa-incoming
tags: removed: rls-aa-incoming
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-manager - 1:17.10.4

---------------
update-manager (1:17.10.4) artful; urgency=medium

  * UpdateManager/Core/UpdateList.py: Instead of trying to print an error
    when trying to find the desktop file log it. (LP: #1428297)

 -- Brian Murray <email address hidden> Mon, 07 Aug 2017 16:19:53 -0700

Changed in update-manager (Ubuntu Artful):
status: Confirmed → Fix Released
Changed in update-manager (Ubuntu Xenial):
status: New → Triaged
importance: Undecided → Medium
Changed in update-manager (Ubuntu Xenial):
assignee: nobody → Brian Murray (brian-murray)
Changed in update-manager (Ubuntu Zesty):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Brian Murray (brian-murray)
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Toby, or anyone else affected,

Accepted update-manager into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/update-manager/1:17.04.6 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 and change the tag from verification-needed-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. In either case, details of your testing will help us make a better decision.

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

Changed in update-manager (Ubuntu Zesty):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-zesty
Changed in update-manager (Ubuntu Xenial):
status: Triaged → Fix Committed
tags: added: verification-needed-xenial
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Toby, or anyone else affected,

Accepted update-manager into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/update-manager/1:16.04.9 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 and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

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

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

According to errors.u.c there is no crash recorded for any version numbered *17.04, including version 1:17.04.6 published to proposed nearly 2 weeks ago. So it seems that 17.04 is not affected by this bug and I'm marking zesty as verification-done.

tags: added: verification-done-zesty
removed: verification-needed-zesty
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

According to errors.u.c there is no crash recorded for xenial for update-manager 16.04.7 and higher including the version currently in -updates. This package has been -proposed for nearly 2 weeks without any new occurrence of this defect, I'm marking it as verification-done for xenial.

tags: added: verification-done verification-done-xenial
removed: verification-needed verification-needed-xenial
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for update-manager has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-manager - 1:16.04.9

---------------
update-manager (1:16.04.9) xenial; urgency=medium

  * UpdateManager/Core/UpdateList.py: Instead of trying to print an error
    when trying to find the desktop file log it. (LP: #1428297)
  * tests/test_update_origin.py: This does not need to be architecture
    specific so just set the arch to amd64 like test_update_list.py. Replace
    references to lucid with xenial as lucid is no longer on the archive.
  * tests/test_utils.py: mock /proc/net/tcp and processes in proc so that we
    are testing the code and not the system under test.
  * tests/test_cache.py: pass an empty list when getting a changelog for 3rd
    party packages.
  * tests/test_hwe_support_status.py: port to python3.
  * tests/test_meta_release_core.py: switch to a site that works with no proxy
    in the autopkgtest environment.
  * Resolve pep8 and pyflakes issues.

 -- Brian Murray <email address hidden> Thu, 10 Aug 2017 15:08:15 -0700

Changed in update-manager (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-manager - 1:17.04.6

---------------
update-manager (1:17.04.6) zesty; urgency=medium

  * UpdateManager/Core/UpdateList.py: Instead of trying to print an error
    when trying to find the desktop file log it. (LP: #1428297)
  * tests/test_update_origin.py: This does not need to be architecture
    specific so just set the arch to amd64 like test_update_list.py. Replace
    references to lucid with xenial as lucid is no longer on the archive.
  * tests/test_utils.py: mock /proc/net/tcp and processes in proc so that we
    are testing the code and not the system under test.
  * tests/test_cache.py: pass an empty list when getting a changelog for 3rd
    party packages.
  * tests/test_hwe_support_status.py: port to python3.
  * tests/test_meta_release_core.py: switch to a site that works with no proxy
    in the autopkgtest environment.
  * Resolve pep8 and pyflakes issues.

 -- Brian Murray <email address hidden> Thu, 10 Aug 2017 13:58:50 -0700

Changed in update-manager (Ubuntu Zesty):
status: Fix Committed → Fix Released
tags: added: id-597a82efcfd0de67adf6b966
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.