4

My Raspberry Pi 3 Model B freezes randomly. This as been going on since I got it, about 4 months ago. It sometimes freezes on reboot causing reboot loops. It freezes on Chromium when all that's open is 1 Chromium tab. The CPU has 100% usage, when only a single Chromium tab is open in the foreground. Every time it freezes I only have one apparent option — To pull the plug. However based on This post, pulling the plug can corrupt the SD card. I have tried so far:

  • Check the system log — Nothing out of line.
  • Re flash the image — Didn't work.

  • Check for background processes — the only way I know is CTRL+ALT+DEL like in Windows's Task manager system — I didn't find anything that seemed off to me though.

  • Look for known errors on GitHub and search through the Raspberry Pi Stack Exchange — found nothing pertaining to the actions of my error.

If this helps anyone help me solve this issue:


  • I am running an Apache 2 server on port 80

  • Lighttpd on port 8888

  • Nginx on port 8976

Any other ideas or possibilities? Is it at all possible to fix this? I can not just force stop something because it froze.

Updated and additional information:

  • The Pi freezes sometimes on other operating systems. I have OSMC and Raspbian, they are more common on Raspbian but still happen on OSMC.
  • The CPU seems to overheat as well for some reason, it does say 100% CPU full, but from what? Only one Chromium tab is running in the foreground. The PI is hot to the touch. I do have 2 heat sinks on it as well.

    Update: Example when it is frozen: 1 termanal window, thats not even running code right now:

Example of when my pi frezes!

4

I/O failure is a common cause of this; processes suffering from such are stuck in an uninterruptible sleep.

If this is widespread and includes critical processes, the entire system will stutter and stall -- although from a GUI perspective this may be exaggerated in that it is mostly the GUI that is stalling.

Such processes can be identified with diagnostic tools like ps and top since their state will be indicated as D. Of course, that's hard to do if the user interface has become unresponsive, but presuming the system log itself is working, there should be copious evidence left referring to I/O errors with a block device (e.g., on the pi, /dev/mmcblk0p2).

Although it can't be done decisively with an SD card device as it can with a spinning disk, you should try putting the card in another computer and running:

e2fsck -cvf /dev/[whatever]

Where [whatever] refers to the root filesystem on the card, generally the second partition.

The -c flag will do a read check on each block. With an SD card this is abstract (which is why it is not decisive as with a spinning disk), so you cannot prove the card is good, but you can prove that the card is bad. This may be via direct reporting from e2fsck, or it may be because e2fsck gets stuck in a D state; run top -p/-C to monitor it and check it occasionally.

1

According the official doc

The Raspberry Pi 3 is powered by a +5.1V micro USB supply. Exactly how much current (mA) the Raspberry Pi requires is dependent on what you connect to it. We have found that purchasing a 2.5A power supply from a reputable retailer will provide you with ample power to run your Raspberry Pi.

Please check whether your power supply is powerful enough.

  • my power supply is 2.5A from kanakit – User98764431 Nov 2 '17 at 19:20
  • 1
    I have Canakit 5V 2.5A supplies and they're the best ones I've found in the sense that I've had contexts drawing a lot of current and they were the only ones which worked, out of a pile of 4 or 5 different kinds. So you are probably good there. – goldilocks Nov 2 '17 at 19:28
  • Raspberry pi works fine with 2.5 Amp. But 3.0 A is officially recommended – Sohan Arafat Oct 8 at 19:22

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.