Error Reference › Linux / Server
Linux / Server
Segmentation fault (core dumped)
A program crashed by accessing memory it shouldn't — a bug in the binary or a bad library.
What it looks like
Segmentation fault (core dumped)
app[4121]: segfault at 0 ip 00007f3a2c1b4e10 sp 00007ffd9a3c8f20 error 4 in libfoo.so.1
What does "Segmentation fault (core dumped)" mean?
Printed by the shell, and logged by the kernel (dmesg, journalctl), when a native program touches memory it is not allowed to. In scripting languages it means native code crashed — the interpreter itself or a compiled extension — not your script.
What causes "Segmentation fault (core dumped)"?
- A bug in native code (null/invalid pointer).
- Incompatible/corrupt shared library.
- Stack overflow in native code.
How do I confirm the cause?
- Check dmesg or journalctl for the kernel’s segfault line, which names the program and often the library it crashed in.
- Get a backtrace from the core dump (coredumpctl gdb, or gdb program core) to see the exact function.
- If it started after an upgrade, suspect a mismatched library or a compiled extension built for another version.
How do I fix "Segmentation fault (core dumped)"?
- Reproduce and get a backtrace (gdb / coredumpctl).
- Update or reinstall the program and its libraries.
- Report it upstream with the backtrace if it's not your code.
How do I stop it happening again?
- Rebuild or reinstall native extensions after upgrading the language runtime.
- Keep programs and their libraries from the same package source and version.