SUSE Support

Here When You Need Us

coredumpctl is unable to retrieve a coredump from the journal

This document (7023161) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 12 Service Pack 3 (SLES 12 SP3)

Situation

When attempting to retrieve a systemd service coredump from the journal, this fails with:

...
Cannot retrieve coredump from journal nor disk.
Coredump retrieval failed: No such file or directory
...

Resolution

For the service that is dumping core, follow the steps as described in the SUSE Linux Enterprise Server Administration Guide to customize or create a "Drop-in" file for a systemd service.  The following needs to be added:

LimitCORE=infinity

Alternatively to globally change the setting for all services, un-remark the "DefaultLimitCORE=infinity" setting in "/etc/systemd/system.conf"

After either of the above changes it is needed to restart the relevant systemd service(s).

It is also needed to set the following:

sysctl -w kernel.suid_dumpable=2

Cause

The "Soft Limit" for the "Max core file size" of systemd services by default is set to 0, which prevents the writing of core files.

Additional Information

For general information on how to use coredumpctl see TID 7017137 - How to obtain systemd service core dumps.

To verify the current limit(s) is in effect for a service, run:

:~ # cat /proc/$(pidof <insert_service_name>)/limits
Limit                     Soft Limit           Hard Limit           Units    
Max cpu time              unlimited            unlimited            seconds  
Max file size             unlimited            unlimited            bytes    
Max data size             unlimited            unlimited            bytes    
Max stack size            8388608              unlimited            bytes    
Max core file size        unlimited            unlimited            bytes    
Max resident set          unlimited            unlimited            bytes    
Max processes             63216                63216                processes
Max open files            1048576              1048576              files    
Max locked memory         65536                65536                bytes    
Max address space         unlimited            unlimited            bytes    
Max file locks            unlimited            unlimited            locks    
Max pending signals       63216                63216                signals  
Max msgqueue size         819200               819200               bytes    
Max nice priority         0                    0                   
Max realtime priority     0                    0                   
Max realtime timeout      unlimited            unlimited            us 


To list for example only the "Max core file size" run:

:~ # grep core /proc/$(pidof <insert_service_name>)/limits
Max core file size        unlimited            unlimited            bytes

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7023161
  • Creation Date: 09-Jul-2018
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.