1

I'm trying to analyze the core dump of one of my applications, but I'm not able to find the reason for the crash.

When I run gdb binary file corefile I see the following output:

Program terminated with signal SIGKILL, Killed.
#0  0xfedcdf74 in _so_accept () from /usr/lib/libc.so.1
(gdb)

But I am pretty sure that no one has executed kill -9 <pid>. With info thread, I can see all the threads launched by the application, but I can see nothing special about any thread.

By running bt full or maint info sol-threads I don't find anything that leads to the bug. I just see the stack trace for each thread without any information about the bug.

Finally I've found a thread which causes the kill signal.

#0  0xfedcebd4 in _lwp_kill () from /usr/lib/libc.so.1
#1  0xfed67bb8 in raise () from /usr/lib/libc.so.1
#2  0xfed429f8 in abort () from /usr/lib/libc.so.1
#3  0xff0684a8 in __cxxabiv1::__terminate(void (*)()) () from /usr/local/lib/libstdc++.so.5
#4  0xff0684f4 in std::terminate() () from /usr/local/lib/libstdc++.so.5
#5  0xff068dd8 in __cxa_pure_virtual () from /usr/local/lib/libstdc++.so.5
#6  0x00017f40 in A::method (this=0x2538d8) at A.cc:351

Class A inherits of an abstact class and in the line 351 a virtual function declared in the abstract class and defined in A is called. I don´t understand why if object A exists the call to the virtual base function crashes.

althor
  • 739
  • 2
  • 9
  • 21
  • 1
    By using `thread apply all backtrace` I found a thread which called abort() function to raise kill signal. That helps me to analyze my code to investigate why a pure virtual function is called – althor May 12 '15 at 11:43

1 Answers1

1

That SIGKILL could be caused by your app exceeding some resource limit. Try to get the system log and see if there are any resource limit exceeded messages.

References

scottt
  • 7,008
  • 27
  • 37