I looked at the similar topic for issue when trying to find Core Dumped file but none of the solutions seem to work for me. Can someone help me in debugging. My application generates output in log tail that it failed because of core dump but that file is not being generated anywhere and that information is not preserved in the log file.

Linux System:

NAME="Red Hat Enterprise Linux Server" VERSION="7.8 (Maipo)" ID="rhel" ID_LIKE="fedora" As mentioned I tried several ways from the given link:


ulimit -c

cat /proc/sys/kernel/core_pattern
|/usr/share/apport/apport %p %s %c %d %P %E

folder apport does not exist when I check it

I tried also to modify /proc/sys/kernel/core_pattern with a string starting with /tmp

echo "/tmp/cores/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern
/proc/sys/kernel/core_pattern: Read-only file system

will this work if I run as root since I do not have that access currently?

Core Dump file also does not exist from the directory where I run my app.

I tried find as well on entire system:

find / -name 'core*'

find / -name '*apport*'

I also checked different folders:

ls /var/cache/abrt
ls: cannot access /var/cache/abrt: No such file or directory
ls /var/crash
ls: cannot access /var/crash: No such file or directory
ls /var/spool/abrt
ls: cannot access /var/spool/abrt: No such file or directory
cat /var/log/apport.log
cat: /var/log/apport.log: No such file or directory

No result in:

ls /var/lib/systemd/coredump/

For the following solution: To remedy the problem, we need to make sure apport writes core dump files for non-package programs as well. To do so, create a file named ~/.config/apport/settings with the following contents: [main] unpackaged=true

cd ~/.config/apport/
cd: /opt/front/arena/.config/apport/: No such file or directory

For the solution: If you're missing core dumps for binaries on RHEL and when using abrt, make sure that /etc/abrt/abrt-action-save-package-data.conf contains ProcessUnpackaged = yes

cd /etc/abrt
cd: /etc/abrt: No such file or directory

I think I am running out of options. Thanks

  • Is your home really located in /opt? What user are you doing this as?
    – Panki
    Commented Apr 8, 2021 at 14:04
  • @Panki hi Panki. bash-4.2$ whoami arena bash-4.2$ pwd /opt/front/arena The same user runs the app. Thanks
    – AndreyS
    Commented Apr 8, 2021 at 14:06
  • This wiki says how to enable apport.
    – meuh
    Commented Apr 8, 2021 at 15:57

1 Answer 1

$ ulimit -c

This is good. Unless you have permission issues, your core file will be generated with no limit in size. If this command doesn't display unlimited, you can change the value with ulimit -c unlimited.

$ cat /proc/sys/kernel/core_pattern
|/usr/share/apport/apport %p %s %c %d %P %E

If you want a core file on your disk, this is not what you want since this setting is redirecting the core file to the apport program (which is not installed).

You may change this manually, as you did, but you must have administrator rights. Either log in as root and change the core_pattern file with

echo /tmp/cores/core.%e.%p.%h.%t > /proc/sys/kernel/core_pattern

... or use sudo:

echo /tmp/core.%e.%p.%h.%t | sudo dd of=/proc/sys/kernel/core_pattern

The best way is to use sysctl:

sudo sysctl -w kernel.core_pattern=/tmp/cores/core.%e.%p.%h.%t

Usually, you can make this change permanent by editing /etc/sysctl.conf accordingly.

Note: I see you got a Read-only file system when you attempted to change the file content. It seems your proc FS is mounted read-only and you MUST remount it with read-write permission before changing any content in /proc:

sudo mount -o remount,rw /proc

That's it. Now your core file will be generated in /tmp like you requested. You can test it like this (with Bash):

$ sleep 3 & kill -SEGV $!
[1] 4604
[1]+  Segmentation fault      sleep 3

$ ls /tmp/core*

More information on core files with man 5 core.

  • thank you for reply I did this change and testing with sleep works. bash-4.2# sleep 3 & kill -SEGV $! [1] 316 bash-4.2# ls /tmp/core* /tmp/core.sleep.316.frontarena-ads-deployment3-df498f4f6-lpnjl.1618618488 however my app does not get written here still. In /tmp I am not getting any core dumps for my application. In output while starting I can see ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] /usr/local/bin/component_start: line 39: 299 Aborted $COMPONENT_COMMAND -log_to_terminal $LOG_TO_TERMINAL $USE_UNICODE "$@"
    – AndreyS
    Commented Apr 17, 2021 at 0:19
  • @AndreyDonald So, core file generation is working. If your core file is still not generated, the reason is probably one of those given by yourself in your question, or by the man page (below "various circumstances in which a core dump file is not produced ..."). I have too little information to tell you the exact reason. If you are stuck, run your program through gdb (or attach gdb to your executable before it crashes).
    – xhienne
    Commented Apr 17, 2021 at 12:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .