You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hijack apport pipe handler to capture core dumps in unprivileged containers
When core_pattern pipes to apport (common in CI), apport silently
discards cores from non-packaged binaries. Replace the handler with a
forwarder script that reads the core from stdin and writes it to the
artifact directory. Falls back gracefully if the handler is read-only.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
if [[ "${CUOPT_COREDUMP_PATTERN_IS_PIPE}"== 1 ]];then
177
-
local _pipe_msg="WARNING: core_pattern pipes to a collector — cores will NOT appear as files. Fallback: coredumpctl (systemd-coredump) or /var/crash (apport) will be checked at collection time."
178
-
ifcommand -v coredumpctl &>/dev/null;then
179
-
_pipe_msg+="coredumpctl is available."
236
+
local _pipe_msg="core_pattern pipes to a collector."
237
+
if[[ -f"$(echo "${pattern}"| sed 's/^|//; s/ .*//').cuopt_orig" ]];then
238
+
_pipe_msg+="Handler hijacked with core forwarder — cores should land in ${CUOPT_COREDUMP_DIR}."
180
239
else
181
-
_pipe_msg+=" coredumpctl NOT found; if systemd-coredump is the handler, cores may be lost."
0 commit comments