简体   繁体   English

无法写入核心转储。 核心转储已被禁用

[英]Failed to write core dump. Core dumps have been disabled

I've been working on a vision project and using some C++ libraries in Java by JNI.我一直在从事一个视觉项目,并在 JNI 的 Java 中使用一些 C++ 库。

OS: Ubuntu 12.04操作系统: Ubuntu 12.04

In my project, I'm using boost library to generate random number.在我的项目中,我使用boost库来生成随机数。 But sometimes I get an exception as follows:但有时我会遇到如下异常:

Core dum140002367330048 also had an error]
#
# A fatal error has been detected by the Java Runtime Environment:    
#
#  SIGSEGV (0xb) at pc=0x00007f54f72a615a, pid=11979, tid=140002352568064
#
# JRE version: Java(TM) SE Runtime Environment (7.0_67-b01) (build 1.7.0_67-b01)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.65-b04 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libCBIR.so+0x3215a]  boost::random::mersenne_twister_engine<unsigned int, 32ul, 624ul, 397ul, 31ul, 2567483615u, 11ul, 4294967295u, 7ul, 2636928640u, 15ul, 4022730752u, 18ul, 1812433253u>::operator()()+0x3a
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again

When I searched for this on StackOverflow, I found some issues related to the IDE (Eclipse).当我在 StackOverflow 上搜索这个时,我发现了一些与 IDE (Eclipse) 相关的问题。 The application is independent of the IDE.该应用程序独立于 IDE。 So, the solution must be independent from the IDE, too.因此,该解决方案也必须独立于 IDE。 Any ideas?有任何想法吗?

I was experiencing the same issue. 我遇到了同样的问题。

As, the error itself suggests - 因为,错误本身暗示 -

Failed to write core dump. 无法编写核心转储。 Core dumps have been disabled. 核心转储已被禁用。 To enable core dumping, try ulimit -c unlimited before starting Java again 要启用核心转储,请在再次启动Java之前尝试ulimit -c unlimited

ulimit gets and sets user limits. ulimit获取并设置用户限制。 For more info on ulimit do - 有关ulimit do的更多信息 -

man ulimit

So, open a terminal and run - 所以,打开一个终端并运行 -

ulimit -c unlimited

This should solve the problem. 这应该可以解决问题。 To check if the change was successful, run - 要检查更改是否成功,请运行 -

ulimit -c -l

This should give you an output as follows - 这应该给你一个输出如下 -

core file size          (blocks, -c) unlimited
max locked memory       (kbytes, -l) 64

If the problem persists refer to this and this from askUbuntu . 如果问题仍然存在,请参阅askUbuntu中的 thisthis

For anyone seeing this issue from within Jenkins (as we are): To enable core dumps from jenkins, edit /etc/init.d/jenkins and add "--core" to $DAEMON_ARGS. 对于任何在Jenkins中看到此问题的人(就像我们一样):要从jenkins启用核心转储,请编辑/etc/init.d/jenkins并将“--core”添加到$ DAEMON_ARGS。 Setting ulimit directly from the shell script or via /etc/security/limits.conf will not work. 直接从shell脚本或通过/etc/security/limits.conf设置ulimit将不起作用。

A core dump or a crash dump is a memory snapshot of a running process. 核心转储或故障转储是正在运行的进程的内存快照。 A core dump can be automatically created by the operating system when a fatal or unhandled error (for example, signal or system exception) occurs. 当发生致命或未处理的错误(例如,信号或系统异常)时,操作系统可以自动创建核心转储。

for more info https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/bugreports004.html 更多信息https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/bugreports004.html

In my case, this error occured because I used the wrong Java version for my project.就我而言,发生此错误是因为我为我的项目使用了错误的 Java 版本。 I was supposed to use Java 11, and I used Java 8 instead.我应该使用 Java 11,而我使用 Java 8 代替。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Eclipse(C ++)崩溃无法编写核心转储。 核心转储已被禁用 - Eclipse (C++) crash Failed to write core dump. Core dumps have been disabled 如何修复“无法编写核心转储。 运行java时,核心转储已被禁用“错误 - how to fix “Failed to write core dump. Core dumps have been disabled” error while running java Java运行时环境检测到一个致命错误:无法写入核心转储。 核心转储已被禁用 - A fatal error has been detected by the Java Runtime Environment:Failed to write core dump. Core dumps have been disabled 无法写入核心转储。 核心转储已被禁用。 要启用核心转储,请在再次启动Java之前尝试“ ulimit -c unlimited” - Failed to write core dump. Core dumps have been disabled. To enable core dumping, try “ulimit -c unlimited” before starting Java again mac m1 无法写入核心转储。 核心转储已被禁用。 要启用核心转储,请在再次启动 Java 之前尝试“ulimit -c unlimited” - mac m1 Failed to write core dump. Core dumps have been disabled. To enable core dumping, try “ulimit -c unlimited” before starting Java again Tomcat使用“无法编写核心转储”崩溃Eclipse Kepler。 - Tomcat crashes Eclipse Kepler with “Failed to write core dump.” 无法编写核心转储。 默认情况下,Eclipse中的客户端版本的Windows未启用Minidump - Failed to write core dump. Minidumps are not enabled by default on client versions of Windows in Eclipse 无法写入核心转储。 默认情况下,在Windows客户端版本上不启用小型转储,而从Java调用dll - Failed to write core dump. Minidumps are not enabled by default on client versions of Windows, while callin dll from java 无法编写核心转储。默认情况下,在客户端版本的Windows上未启用小型转储 - Failed to write core dump. Minidumps are not enabled by default on client versions of Windows 无法写入核心转储。 默认情况下,客户端版本的 Windows 不启用小型转储 - Failed to write core dump. minidumps are not enabled by default on client version of windows
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM