[Bug 2114171] Re: AssertionError: cannot parse ProcMaps line: Error: [Errno 3] No such process: 'maps'

Launchpad Bug Tracker 2114171 at bugs.launchpad.net
Sat Jul 5 22:00:18 UTC 2025


This bug was fixed in the package apport - 2.33.1-0ubuntu1

---------------
apport (2.33.1-0ubuntu1) questing; urgency=medium

  * New upstream release
    - report:
      + check for errors in ProcMaps in crash_signature_addresses (LP: #2114171)
      + Handle FileNotFoundError when determining ExecutableTimestamp
        (LP: #2098792)
    - apport: Do not hide FileNotFoundError during crash handling
    - test: use true from GNU coreutils (LP: #2111595)

 -- Benjamin Drung <bdrung at ubuntu.com>  Fri, 04 Jul 2025 21:40:18 +0200

** Changed in: apport (Ubuntu)
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apport in Ubuntu.
https://bugs.launchpad.net/bugs/2114171

Title:
  AssertionError: cannot parse ProcMaps line: Error: [Errno 3] No such
  process: 'maps'

Status in Apport:
  Fix Released
Status in apport package in Ubuntu:
  Fix Released
Status in apport source package in Jammy:
  New
Status in apport source package in Noble:
  New

Bug description:
  [ Original report ]

  ```
  Traceback (most recent call last):
    File "/usr/share/apport/whoopsie-upload-all", line 246, in <module>
      main()
    File "/usr/share/apport/whoopsie-upload-all", line 228, in main
      stamps = collect_info()
               ^^^^^^^^^^^^^^
    File "/usr/share/apport/whoopsie-upload-all", line 162, in collect_info
      res = process_report(r)
            ^^^^^^^^^^^^^^^^^
    File "/usr/share/apport/whoopsie-upload-all", line 112, in process_report
      r.add_gdb_info()
    File "/usr/lib/python3/dist-packages/apport/report.py", line 1022, in add_gdb_info
      addr_signature = self.crash_signature_addresses()
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/apport/report.py", line 1761, in crash_signature_addresses
      offset = self._address_to_offset(addr)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/apport/report.py", line 1969, in _address_to_offset
      self._build_proc_maps_cache()
    File "/usr/lib/python3/dist-packages/apport/report.py", line 2005, in _build_proc_maps_cache
      assert m, "cannot parse ProcMaps line: " + line
             ^
  AssertionError: cannot parse ProcMaps line: Error: [Errno 3] No such process: 'maps'
  ```

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

  [ Impact ]

  * This error report is the equivalent for this bug in Noble: https://errors.ubuntu.com/problem/472e8b056e334653c0eab820f0d83e22949fcbee
  * AssertionError: cannot parse ProcMaps line: Error: [Errno 3] No such process: 'maps'

  ```
  Traceback (most recent call last):
    File "/usr/share/apport/whoopsie-upload-all", line 246, in <module>
      main()
    File "/usr/share/apport/whoopsie-upload-all", line 228, in main
      stamps = collect_info()
               ^^^^^^^^^^^^^^
    File "/usr/share/apport/whoopsie-upload-all", line 162, in collect_info
      res = process_report(r)
            ^^^^^^^^^^^^^^^^^
    File "/usr/share/apport/whoopsie-upload-all", line 112, in process_report
      r.add_gdb_info()
    File "/usr/lib/python3/dist-packages/apport/report.py", line 1022, in add_gdb_info
      addr_signature = self.crash_signature_addresses()
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/apport/report.py", line 1761, in crash_signature_addresses
      offset = self._address_to_offset(addr)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/apport/report.py", line 1969, in _address_to_offset
      self._build_proc_maps_cache()
    File "/usr/lib/python3/dist-packages/apport/report.py", line 2005, in _build_proc_maps_cache
      assert m, "cannot parse ProcMaps line: " + line
             ^
  AssertionError: cannot parse ProcMaps line: Error: [Errno 3] No such process: 'maps'
  ```

  * The upload fixes the bug as
  https://github.com/canonical/apport/pull/540 adds a fix to catch all
  error cases as the function _read_maps reads /proc/pid/maps but will
  return a string starting with Error:  in case of an OSError.

  [ Test Plan ]

   * This crash can be reproduced by having apport try to process a
  crash dump for a process that has already exited:

  ```
  FAKE_PID_DIR=$(mktemp -d)
  FAKE_PID=99999

  mkdir -p "$FAKE_PID_DIR/fd"

  mount --bind '$FAKE_PID_DIR' /proc/$FAKE_PID 2>/dev/null || true
  apport -p $FAKE_PID 2>&1 || true
  ```

   * https://github.com/canonical/apport/pull/540 also introduced a unit
  test for this.

  [ Where problems could occur ]

   * We are adding an error case to the error handler so a syntax error
  might lead to incorrect error message or failure to build.

   * Since apport is primarily for crash reports, user experience is
  unlikely to be affected much.

To manage notifications about this bug go to:
https://bugs.launchpad.net/apport/+bug/2114171/+subscriptions




More information about the foundations-bugs mailing list