Posts: 28
Joined: Tue Apr 05, 2016 5:42 am

Raspberry seems to crash, but I don't find the reason

Tue Sep 18, 2018 5:43 am

Hi all
My Raspberry Pi seems to try to reboot from time to time (very randomly) but seems not to be able to complete the booting sequence, since it is not available via SSH after that happens. The only way to make it available again is to power cycle the system.

I believe, something happened with my MariaDB installation a few days ago, while I terminated my application, because I wasn't able to start the Raspberry Pi again, until I repaired the databases and flushed privileges for MariaDB. I thought, that my MariaDB got corrupt. But since then, everything seems to work fine, but from time to time, the Raspberry Pi just stops reacting.

I tried to find some information in the logfiles in /var/log but I didn't find that much. I know, that the raspberry pi stopped working last night at 01:17am, and I didn't find any information in the logs which would help debugging. But the MariaDB log says the following:

Code: Select all

2018-09-18  0:17:16 1988608000 [Note] InnoDB: Starting crash recovery from checkpoint LSN=38015703
2018-09-18  0:17:16 1988608000 [Note] InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
2018-09-18  0:17:16 1988608000 [Note] InnoDB: Recovered page 31:738 from the doublewrite buffer.
2018-09-18  0:17:17 1988608000 [Note] InnoDB: Starting final batch to recover 7 pages from redo log
2018-09-18  0:17:18 1988608000 [Note] InnoDB: 128 rollback segment(s) are active.
2018-09-18  0:17:18 1988608000 [Note] InnoDB: Waiting for purge to start
2018-09-18  0:17:18 1988608000 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.35-80.0 started; log sequenc$
2018-09-18  0:17:18 1438643008 [Note] InnoDB: Dumping buffer pool(s) not yet started
2018-09-18  0:17:18 1988608000 [Note] Plugin 'FEEDBACK' is disabled.
2018-09-18  0:17:18 1988608000 [Note] Recovering after a crash using tc.log
2018-09-18  0:17:18 1988608000 [Note] Starting crash recovery...
2018-09-18  0:17:18 1988608000 [Note] Crash recovery finished.
2018-09-18  0:17:18 1988608000 [Note] Server socket created on IP: ''.
2018-09-18  0:17:18 1988608000 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.1.23-MariaDB-9+deb9u1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Raspbian 9.0
In the other logs, I just see, that the raspberry did boot at the same time, but I have no idea why. And then, this morning, the Raspberry wasn't reachable via SSH. So I had to switch the power off and on again, now it works again.

Is there any other log I can overlook to find out, what actually happened? And why the raspberry isn't available anymore, when this happens?

The last line of the boot.log says:

Code: Select all

[^[[0;32m  OK  ^[[0m] Started Permit User Sessions.
         Starting Terminate Plymouth Boot Screen...
         Starting Hold until boot process finishes up...
Is this normal, that "hold until finished" is the last line?

Since dmesg does only show the last boot sequence, does it save it's contents anywhere else for boot sequences before the last one?

The last messages in /var/log/messages before it did a reboot:

Code: Select all

Sep 17 22:06:40 TerraPI kernel: [   12.034480] Bluetooth: BNEP filters: protocol multicast
Sep 17 22:06:40 TerraPI kernel: [   12.034493] Bluetooth: BNEP socket layer initialized
Sep 18 00:17:03 TerraPI mtp-probe: checking bus 1, device 4: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1$
Sep 18 00:17:03 TerraPI mtp-probe: bus: 1, device: 4 was not an MTP device
Sep 18 00:17:03 TerraPI mtp-probe: checking bus 1, device 4: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1$
Sep 18 00:17:03 TerraPI mtp-probe: bus: 1, device: 4 was not an MTP device
Sep 18 00:17:03 TerraPI kernel: [    0.000000] Booting Linux on physical CPU 0x0
Sep 18 00:17:03 TerraPI kernel: [    0.000000] Linux version 4.14.50-v7+ ([email protected]) (gcc version 4.9.3 (cros...
Thanks for any hint.

EDIT: Maybe, this is also interesting. Most time I manually reboot the Raspberry from the shell and try to connect via SSH after some time, it says ssh: connect to host x.x.x.x port 22: Connection refused (where x.x.x.x is the RPI's actual IP of course)

User avatar
Posts: 2764
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Raspberry seems to crash, but I don't find the reason

Tue Sep 18, 2018 9:06 am

If you have recently updated and have Bluetooth turned off, try turning it back on. I don't know why your Pi is rebooting periodically, but the latest kernel fails on shutdown with a kernel panic when Bluetooth is off, so that could be what's preventing your Pi from rebooting.

You could either try turning Bluetooth back on, or rolling back to the last stable kernel/firmware release with the following command.

Code: Select all

sudo rpi-update 911147a3276beee09afc4237e1b7b964e61fb88a
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

Return to “Troubleshooting”

Who is online

Users browsing this forum: ahmed24, Bing [Bot], Google [Bot] and 63 guests