recoverable_problem (PermissionError) /usr/share/apport/recoverable_problem@75 → main → add_proc_info

Bug #1396160 reported by errors.ubuntu.com bug bridge
32
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Medium
Brian Murray
Bionic
Triaged
Medium
Unassigned
Disco
Fix Released
Medium
Brian Murray

Bug Description

The Ubuntu Error Tracker has been receiving reports about a problem regarding apport. This problem was most recently seen with version 2.14.7-0ubuntu10, the problem page at https://errors.ubuntu.com/problem/9a1df90760a88c9b4e5e7e3b4ef450f6b5669c7c contains more details.

More Buckets:
https://errors.ubuntu.com/problem/2a97a88118a1d8746cff239205a4cd9eb3d0357d
https://errors.ubuntu.com/problem/72c621876cfe04b51b37f8f3ef08c3da0460b462
https://errors.ubuntu.com/problem/72c621876cfe04b51b37f8f3ef08c3da0460b462

Other reference:
bug 1394919

description: updated
Changed in apport (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Brian Murray (brian-murray) wrote :

Here's the Traceback:

Traceback (most recent call last):
  File "/usr/share/apport/recoverable_problem", line 75, in <module>
    main()
  File "/usr/share/apport/recoverable_problem", line 41, in main
    report.add_proc_info(report.pid)
  File "/usr/lib/python3/dist-packages/apport/report.py", line 510, in add_proc_info
    self['ExecutablePath'] = os.readlink('/proc/' + pid + '/exe')
PermissionError: [Errno 13] Permission denied: '/proc/1/exe'

Revision history for this message
Brian Murray (brian-murray) wrote :

It seems to be like we should check and see if we have permission to examine the process before calling add_proc_info() thereby avoiding this traceback.

description: updated
tags: added: rls-dd-incoming
tags: removed: rls-dd-incoming
Changed in apport (Ubuntu Disco):
assignee: nobody → Brian Murray (brian-murray)
Changed in apport (Ubuntu Disco):
status: Confirmed → In Progress
Changed in apport (Ubuntu Bionic):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.20.10-0ubuntu25

---------------
apport (2.20.10-0ubuntu25) disco; urgency=medium

  * test/test_report.py: update test_add_proc_info for function raising a
    ValueError.

 -- Brian Murray <email address hidden> Thu, 04 Apr 2019 10:18:25 -0700

Changed in apport (Ubuntu Disco):
status: In Progress → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :
Download full text (3.1 KiB)

Here's the better changelog entry:

apport (2.20.10-0ubuntu24) disco; urgency=medium

  * debian/control: apport-gtk should depend on whoopsie-preferences as that
    is needed to store preferences for reporting crashes. (LP: #1809247)
  * apport/report.py, apport/ui.py: raise ValueError if the pid is not
    accessible, display an error message for that or an invalid pid. (LP: #1396160)
  * switch from pyflakes to pyflakes3, drop some python2 code
  * apport/report.py: Have add_gdb_info return a FileNotFoundError if gdb or
    the crashing executable are not found and modify whoopsie-upload-all to
    upload crashes in that situation. (LP: #1820132)
  * debian/control, apport/hookutils.py: pkexec does not work in non-graphical
    environments yet (LP #1821415) and its providing package should only be
    a suggests because gathering of information as root isn't entirely
    necessary for a bug report. ...

Read more...

description: updated
summary: - /usr/share/apport/recoverable_problem:PermissionError:/usr/share/apport/recoverable_problem@75:main:add_proc_info
+ recoverable_problem (PermissionError)
+ /usr/share/apport/recoverable_problem@75 → main → add_proc_info
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.