Feb 28, 2019 - A segmentation fault (aka segfault) is a common condition that causes. Of a core file dumped by your program; whenever programs segfault,.
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.
cl-netbox25.9k55 gold badges7979 silver badges115115 bronze badges
RavanRavan6,0811515 gold badges4646 silver badges7676 bronze badges
1 Answer
What does it mean?
See AU: What is a segmentation fault? and also this which have some examples how reproduce it, SO: What is segmentation fault?. the simplest description I can come with (may be not the perfect):
The program tried to access a memory area out side its own section. OS blocks it.
Some cases: Reading value with initialized 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 cases end up with a bug report, either for target program or one if its dependencies (either upstream project or downstream distribution package).
How can I resolve this issue?
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 report bugs and collect related data.Note: 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. Or at least collect enough debug data to resolve the issue before reporting it.
Some Useful Tools for Debugging
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, usegdb
: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.strace
system call tracingAnother tool that may help isstrace
, I like it. It's really a powerful tool.It presents itself:In the simplest casestrace
runs the specified command until it exits. It intercepts and records the system calls which are called by a process and the signals which are received by a process. The name of each system call, its arguments and its return value are printed on standard error or to the file specified with the -o option.strace
is a useful diagnostic, instructional, and debugging tool. System administrators, diagnosticians and trouble-shooters will find it invaluable for solving problems with programs for which the source is not readily available since they do not need to be recompiled in order to trace them. Students, hackers and the overly-curious will find that a great deal can be learned about a system and its system calls by tracing even ordinary programs. And programmers will find that since system calls and signals are events that happen at the user/kernel interface, a close examination of this boundary is very useful for bug isolation, sanity checking and attempting to capture race conditions.Source:man strace
ltrace
dynamic library call tracingltrace
is a program that simply runs the specified command until it exits. It intercepts and records the dynamic library calls which are called by the executed process and the signals which are received by that process. It can also intercept and print the system calls exe‐ cuted by the program.Its use is very similar tostrace
(1).Source:man ltrace
35.7k1111 gold badges101101 silver badges182182 bronze badges
protected by Community♦Apr 20 '17 at 8:04
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Would you like to answer one of these unanswered questions instead?