test_core_dump_packaged test flaky on arm64 and ppc64el

Bug #1980390 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

The test_core_dump_packaged test from Apport 2.22.0 is flaky on arm64 and ppc64el. It failed once on ppc64el [1] with

======================================================================
FAIL: test_core_dump_packaged (tests.integration.test_signal_crashes.T)
packaged executables create core dumps on proper ulimits
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/autopkgtest.JhpbZ4/autopkgtest_tmp/tests/integration/test_signal_crashes.py", line 426, in test_core_dump_packaged
    self.check_report_coredump(self.test_report)
  File "/tmp/autopkgtest.JhpbZ4/autopkgtest_tmp/tests/integration/test_signal_crashes.py", line 1022, in check_report_coredump
    self.assertTrue(
AssertionError: False is not true : #0 0x00007ffff7fb60a0 in ?? ()
No symbol table info available.
#1 0x0000000000000000 in ?? ()
No symbol table info available.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

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

and five times on arm64 [2] with

======================================================================
FAIL: test_core_dump_packaged (tests.integration.test_signal_crashes.T)
packaged executables create core dumps on proper ulimits
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/autopkgtest.N0uNjv/autopkgtest_tmp/tests/integration/test_signal_crashes.py", line 426, in test_core_dump_packaged
    self.check_report_coredump(self.test_report)
  File "/tmp/autopkgtest.N0uNjv/autopkgtest_tmp/tests/integration/test_signal_crashes.py", line 1022, in check_report_coredump
    self.assertTrue(
AssertionError: False is not true : #0 0x0000fffff7fd9c00 in ?? ()
No symbol table info available.
Backtrace stopped: not enough registers or memory available to unwind further

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

[1] https://autopkgtest.ubuntu.com/results/autopkgtest-kinetic/kinetic/ppc64el/a/apport/20220628_134149_196a1@/log.gz
[2] https://autopkgtest.ubuntu.com/results/autopkgtest-kinetic/kinetic/arm64/a/apport/20220628_151408_898ce@/log.gz

Benjamin Drung (bdrung)
Changed in apport:
milestone: none → 2.23.0
Revision history for this message
Benjamin Drung (bdrung) wrote (last edit ):

Reproduced with upstream apport on arm64:

$ pytest-3 -ra --durations=0 tests/integration/test_signal_crashes.py
[...]
======================== FAILURES =======================
_______________ T.test_core_dump_packaged _______________
self = <tests.integration.test_signal_crashes.T testMethod=test_core_dump_packaged>

    def test_core_dump_packaged(self):
        """packaged executables create core dumps on proper ulimits"""

        # for SEGV and ABRT we expect reports and core files
        for sig in (signal.SIGSEGV, signal.SIGABRT):
            for (kb, exp_file) in core_ulimit_table:
                resource.setrlimit(resource.RLIMIT_CORE, (kb, -1))
                self.do_crash(
                    expect_corefile=exp_file,
                    expect_corefile_owner=os.geteuid(),
                    sig=sig,
                )
                self.assertEqual(
                    apport.fileutils.get_all_reports(), [self.test_report]
                )
> self.check_report_coredump(self.test_report)

/home/ubuntu/apport/tests/integration/test_signal_crashes.py:428:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/ubuntu/apport/tests/integration/test_signal_crashes.py:1033: in check_report_coredump
    self.assertIn("\n#2", r.get("Stacktrace"))
E AssertionError: '\n#2' not found in '#0 0x0000fffff7fd9c00 in ?? ()\nNo symbol table info available.\nBacktrace stopped: not enough registers or memory available to unwind further'
----------------- Captured stderr call ------------------
warning: target file /proc/3852/cmdline contained unexpected null characters
ERROR: apport (pid 3857) Thu Jun 30 22:32:26 2022: called for pid 3852, signal 11, core limit 1000, dump mode 1
ERROR: apport (pid 3857) Thu Jun 30 22:32:26 2022: executable: /usr/bin/sleep (command line "/usr/bin/sleep 86400")
ERROR: apport (pid 3857) Thu Jun 30 22:32:26 2022: is_closing_session(): no DBUS_SESSION_BUS_ADDRESS in environment
ERROR: apport (pid 3857) Thu Jun 30 22:32:26 2022: wrote report /tmp/tmpiyd13gh1/_usr_bin_sleep.1000.crash
ERROR: apport (pid 3857) Thu Jun 30 22:32:26 2022: writing core dump to core._usr_bin_sleep.1000.f99ef6cc-6b9c-472a-b4ca-c6aad99624a7.3852.44760 (limit: 1000)
ERROR: apport (pid 3857) Thu Jun 30 22:32:26 2022: aborting core dump writing, size 371976 exceeds current limit

Changed in apport:
importance: Undecided → High
status: New → Triaged
Changed in apport (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Benjamin Drung (bdrung) wrote :

Running following command in a loop triggered it on iteration 10:

for i in $(seq 100); do echo "***** Iteration $i ********"; pytest-3 -ra --durations=0 tests/integration/test_signal_crashes.py::T::test_core_dump_packaged || break; done

Revision history for this message
Benjamin Drung (bdrung) wrote :
Changed in apport:
status: Triaged → Fix Committed
Revision history for this message
Benjamin Drung (bdrung) wrote :

This fix causes regressions in the test suite. I will revert this commit and develop a proper solution.

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

This bug was fixed in the package apport - 2.22.0-0ubuntu4

---------------
apport (2.22.0-0ubuntu4) kinetic; urgency=medium

  * tests: Use sleep instead of yes for tests
  * apport: Initialize error log as first step
  * Depend on python3-systemd for autopkgtest system-tests

 -- Benjamin Drung <email address hidden> Thu, 07 Jul 2022 20:44:02 +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.