(libev) cannot allocate xxx bytes, aborting 问题的一种触发条件
最近在项目中使用了libev,遇到一个很奇怪的crash,服务器运行随机时间后有一定的概率奔溃,输出的最后一行log是:
(libev) cannot allocate xxx bytes, aborting。
因为捕捉了SIGINT信号,所以可以确定崩溃就是由于libev的这个abort。开始是以为内存越界之类,排查了strncpy, memset,memcpy等使用的地方,并且使用valgrind工具检查,并没有发现内存操作异常的地方。在网上搜索了很久也没找到相关的内容。后来通过客户端的行为找到了规律,最终定位到问题的原因是:
- ev_timer_start调用之后再次调用ev_timer_init,就会百分百出现此错误。
虽然正常的调用流程是先Init再start,但是如果该ev_timer被复用,并且通过再次Init设置了不同的callback时,就可能发生start之后再init的情况。当然这种情况,只要在init之前执行一次ev_timer_stop调用就可以避免这个问题了。
(libev) cannot allocate xxx bytes, aborting 问题的一种触发条件的更多相关文章
- Fatal error: Allowed memory size of 524288000 bytes exhausted (tried to allocate 64 bytes) in D
Fatal error: Allowed memory size of 524288000 bytes exhausted (tried to allocate 64 bytes) in D 从数据库 ...
- PHP运行错最有效解决办法Fatal error: Out of memory (allocated 786432) (tried to allocate 98304 bytes) in H:\freehost\zhengbao2\web\includes\lib_common.php on line 744
原文 PHP运行错最有效解决办法Fatal error: Out of memory (allocated 6029312) Fatal error: Out of memory (allocated ...
- (转载)PHP的内存限制 Allowed memory size of 134217728 bytes exhausted (tried to allocate 1099 bytes) in
(转载)http://blog.csdn.net/beyondlpf/article/details/7794028 Fatal error: Allowed memory size of 13421 ...
- ORA-04030: out of process memory when trying to allocate 152 bytes (Logminer LCR c,krvtadc)
今天使用LogMiner找回误更新的数据时,查询v$logmnr_contents时,遇到了"ORA-04030: out of process memory when trying to ...
- PHP的内存限制 Allowed memory size of 134217728 bytes exhausted (tried to allocate 1099 bytes) in
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1099 bytes) in Fa ...
- [未解决:快速滑动collectionveiw请求数据崩溃]:unable to allocate 6553600 bytes for bitmap data
崩溃:unable to allocate 6553600 bytes for bitmap data
- Could not allocate 40960 bytes percpu data
2017-10-01 21:40:56[ 176.700091] vif: Could not allocate 40960 bytes percpu data[ 263.762812] perc ...
- Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2611816 bytes)
一段PHP程序执行报错: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 261181 ...
- Permanent data region free space insufficient to allocate 64792 bytes of memory
TT0802: Database permanent space exhaustedTT6220: Permanent data region free space insufficient to a ...
随机推荐
- Linux进程内存布局(翻译)
Anatomy of a Program in Memory 在一个多任务OS中,每个进程都运行在它自己的内存沙箱中.这个沙箱就是虚拟地址空间,在32位下就是一块容量为4GB的内存地址.内核将这些虚拟 ...
- 通过 sqldf 包使用 SQL 查询数据框
在前面的章节中,我们学习了如何编写 SQL 语句,在关系型数据库(如 SQLite 和MySQL )中查询数据.我们可能会想,有没有一种方法,能够直接使用 SQL 进行数据框查询,就像数据框是关系型数 ...
- XML_CPP_资料_libxml2库函数详解
http://blog.csdn.net/hanchaoman/article/details/42557195 许多事物符合80/20法则,libxml中也是20%的函数提供了80%的功能.下面的列 ...
- set/multiset_01
按序排列 不能指定插入位置 红黑树变体 不可以直接存取元素(即 无[?]/at(?)操作) 不可以直接修改元素值(用 先删除后添加的方式,达到相同效果) A.头尾 添加/移除 B.随机存取 C.数据存 ...
- Thunder团队--Alpha发布用户报告
用户数量:12人 以下为用户评论:(注:为了保护用户的姓名权,以下用户名以昵称形式给出.) 用户名(昵称) 用户使用频次 用户评论(以图片展示) 小王 3次 米线 2次 孔小姐 5次 乌乌鸟 2次 永 ...
- 《剑指offer》第二十二题(链表中倒数第k个结点)
// 面试题22:链表中倒数第k个结点 // 题目:输入一个链表,输出该链表中倒数第k个结点.为了符合大多数人的习惯, // 本题从1开始计数,即链表的尾结点是倒数第1个结点.例如一个链表有6个结点, ...
- IIS8.5支持WCF
昨天写了个WCF例子,在我电脑上怎么发布都不成功,老是报错. 后来把这个例子放到其他人电脑上发布都没问题,这应该就是我IIS的问题了.我用的是win8.1的系统,IIS版本是8.5,IIS8.5默认是 ...
- .net常见框架
从学习.NET以来,优雅的编程风格,极度简单的可扩展性,足够强大开发工具,极小的学习曲线,让我对这个平台产生了浓厚的兴趣,在工作和学习中也积累了一些开源的组件,就目前想到的先整理于此,如果再想到,就继 ...
- English trip -- VC(情景课) 7 C How much are the shose? 鞋多少钱
Grammar focus 语法点: How much is ...? How much are...? How much is the shirt? $15.99. How much are ...
- Confluence 6 的 Crowd 设置
名字(Name) 输入一个有意义的服务器名字,会让你在 Crowd 服务器中更好的识别你的目录服务器: Crowd Server Example Company Crowd 服务器URL(Server ...