了解电篱笆和gdb的输出 [英] Understanding the output of electric fence and gdb

查看:190
本文介绍了了解电篱笆和gdb的输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当调试使用segfault终止的程序时,电篱笆与gdb一起返回:



ElectricFence退出:mprotect ()失败:无法分配内存
[线程0xb0bd4b70(LWP 5363)退出]
程序退出与代码0377。



<我实际上认为电篱笆会更有帮助,这是什么意思?我如何解释这条信息?似乎没有任何堆栈可以看,或至少 bt 不会返回任何东西。



任何建议都将非常感激。



谢谢!

解决方案

你可能用完了内存映射区域,使用调试分配器时,默认值为低这可以在运行时通过

  echo 128000> / proc / sys / vm / max_map_count 

或者将此行添加到/etc/sysctl.conf并重新启动: p>

  vm.max_map_count = 128000 

max_map_count数字默认为65530,如有需要,可以将其增加到MAX_INT。



有关详细信息,请参阅:




When debugging a program that terminates with a segfault, electric fence, in conjunction with gdb, returns this:

"ElectricFence Exiting: mprotect() failed: Cannot allocate memory [Thread 0xb0bd4b70 (LWP 5363) exited] Program exited with code 0377.

I actually thought electric fence would be more helpful. What does this mean? How can I interpret this piece of information? There doesn't seem to be any stack left that I can look at, or at least bt won't return anything.

Any suggestion would be really appreciated.

Thanks!

解决方案

You have probably run out of memory map areas. The default is known to be low when using debug allocators. This can be adjusted at runtime via

echo 128000 > /proc/sys/vm/max_map_count

or by adding this line to /etc/sysctl.conf and rebooting:

vm.max_map_count = 128000

The max_map_count number defaults to 65530 and can be increased as high as MAX_INT if necessary.

For more information see:

这篇关于了解电篱笆和gdb的输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆