RPi hangs/freeze randomly: how to find out the causes??!

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

RPi hangs/freeze randomly: how to find out the causes??!

Postby ivanhoe1024 » Mon Mar 03, 2014 10:36 pm

Hi everybody, I'm an enthusiast arch user on my Raspberry Pi. I have some difficulties, I hope someone can help me.

My setup consists of a Raspberry (of course), with a 8 GB sd card, a 512M swapfile, default config.txt, ethernet as web source, and a 3.5" powered HDD with a 80 gb ntfs partition.
It usually runs a samba server with which I share the ntfs partition with both Mac and Windows PCs, a torrent program (transmission or deluge), sometimes sick beard, and of course SSH (it's a headless setup). It's updated to the latest packages, the kernel version is 3.10.32 right now.
My problem is that it hangs all of a sudden, and freezes. I can not load the web interfaces, use samba, or connect via ssh, but I can still ping it for a while. After some minutes I can neither ping it, and I have to unplug the power and re-plug it.

Does anyone have an idea of what could be the causes?? Could it be a problem related to long times in idle state? I know it complicated to find out the matter, but can anyone help me find out the appropriate logs in which I could find some useful information? I tried $this->bbcode_second_pass_code('', 'journalctl -k -b -1') but it seems that the last boot, in its opinion, is in feb the 20th (impossible!! :shock: ), or a simple $this->bbcode_second_pass_code('', 'journalctl -r') but I can not find error messages between a reboot and another...

If anybody can help me, I will really appreciate it!!! :D :D
ivanhoe1024
 
Posts: 17
Joined: Mon Mar 03, 2014 10:12 pm

Re: RPi hangs/freeze randomly: how to find out the causes??!

Postby sdjf » Thu Mar 06, 2014 8:00 am

The logs should be in /var/log, but seem to have gotten removed from the more recent images. I never got it working to add them, am using and updated older image.

And I have struggled with the same problem, although with a different hardware configuration on a model B and have not yet figured out a way to figure out what causes the Pi to totally freeze with no warning. I can tell you that when the logs are running, they also totally stop recording anything, and I see absolutely nothing in them, indicating what could be the culprit. And spent many an hour studying all of them - errors.log, messages.log, kernel.log, everything.log, and whatever else I concocted to add debugging output I could look at when the next shutdown happens. But it usually happens for me when I am on the web and the Pi is doing a lot, only once did it happen (as far as I can tell) when there was no activity.

What is weird is that with the latest crashes, it has not been a total freeze, I have lxpanel and it has a CPU usage indicator graph, and that keeps merrily on it's way even though I cannot get anything to happen. So those are a different kind of crash, scratching my head.
sdjf
 
Posts: 178
Joined: Wed May 08, 2013 1:55 pm

Re: RPi hangs/freeze randomly: how to find out the causes??!

Postby pepedog » Thu Mar 06, 2014 10:12 am

swap on sd card is bad idea. Also I recommend this
Look at how card is parted with fdisk, get another card and partition and format
Grab the root and boot tars http://os.archlinuxarm.org/os/rpi/
Mount and extract to new card
Edit cmdline.txt and fstab
This way you are not forcing settings on a card that is unnatural to the card
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: RPi hangs/freeze randomly: how to find out the causes??!

Postby ivanhoe1024 » Thu Mar 06, 2014 5:35 pm

Thank you all for your reply!
I already changed SD card (from a 2gb to a 8gb one), I changed FS type on the external HDD (from exFAT to ntfs), I changed torrent program (transmission-cli or deluge-web), I used the pi over clocked (only modest) and at normal clock, I added the swap file only recently, I did not use it until one or two weeks ago... I really can not say what is the problem...

PS. In the last 3 days I tried to stop the torrent service, that usually kept in seed at max 3/4 torrents, and it seems not to freeze, (I also tried to enhance the cooling of the Pi...) It's strange because I changed, like I said, torrent program (I used even rtorrent!!)... But the thing that makes me angry the most is the total absence of a useful log!!!! :evil: :evil:
ivanhoe1024
 
Posts: 17
Joined: Mon Mar 03, 2014 10:12 pm

Re: RPi hangs/freeze randomly: how to find out the causes??!

Postby pepedog » Thu Mar 06, 2014 7:06 pm

$this->bbcode_second_pass_code('', 'systemctl enable syslog-ng')
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: RPi hangs/freeze randomly: how to find out the causes??!

Postby tikidollracer » Fri Mar 07, 2014 3:51 pm

how much memory are you using?
tikidollracer
 
Posts: 16
Joined: Sun Feb 02, 2014 4:38 am

Re: RPi hangs/freeze randomly: how to find out the causes??!

Postby ivanhoe1024 » Fri Mar 07, 2014 3:55 pm

$this->bbcode_second_pass_code('', 'free -h') gives me:

$this->bbcode_second_pass_code('', ' total used free shared buffers cached
Mem: 462M 126M 335M 324K 11M 38M
-/+ buffers/cache: 76M 386M
Swap: 511M 0B 511M')
ivanhoe1024
 
Posts: 17
Joined: Mon Mar 03, 2014 10:12 pm

Re: RPi hangs/freeze randomly: how to find out the causes??!

Postby WarheadsSE » Fri Mar 07, 2014 4:09 pm

462 - (335+38) = 89MB in actual use.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: RPi hangs/freeze randomly: how to find out the causes??!

Postby tikidollracer » Sat Mar 08, 2014 2:41 am

yes, but the pi is reserving 256M for the gpu. it's possible you're peaking over at high use causing a freeze.
tikidollracer
 
Posts: 16
Joined: Sun Feb 02, 2014 4:38 am

Re: RPi hangs/freeze randomly: how to find out the causes??!

Postby ivanhoe1024 » Sat Mar 08, 2014 1:42 pm

I tried to change the gpu ram in config.txt but the Pi is unable to boot with whatever value I set except the default ones... It's the reason that induced me to make a swapfile, just to see if things would change.

PS. I noticed that my Pi was quite hot (I have a case on it). I'm trying to cool it leaving it on its side, to enhance the air flow... Right now it's running samba, transmission, sickbeard, and it seems not to freeze! I don't want to declare victory too soon, but it could be the cause of my trouble.
Is there a way to use lm-sensors or similar? I would like to ask you before to try, just to avoid adding other problems...
ivanhoe1024
 
Posts: 17
Joined: Mon Mar 03, 2014 10:12 pm

Next

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 2 guests