I am using Ubuntu 14.04.
After installing some applications I faced a segmentation fault (core dumped) error.
What does it mean ? How can I resolve this issue ?
For example:
After installing chrome-stable, when I launch it from terminal I experience this error.
What does it mean?
See AU: What is a segmentation fault? post and also this post which have some examples how reproduce it, SO: What is segmentation fault?.
The simplest description I can come with (may be not the perfect):
Some cases: Reading value with uninitialized pointer, Going out of range in an array, Function call (when backward compatibility not maintained), ...
However, it is not always easy find the cause with large programs or those which relay on other project lib's. And most of the cases end up with a bug report, either for target program or one of its dependencies (either upstream project or downstream distribution package).
How can I resolve this issue?
Fire a bug report
If you didn't make any custom configuration/setup and you all updates installed. fire a bug report, see How do I report a bug?
If open source supported by Ubuntu use
ubuntu-bug
(apport-bug
). For 3rd party closed source, check their help pages how to report bugs and collect related data.Take initiative to debug
If you you have even a little programming background, it is recommended that you try your best to resolve it yourself. There many bug reports out there inactive for years. At least, you may be able to collect enough debug data that help resolve the issue when reporting it.
That's means that you are breaking the user abstraction level and opening the black box! (FLOSS actually has transparent box).
Some Useful Tools for Debugging
Some ... I mean there are many other useful tools out there that you gonna find when you dig in more.
apport-bug
logs / core dump / backtraceIf you don't have an error message before segmentation fault. Run it with
--save
option and look for back-trace log:gdb
backtrace / debuging source codeIf it didn't work, use
gdb
:If you get any error message, check the web, launchpad and in upstream project bug tracker if there any similar cases.
For some advanced users or who are following a c/c++ learning path, they could download the corresponding
-dbg
symbols packages. Then you can usegdb
to trace program flow through the source and get the exact function/instruction that raise the runtime error.For Ubuntu(Debian) based distributions, source code of a package can be downloaded using:
strace
system call tracingAnother tool that may help is
strace
, I like it. It's really a powerful tool.It presents itself:
Source:
man strace
ltrace
dynamic library call tracingSource:
man ltrace