test_crash_setuid_unpackaged fails with psutil.NoSuchProcess: process no longer exists

Bug #1989371 reported by Benjamin Drung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Apport
Fix Released
High
Unassigned
apport (Ubuntu)
Fix Released
High
Unassigned

Bug Description

test_crash_setuid_unpackaged is racy and rarely fails with:

======================================================================
ERROR: test_crash_setuid_unpackaged (tests.integration.test_signal_crashes.T)
report generation for unpackaged setuid program
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 1661, in wrapper
    return fun(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 1782, in cmdline
    data = f.read()
ProcessLookupError: [Errno 3] No such process

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/autopkgtest.ukiC2X/autopkgtest_tmp/tests/integration/test_signal_crashes.py", line 746, in test_crash_setuid_unpackaged
    self.do_crash(
  File "/tmp/autopkgtest.ukiC2X/autopkgtest_tmp/tests/integration/test_signal_crashes.py", line 918, in do_crash
    command_process = self.wait_for_gdb_child_process(
  File "/tmp/autopkgtest.ukiC2X/autopkgtest_tmp/tests/integration/test_signal_crashes.py", line 1088, in wait_for_gdb_child_process
    cmdline = process.cmdline()
  File "/usr/lib/python3/dist-packages/psutil/__init__.py", line 684, in cmdline
    return self._proc.cmdline()
  File "/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 1665, in wrapper
    raise NoSuchProcess(self.pid, self._name)
psutil.NoSuchProcess: process no longer exists (pid=3767)

----------------------------------------------------------------------

Failing autopkgtest: https://autopkgtest.ubuntu.com/results/autopkgtest-kinetic/kinetic/arm64/a/apport/20220825_140850_23979@/log.gz

Benjamin Drung (bdrung)
Changed in apport:
milestone: none → 2.24.0
Changed in apport (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Benjamin Drung (bdrung) wrote :
Revision history for this message
Benjamin Drung (bdrung) wrote :
Changed in apport:
importance: Undecided → High
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.23.0-0ubuntu2

---------------
apport (2.23.0-0ubuntu2) kinetic; urgency=medium

  * tests: Wait for test process to be started (LP: #1989365)
  * tests: Fix psutil.NoSuchProcess in wait_for_gdb_child_process
    (LP: #1989371)

 -- Benjamin Drung <email address hidden> Thu, 15 Sep 2022 14:04:42 +0200

Changed in apport (Ubuntu):
status: Triaged → Fix Released
Benjamin Drung (bdrung)
Changed in apport:
status: Fix Committed → Fix Released
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.