Bug 1372404 - systemd-coredump writes empty core dump files
Summary: systemd-coredump writes empty core dump files
Keywords:
Status: CLOSED DUPLICATE of bug 1371709
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-01 15:29 UTC by Michal Schmidt
Modified: 2016-09-02 05:11 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-02 05:11:05 UTC
Type: Bug


Attachments (Terms of Use)

Description Michal Schmidt 2016-09-01 15:29:31 UTC
systemd-229-13.fc24.x86_64

The F24-specific patch 0045-coredump-ignore-RLIMIT_CORE.patch removes the initialization of the 'rlimit' variable in save_external_coredump(). This uninitialized value enters into the calculation of 'max_size':

 max_size = MIN(rlimit, MAX(arg_process_size_max, arg_external_size_max));

In #systemd Jason Tibbitts reported getting zero-length core files on F24.
The above mistake should explain it.

Comment 1 Michal Schmidt 2016-09-01 15:32:10 UTC
A relevant compiler warning can be seen in Koji build.log
https://kojipkgs.fedoraproject.org//packages/systemd/229/13.fc24/data/logs/x86_64/build.log:

src/coredump/coredump.c: In function 'save_external_coredump':
src/coredump/coredump.c:323:20: warning: 'rlimit' may be used uninitialized in this function [-Wmaybe-uninitialized]
         max_size = MIN(rlimit, MAX(arg_process_size_max, arg_external_size_max));
                    ^
src/coredump/coredump.c:307:18: note: 'rlimit' was declared here
         uint64_t rlimit, max_size;

Comment 2 Jan Synacek 2016-09-02 05:11:05 UTC

*** This bug has been marked as a duplicate of bug 1371709 ***


Note You need to log in before you can comment on or make changes to this bug.