Apport refuses to generate core dumps inside containers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Apport |
Fix Released
|
High
|
Unassigned | ||
apport (Ubuntu) |
Fix Released
|
Critical
|
Simon Chopin |
Bug Description
lsb_release -rd
Description: Ubuntu 22.04.5 LTS
Release: 22.04
apport:
Installed: 2.20.11-0ubuntu82
Candidate: 2.20.11-0ubuntu82.7
Version table:
2.
500 http://
500 http://
*** 2.20.11-0ubuntu82 500
500 http://
100 /var/lib/
What happened:
Version 2.20.11-0ubuntu82.7 introduced a new function called consistency_checks that now refuses to generate core dumps and logging the message "executable was modified after program start, ignoring."
However, this check fails in container environments because the binary resides inside container-specific directories, not directly on the host OS.
"if not os.path.
As a result, core dumps from containers are being discarded. Prior to this update, core dumps were generated correctly.
What you expected to happen:
When a process inside the container crashes, the apport running on the host OS should forward the core dump via a UNIX socket instead of exiting because the binary is not present on the host OS.
Changes:
https:/
+process_start = get_process_
+if not consistency_
+ sys.exit(0)
+
# Check if we received a valid global PID (kernel >= 3.12). If we do,
# then compare it with the local PID. If they don't match, it's an
# indication that the crash originated from another PID namespace.
@@ -540,21 +617,24 @@
if options.global_pid is not None:
consistency_checks should be after checking if the crash originated from another PID namespace.
Changed in apport: | |
status: | New → In Progress |
Changed in apport: | |
importance: | Undecided → High |
milestone: | none → 2.33.0 |
Changed in apport: | |
status: | In Progress → Fix Committed |
Changed in apport: | |
status: | Fix Committed → Fix Released |
sudo cat /var/log/apport.log
ERROR: apport (pid 35423) Sun Jun 1 11:54:36 2025: executable was modified after program start, ignoring
ERROR: apport (pid 139024) Sun Jun 1 12:13:41 2025: executable was modified after program start, ignoring
ERROR: apport (pid 161415) Sun Jun 1 12:15:26 2025: executable was modified after program start, ignoring
ERROR: apport (pid 188105) Sun Jun 1 12:16:14 2025: executable was modified after program start, ignoring