Running a multi-threaded program in my arm board one day or more ,The process down .
In order to get a coredump to analysis of the stack , . I use commands ulimited -c unlimited .
but when the process down . no coredump
But I write a test
#include <stdio.h>
int main(void){
int m = 0;
scanf("%d",m);
return 0;
}
The user running the app has a ulimit setting to prevent it - environment setting
You linked against an object that blocks SIGSEGV/SIGBUS
You block SIGSEGV/SIGBUS in your code somewhere
I do not know much about ARM. When you execute the image file is there some separate environment in which it runs? To check resource settings:
ex:
I use " ulimit -c unlimited ", not" ulimit -c 100 "or something else .
I can use functions setjmp, longjmp ,and signal to catch SIGSEGV/SIGBUS and do anything i want .
Even so , I don't know the place generate SIGSEGV/SIGBUS
The result of an unhandled signal and the value (name sometimes, too) for each flavor of unix varies. Here is a list, your system may vary
Notice: several signals result in Termin. == termination with no core. Example SIGUSR2. Especially note SIGKILL.
It cannot be blocked. It does not cause a core dump either. This is true for all the UNIX flavors I know about. I believe ARM is a linux port.
Program terminated with signal 13, Broken pipe. #0 0x4011ceb8 in select () from /lib/libc.so.0
(gdb) bt 6 #0 0x4011ceb8 in select () from /lib/libc.so.0 #1 0x00015298 in NSvrCtrl::GetEvent (this=0x5ff08, timeout=1000)
at nsvrctrl.cpp:187 #2 0x0004ada8 in SKYCAST::NATThreadProc (pParam=0x5feb0) at NatThread.cpp:147 #3 0x40013ac4 in pthread_start_thread () from /lib/libpthread.so.0 #4 0x40013ac4 in pthread_start_thread () from /lib/libpthread.so.0 #5 0x40013ac4 in pthread_start_thread () from /lib/libpthread.so.0
(More stack frames follow...)
There you are: SIGPIPE doesn't generate any core. But you have a pretty good backtrace where the problem lies apparently.
Are you using TCP socket? In this case, you should perhaps blocks SIGPIPE so that you get synchronously informed during the write()/send() (that will return -1 with errno set to EPIPE), instead of getting SIGPIPE.
and run it with the gdb about one day or more . the process don't terminate (before It did). but it stoppedno breakpoint or something else ). which I means use c or r , the process will run again .
if I use bt to see the frame . the result is the same as above .
Are you sure your process has been aborted (which should generate a core dump). If somewhere in the process it might be using exit() (this way it won't dump core file).
---------- Post updated at 05:00 PM ---------- Previous update was at 04:57 PM ----------
Sorry for my last post. I was not of 2nd page of the thread.