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() basically works.

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 in case of a failed assert.

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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM