10

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.

  • Some binary program crashed, but this is very specific to the program that crashed, so you may need to tell us which program produced this, also you could try to update it. – Kwaadpepper Oct 27 '15 at 12:12
  • 1
    See what is a segmentation fault? – agold Nov 19 '15 at 13:59
  • 1
    As it is a closed source, you better raise a bug report to uncle GooGle! – user.dz Nov 21 '15 at 12:03
  • 1
    Good SH :) I will ask uncle ;P – Ravan Nov 21 '15 at 12:05
  • 1
    Try remove it's preferences & cache, sudo rm -rf ~/.config/google-chrome ~/.cache/google-chrome . Then run it is incognito mode google-chrome --incognito – user.dz Nov 21 '15 at 12:58
10

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

  1. apport-bug logs / core dump / backtrace

    If you don't have an error message before segmentation fault. Run it with --save option and look for back-trace log:

    apport-bug program-cmd --save bug-report_output.txt
    
  2. gdb backtrace / debuging source code

    If it didn't work, use gdb:

    $ gdb program-cmd
    (gdb) run
    (gdb) backtrace
    

    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 use gdb to trace program flow through the source and get the exact function/instruction that raise the runtime error.

  3. strace system call tracing

    Another tool that may help is strace, I like it. It's really a powerful tool.

    It presents itself:

    In the simplest case strace 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

  4. ltrace dynamic library call tracing

    ltrace 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 to strace(1).

    Source: man ltrace

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?

Not the answer you're looking for? Browse other questions tagged or ask your own question.