/usr/share/apport/whoopsie-upload-all:AssertionError:/usr/share/apport/whoopsie-upload-all@162:collect_info:process_report:add_gdb_info:gdb_command

Bug #1820132 reported by errors.ubuntu.com bug bridge
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
High
Brian Murray
Bionic
Fix Released
High
SatoshiNakamoto
Disco
Fix Released
High
Brian Murray

Bug Description

The Ubuntu Error Tracker has been receiving reports about a problem regarding apport. This problem was most recently seen with package version 2.20.10-0ubuntu23, the problem page at https://errors.ubuntu.com/problem/4a48673e60f08b7d2b9067d1b47766a57f7e693e 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/.

Related branches

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

apport does not depend on gdb so it's possible, even likely, that gdb is not installed on the system reporting the crash. Subsequently, report.add_gdb_info will fail and the docstring indicates that this should "Raises ... OSError if calling gdb fails" however the docstring is currently a liar perhaps because of a change I made. Regardless this should be sorted out. Here's the Traceback:

Traceback (most recent call last):
  File "/usr/share/apport/whoopsie-upload-all", line 162, in <module>
    stamps = collect_info()
  File "/usr/share/apport/whoopsie-upload-all", line 112, in collect_info
    res = process_report(r)
  File "/usr/share/apport/whoopsie-upload-all", line 79, in process_report
    r.add_gdb_info()
  File "/usr/lib/python3/dist-packages/apport/report.py", line 713, in add_gdb_info
    gdb_cmd, environ = self.gdb_command(rootdir, gdb_sandbox)
  File "/usr/lib/python3/dist-packages/apport/report.py", line 1580, in gdb_command
    assert os.path.exists(executable)
AssertionError

Changed in apport (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Brian Murray (brian-murray) wrote :

Actually, I was looking at the wrong thing what's really missing is the executable which crashed from the top of the function gdb_command:

        assert 'ExecutablePath' in self
        executable = self.get('InterpreterPath', self['ExecutablePath'])

While it makes sense for apport-retrace to have an AssertionError if the executable doesn't exist I don't think whoopsie-upload-all necessarily should just because it isn't on the client system doesn't mean the retracers won't be able to install it.

Changed in apport (Ubuntu Disco):
status: Triaged → In Progress
assignee: nobody → Brian Murray (brian-murray)
Changed in apport (Ubuntu Bionic):
status: New → Triaged
importance: Undecided → High
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...

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

To test this with whoopsie-upload-all one could do something like the following:

1) xeyes &
2) pkill -11 xeyes
3) sudo mv /usr/bin/xeyes /tmp/
4) /usr/share/apport/whoopsie-upload-all

Don't forget to move xeyes back if you care about it.

Changed in apport (Ubuntu Bionic):
assignee: nobody → SatoshiNakamoto (evansanita713)
status: Triaged → Confirmed
status: Confirmed → Fix Committed
status: Fix Committed → Fix Released
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.