zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    1003 Emergency (25分)
    1013 Battle Over Cities (25分)
    1009 Product of Polynomials (25分)
    一元多项式的乘积与和(C++)
    1015 Reversible Primes (20分)
    list()函数对原来类型已经是列表的不会在添加[]
    全局变量把值固定
    python中None与Null的区别
    基础算法之排序
    列表和字符串的方法返回一个新的对象;直接加入到原对象中
  • 原文地址:https://www.cnblogs.com/zhjh256/p/9347731.html
Copyright © 2011-2022 走看看