Program terminated with signal 6, Aborted,有可能啥原因呢?
Program terminated with signal 6, Aborted,有可能啥原因呢?其中一種原因就是事實上的OOM(雖然/var/log/message中沒有標明操作系統kill了進行,應該是進程內部初始化已申請內存時報錯了,因為malloc的申請會被OS盡可能延後的分配,所以很有可能已經申請的內存早就OOM了,但是程序還可以運行一段時間,甚至很久,除非設置了lock in memory,比如jdk和oracle、mysql都支持這麽做)
abort()
sends the calling process the SIGABRT
signal, this is how abort()
abort()
is usually called by library functions which detect an internal error or some seriously broken constraint. For example malloc()
will call abort()
if its internal structures are damaged by a heap overflow.
in most cases SIGABRT was sent by libc
trying to call free()
on a non-initialized/corrupted pointer
It usually happens when there is a problem with memory allocation.
SIGABRT
is commonly used by libc and other libraries to abort the program in case of critical errors. For example, glibc sends an SIGABRT
in case of a detected double-free or other heap corruptions.
Also, most assert
implementations make use of SIGABRT
Furthermore, SIGABRT
can be sent from any other process like any other signal. Of course, the sending process needs to run as same user or root.
參考:https://stackoverflow.com/questions/3413166/when-does-a-process-get-sigabrt-signal-6
Program terminated with signal 6, Aborted,有可能啥原因呢?