AndersUk
Posts: 9
Joined: Wed Mar 07, 2012 8:41 am
Contact: Website

Raspbian Stretch goes AWOL

Thu Aug 30, 2018 6:48 pm

Hello all, hoping someone might be able to point me in the right direction:


TL;DR: Raspbian Stretch running on Raspberry Pi Zero W, running 24/7, every so after (once or twice every couple of days) goes into hibernation for an hour or so. I'm trying to find out what it causing this and asking it very nicely to pack it in.


Bit of a head scratcher for me this one: I'm running a Raspberry Pi Zero W as a headless device - running scripts every minute. It's on the latest version of Stretch, with a stable firmware (as far as I can tell) However every now and then it (for want of a better word) goes into hibernation: it goes offline, doesn't response to pings, stops running the scripts, but remains powered on (green light on an solid) After a little while iit snaps out of it, connect's to the WiFi and starts working normally. It doesn't reboot as the up time counter doesn't reset.

Checking the syslog I can see it working up to a point, then there's a large jump in time for the next entry.

I'm running scripts via CRON and also systemctl and both appear to just stop.

I've set this in /etc/rc.local:

Code: Select all

/sbin/iw dev wlan0 set power_save off

If anyone has any suggestions on where to look for clues or how to get more clues I'd be most grateful.

Thanks in advance
Andi

Details:

Code: Select all

OS Version: Linux 4.14.62+ #1134 Tue Aug 14 16:58:07 BST 2018 armv6l GNU/Linux
Firmware: 31e0613622dc2f2463bf3dd74e6c897d91201a4d (clean) (release)
Debian version: 9.4
Revision: 9000c1

pcmanbob
Posts: 7060
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Raspbian Stretch goes AWOL

Thu Aug 30, 2018 11:34 pm

I think the clue here is " (green light on an solid) "

To me this would indicate the pi is reading/writing to the SD card a lot, and while its doing this possibly due to something in your running programs, it stops doing anything else, which is why once this read/write is completed your pi just carries on working as normal.

So you need to look at your running programs and see if there is anything that could cause a long " hour or so " read or write to the SD card, you may get a clue if you connect a monitor and keyboard and run top at the command line to see which program is using the most cpu time when the freeze happens.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
davidcoton
Posts: 4176
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Raspbian Stretch goes AWOL

Fri Aug 31, 2018 7:29 am

pcmanbob wrote:
Thu Aug 30, 2018 11:34 pm
I think the clue here is " (green light on an solid) "

To me this would indicate the pi is reading/writing to the SD card a lot, and while its doing this possibly due to something in your running programs, it stops doing anything else, which is why once this read/write is completed your pi just carries on working as normal.

So you need to look at your running programs and see if there is anything that could cause a long " hour or so " read or write to the SD card, you may get a clue if you connect a monitor and keyboard and run top at the command line to see which program is using the most cpu time when the freeze happens.
Pi 0. Only one LED for power and activity. So actually power on but no activity (unless the LED is in a different mode to what I'm used to :o ).
Signature retired

pcmanbob
Posts: 7060
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Raspbian Stretch goes AWOL

Fri Aug 31, 2018 9:10 am

[quote=davidcoton post_id=1359749 time=1535700590 user_id=119265
Pi 0. Only one LED for power and activity. So actually power on but no activity (unless the LED is in a different mode to what I'm used to :o ).
[/quote]

OK so it was late and I was working from memory, you are correct LED is on all the time and only flashes when accessing the SD card,
but actually checking to see what the pi is doing when it fails using a screen and top might actually still give a clue as to the problem.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

AndersUk
Posts: 9
Joined: Wed Mar 07, 2012 8:41 am
Contact: Website

Re: Raspbian Stretch goes AWOL

Fri Aug 31, 2018 6:49 pm

Thank you for you thoughts. I have plugged it into a screen and keyboard before, however it's shared screen/keyboard and I couldn't leave it long enough to spot the fault. I'll try again over the weekend.

I'll also check my scripts to ensure they're not looping to tightly and thus crippling the device.

I'll report back my findings. Thanks!

Return to “Troubleshooting”