1

I am using a BeagleBone running Debian. I have a cron entry in /etc/crontab which tells the device to reboot at 03:01 every night as follows

00 03    * * *   root    /sbin/shutdown -r +1 >> /home/my.log 2>&1

This has worked perfectly for many months. The device shutdown and rebooted at 03:01 as expected.

However now, the device shuts down at 03:01, but the reboot doesn't happen until many hours later. In the case of today, it shut down at 03:01 but didn't actually reboot until 12:35:28, over 9.5 hours later.

With command last reboot , here is the response :

reboot   system boot  4.14.71-ti-r80   Sat Aug 17 12:35   still running
reboot   system boot  4.14.71-ti-r80   Fri Aug 16 08:58 - 03:01  (18:02)
reboot   system boot  4.14.71-ti-r80   Thu Aug 15 07:29 - 03:01  (19:31)
reboot   system boot  4.14.71-ti-r80   Wed Aug 14 04:41 - 03:01  (22:19)
reboot   system boot  4.14.71-ti-r80   Tue Aug 13 08:27 - 03:01  (18:33)
reboot   system boot  4.14.71-ti-r80   Mon Aug 12 09:37 - 03:01  (17:23)

When I check journalctl -b , here is the response :

Aug 17 12:35:28 beaglebone kernel: Booting Linux on physical CPU 0x0
Aug 17 12:35:28 beaglebone kernel: Linux version 4.14.71-ti-r80 (root@b2- 
am57xx-beagle-x15-2gb) (gcc version 6.3.0 20170516 (Debian 6.3.
Aug 17 12:35:28 beaglebone kernel: CPU: ARMv7 Processor [413fc082] revision 
2 (ARMv7), cr=10c5387d
Aug 17 12:35:28 beaglebone kernel: CPU: PIPT / VIPT nonaliasing data cache, 
VIPT aliasing instruction cache
Aug 17 12:35:28 beaglebone kernel: OF: fdt: Machine model: TI AM335x 
BeagleBone Black

What can be causing this issue? I am finding it very hard to diagnose. Thanks

  • This could be caused by a hanging service or some sort, could you attach a UART console and see what it said when it's trying to reboot? – SandPox Aug 17 at 13:49
  • @SandPox Thanks for your reply. I don't actually have physical access to the device. It is deployed somewhere connected to a cellular modem for communication, so I can only reverse SSH into it. When you say a hanging service, do you mean when it is shutting down? – Engineer999 Aug 17 at 13:54
  • Yes, when you try to reboot manually, does such thing happen? (reboot taking a long time) – SandPox Aug 17 at 13:57
  • @SandPox I'm afraid to try it now in case it will go dark again for another 9 hours or so :) I'm thinking to change the command in /etc/crontab to "00 03 * * * root sync && /sbin/reboot >> /home/my.log 2>&1 " Or is there a way I can forcefully stop all services – Engineer999 Aug 17 at 14:00
  • The sync command won't work because when you shutdown then it already does a sync and I don't think it's because of write cache takes 9hrs to flush. This may be caused by a misconfigured systemd service having an infinite stop timeout or some number that's really high (like 9.5hrs), have a look here: unix.stackexchange.com/questions/227017/… also if you desperately need to reboot, you could try echo 1 > /proc/sys/kernel/sysrq echo b > /proc/sysrq-trigger, be careful with that because it won't sync anything, you'll lose unsaved data – SandPox Aug 17 at 14:04

Your Answer

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

Browse other questions tagged or ask your own question.