• 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

  • 相关阅读:
    前端学习之——h5适配
    Python学习之——【开始】
    前端学习之----隐式类型转换
    前端学习之----数据类型
    vue学习之——生命周期
    认识自己(一)
    判断一句话是否是回文,例如, 上海自来水来自海海上
    判断是否为质数
    Python之函数进阶
    Python之冒泡排序
  • 原文地址:https://www.cnblogs.com/zhjh256/p/9347731.html
Copyright © 2020-2023  润新知