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

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

问题描述

当调试一个以段错误终止的程序时,电子围栏与 gdb 一起返回:

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

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

我实际上认为电围栏会更有帮助.这是什么意思?我该如何解释这条信息?似乎没有任何堆栈可供我查看,或者至少 bt 不会返回任何内容.

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.

谢谢!

推荐答案

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

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

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

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

vm.max_map_count = 128000

max_map_count 数默认为 65530,如有必要,可以增加到 MAX_INT.

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天全站免登陆