单声道 SIGSEGV 崩溃,没有堆栈跟踪信息



我有一个用 C# 实现的机器学习算法(随机梯度下降),它涉及在内存中缓存的 ~10GB 数据上进行 100 次迭代。该程序在 windows 下运行良好,但是当部署到 ubuntu 14.04.2 LTS运行mono 3.12.1时,程序在 ~30 次迭代(大约需要一天)后随机崩溃,输出如下:

Stacktrace:

Native stacktrace:
mono() [0x4accac]
mono() [0x50451f]
mono() [0x42a7c7]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0) [0x7f678b0d1cb0]
mono() [0x61c48f]
mono() [0x5cdfe6]
mono() [0x5dd95a]
mono() [0x5dd9bc]
mono() [0x5d0ff4]
mono() [0x5c7458]
mono() [0x5c765f]
mono() [0x5c8d6a]
mono() [0x5c980a]
mono() [0x5ccc15]
mono() [0x5d2ab0]
mono() [0x5dfb70]
mono() [0x5dffeb]
[0x4196f62e]
Debug info from gdb:
Could not attach to process.  If your uid matches the uid of the target process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf ptrace: Operation not permitted.
No threads.
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================
  1. 如何获取有关堆栈跟踪的更详细信息(例如,崩溃的实际行),以便查明崩溃的原因?

  2. 如何从 gdb 获取详细的调试信息(而不是无法附加到进程错误)?

该程序使用命令运行 nohup mono MyProgram.exe &

非托管崩溃是单运行时错误,请在 https://github.com/mono/mono/issues/new 中提交一份票证,其中包含有关如何重现问题的最小测试用例。

这是黑暗中的一枪,但也许你可以用这样的东西明确设置更大的内存限制,

MONO_GC_PARAMS max-heap-size=10G

以确保您没有达到某些内存限制。

最新更新