本文介绍了如何确定“总线错误”的原因?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有yocto发行版和python 2.7.3的方板。

I'm working on a variscite board with a yocto distribution and python 2.7.3.

有时我从python解释器中收到一条 Bus错误消息。

我的程序正常运行至少几个小时或错误发生前几天。

但是一旦我得到它,当我尝试重新启动程序时我就直接得到了它。

我必须重新引导,然后系统才能再次工作。

I get sometimes a Bus error message from the python interpreter.
My program runs normally at least some hours or days before the error ocours.
But when I get it once, I get it directly when I try to restart my program.
I have to reboot before the system works again.

我的程序仅使用一个串行端口,一点USB通信和一些tcp套接字。

My program uses only a serial port, a bit usb communication and some tcp sockets.

我可以切换到其他硬件,并且遇到相同的问题。

I can switch to another hardware and get the same problems.

我也将python自检与

python -c from test import testall一起使用了

I also used the python selftest with
python -c "from test import testall"

这两个测试都出错了

和自检始终停留在

但是,当系统运行几个小时后,自检会更早地终止于

But when the systems runs some hours the selftests stops earlier at

我用memtester检查了RAM,看来还可以。

如何找到问题的原因?

I checked the RAM with memtester, it seems to be okay.
How I can find the cause for the problems?

推荐答案

总线错误通常是由尝试访问应用程序引起的记忆力不能实际解决。在您的情况下,存在分段错误,这可能会导致取消引用错误的指针或类似的操作,从而导致访问物理上无法寻址的内存地址。我会首先从根本上引起分段错误,因为总线错误是第二种症状。

Bus errors are generally caused by applications trying to access memory that hardware cannot physically address. In your case there is a segmentation fault which may cause dereferencing a bad pointer or something similar which leads to accessing a memory address which physically is not addressable. I'd start by root causing the segmentation fault first as the bus error is the secondary symptom.

这篇关于如何确定“总线错误”的原因?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 19:17
查看更多