简体   繁体   English

总线错误的可能原因:不存在的物理地址

[英]A possible cause of Bus Error: Nonexistent physical address

This is not a question, but rather an answer for a question I couldn't find here before.这不是一个问题,而是一个我以前在这里找不到的问题的答案。

I had an application that kept crashing with the message 'Bus error'.我有一个应用程序不断崩溃并显示“总线错误”消息。 This happened non-deterministically in different parts of my code, usually after a long running time.这在我的代码的不同部分不确定地发生,通常是在长时间运行之后。 The only hint was the associated si_code, was 'BUS_ADRERR: Nonexistent physical address'.唯一的提示是关联的 si_code,是“BUS_ADRERR:不存在的物理地址”。

The reason for the crash is that I would re-compile the code, thus messing up the memory mapping for the executable file.崩溃的原因是我会重新编译代码,从而弄乱了可执行文件的 memory 映射。

I was running two Rscripts with different parameters simultaneously.我同时运行两个具有不同参数的 Rscript。 The script at one point writes to and then subsequently reads from a file.脚本在某一时刻写入文件,然后从文件中读取。 I believe I got this error code from both scripts trying to write and read from the same file simultaneously.我相信我从试图同时从同一个文件写入和读取的两个脚本中得到了这个错误代码。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM