2

I am running the newest version Linux raspberrypi 4.1.10-v7+ #820 SMP PREEMPT Sun Oct 4 16:26:51 BST 2015 armv7l GNU/Linux on an RPi 2,

And when I read the temperature pf the CPU though any method my system eventually completely crashes.

I've tried cat /sys/class/thermal/thermal_zone0/temp and vcgencmd measure_temp and I even tried a python script like this:

f=open("/sys/class/thermal/thermal_zone0/temp")
while True:
    f.seek(0)
    temp=f.read()
    #do something

but they all eventually crash my RPi so bad that all of the lights (ACT and PWR) and my wifi card LED just stay on, no flashing nothing. After that I can just unplug it, plug it back in, and be good to go.

Is there any fix for this? A way to prevent it?

  • Do you have Jessie or Wheezy? – Kachamenus Oct 7 '15 at 3:45
  • Hmmm.... never heard of anything like this. Just curious, do you have the luxury to download NOOBS again (or just raspbian) and install it on the Pi again? If not, just try: Sudo apt-get update Sudo apt-get upgrade Then try it again. My reasoning was you just ran into a bug. If you're using Jessie, well Raspbian Jessie is relatively new. You can report the bug here. – Kachamenus Oct 7 '15 at 3:47
  • @Shojan I am using Wheezy, and I just updated yesterday. Also this is a very common bug. – Patrick Cook Oct 7 '15 at 4:19
  • Are you consuming a resource you are not releasing in do something? – joan Oct 7 '15 at 7:47
  • 1
    @Jacobm001 Yah, I read up on it and its just a problem with Debian Linux. – Patrick Cook Jan 1 '16 at 7:31
0

Nearly three years later, I'm answering this question even though I answered it in the comments and this is a dead operating system:

According to a discussion on the raspberry pi forums, this is simply a problem with the OS. Since the system itself reads the temperature every so often for various purposes, it becomes increasingly likely with time that my script and the system will try to access the temperature file at the same time, causing it to hang.

So, in short, not a fixable issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.