Hanging on Reboot/shutdown odroid c2

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
bobokun

Hanging on Reboot/shutdown odroid c2

Post by bobokun »

I've been using dietpi for the past few months and I've done a lot of work installing a lot of programs and setting up different software on my odroid c2. Whenever I reboot or shutdown it just hangs and I have to manually unplug the power to reboot the odroid. It would be a lot of work to set everything up from scratch again so I was wondering if there was a way to debug and figure out through logs what is causing my odroid to hang when shutting down/rebooting. I am root when executing the command.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Hanging on Reboot/shutdown odroid c2

Post by Fourdee »

bobokun wrote:I've been using dietpi for the past few months and I've done a lot of work installing a lot of programs and setting up different software on my odroid c2. Whenever I reboot or shutdown it just hangs and I have to manually unplug the power to reboot the odroid. It would be a lot of work to set everything up from scratch again so I was wondering if there was a way to debug and figure out through logs what is causing my odroid to hang when shutting down/rebooting. I am root when executing the command.
Hi,

When it hangs, is there any text on the main screen (take a picture of monitor) or serial connection? It may provide some clues.

Can you also paste results of the following commands please:

Code: Select all

uname -a
cat /DietPi/dietpi/.version
To debug with log files, first, you will need to change Ramlog to Full logging: http://dietpi.com/phpbb/viewtopic.php?f ... art=20#p68
Once thats done, do a reboot, power back on and then send the contents of /var/log/* to daniel.knight@dietpi.com so I can investigate.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
bobokun

Re: Hanging on Reboot/shutdown odroid c2

Post by bobokun »

Thank you for the quick response.

When rebooting the system from SSH it just hangs. Take this for example I used dietpi-software to enable full logging and while I applied that it just hangs
showing me this screen
Image

Closing the SSH session window and trying to SSH back into the system shows me this
Image

That's when I cut the power and plug it back in to boot it up again.

Running the commands give me these results

Code: Select all

root@Odroid ~ # uname -a
Linux Odroid 3.14.65+ #1 SMP PREEMPT Thu Jul 14 07:59:44 CEST 2016 aarch64 GNU/Linux
root@Odroid ~ # cat /DietPi/dietpi/.version
128
I have emailed you the logs. Thanks so much for taking the time to investigate the issue
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Hanging on Reboot/shutdown odroid c2

Post by Fourdee »

bobokun wrote: When rebooting the system from SSH it just hangs. Take this for example I used dietpi-software to enable full logging and while I applied that it just hangs

Closing the SSH session window and trying to SSH back into the system shows me this
[/code]

I have emailed you the logs. Thanks so much for taking the time to investigate the issue
Hi,

Thanks for sending the logs. Looks like Couchpotato is failing to start:

Code: Select all

Aug 12 19:10:33 Odroid couchpotato[698]: file: /opt/CouchPotato/settings.conf, line: 1
Aug 12 19:10:33 Odroid couchpotato[698]: 0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
Aug 12 19:10:33 Odroid systemd[1]: couchpotato.service: control process exited, code=exited status=1
Aug 12 19:10:33 Odroid systemd[1]: Failed to start LSB: CouchPotato PVR for Usenet and torrents.
Aug 12 19:10:33 Odroid systemd[1]: Unit couchpotato.service entered failed state.
I'am just wondering if the device is waiting for a service to terminate during the shutdown phase. Most likely that service/process isn't responding, possibly hanging the system.

When rebooting or shutting down, is there any output on the main screen? (eg: plug a monitor in)
Usually it will display status of the shutdown and may give us a clue.

Going from the Putty error, it appears the network is being dropped. Network drop is late in the shutdown procedure, so this indicates the issue is possibly one of last system services.

Your kernel is outdated, might also be worth updating that:

Code: Select all

apt-get update
apt-get dist-upgrade # Say OK if a box pops up to overwrite the existing kernel.
Strangely, Rsyslog looks fine.

Code: Select all

Aug 12 19:11:44 Odroid systemd[1]: Started Synchronise Hardware Clock to System Clock.
Aug 12 19:11:44 Odroid systemd[1]: Stopping system-ifup.slice.
Aug 12 19:11:44 Odroid systemd[1]: Removed slice system-ifup.slice.
Aug 12 19:11:44 Odroid systemd[1]: Stopping Sound Card.
Aug 12 19:11:44 Odroid systemd[1]: Stopped target Sound Card.
Aug 12 19:11:44 Odroid systemd[1]: Stopping system-systemd\x2dfsck.slice.
Aug 12 19:11:44 Odroid systemd[1]: Removed slice system-systemd\x2dfsck.slice.
Aug 12 19:11:44 Odroid systemd[1]: Stopping LSB: Start/stop fail2ban...
Aug 12 19:11:44 Odroid systemd[1]: Stopping LSB: Start/stop noip2...
Aug 12 19:11:44 Odroid systemd[1]: Stopping LSB: Start and stop the mysql database server daemon...
Aug 12 19:11:44 Odroid systemd[1]: Stopping The PHP FastCGI Process Manager...
Aug 12 19:11:44 Odroid noip2[1589]: v2.1.9 daemon ended.
Aug 12 19:11:44 Odroid systemd[1]: Stopping Lighttpd Daemon...
Aug 12 19:11:44 Odroid systemd[1]: Stopping Regular background program processing daemon...
Aug 12 19:11:44 Odroid systemd[1]: Stopping Graphical Interface.
Aug 12 19:11:44 Odroid systemd[1]: Stopped target Graphical Interface.
Aug 12 19:11:44 Odroid systemd[1]: Stopping Multi-User System.
Aug 12 19:11:44 Odroid systemd[1]: Stopped target Multi-User System.
Aug 12 19:11:44 Odroid systemd[1]: Stopping OpenBSD Secure Shell server...
Aug 12 19:11:44 Odroid systemd[1]: Stopping Home Assistant for hass...
Aug 12 19:11:44 Odroid systemd[1]: Stopping Jackett Daemon...
Aug 12 19:11:44 Odroid systemd[1]: Stopping Login Service...
Aug 12 19:11:44 Odroid systemd[1]: Stopping Login Prompts.
Aug 12 19:11:44 Odroid systemd[1]: Stopped target Login Prompts.
Aug 12 19:11:44 Odroid systemd[1]: Stopping Getty on tty1...
Aug 12 19:11:44 Odroid systemd[1]: Stopping LSB: starts instance of Sonarr...
Aug 12 19:11:44 Odroid systemd[1]: Stopping Host and Network Name Lookups.
Aug 12 19:11:44 Odroid systemd[1]: Stopped target Host and Network Name Lookups.
Aug 12 19:11:44 Odroid systemd[1]: Stopping dnsmasq - A lightweight DHCP and caching DNS server...
Aug 12 19:11:44 Odroid systemd[1]: Stopping LSB: Autogenerate and use a swap file...
Aug 12 19:11:44 Odroid systemd[1]: Stopping LSB: Start/stop rtorrent daemon...
Aug 12 19:11:44 Odroid noip2[2412]: Shutting down dynamic address update:noip2.
Aug 12 19:11:44 Odroid systemd[1]: Stopping LSB: start Samba SMB/CIFS daemon (smbd)...
Aug 12 19:11:44 Odroid rsyslogd: [origin software="rsyslogd" swVersion="8.4.2" x-pid="433" x-info="http://www.rsyslog.com"] exiting on signal 15.

#######END OF REBOOT

#######POWERON, time difference due to hard poweroff before software clock saved.

Aug 12 19:10:28 Odroid kernel: [    0.000000] Initializing cgroup subsys cpuset
Aug 12 19:10:28 Odroid kernel: [    0.000000] Initializing cgroup subsys cpu
I've noticed you have alot of manual installed software on the system.
It might be worth disabling those, reboot, power on the system then reboot again to test:

Code: Select all

systemctl disable servicename
Which PSU and SD/EMMC are you using?
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: Hanging on Reboot/shutdown odroid c2

Post by k-plan »

Hi,

runs Odroid C2 on EMMC Card? Which?

cu
k-plan
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
bobokun

Re: Hanging on Reboot/shutdown odroid c2

Post by bobokun »

Hello, thanks for the analysis.

There are a couple of updates.

1) I've fixed the couchpotato service so it's now working again.
2) I've upgraded my kernel using apt-get dist-upgrade
3) I've disabled a couple services and it definitely help speed up the reboot process by quite a bit.

However I've noticed now half the time it does a reboot successfully and sometimes it doesn't really reboot but I think it's in the shutdown state? I'm getting this from putty after rebooting
Image

I tried plugging in my monitor to the odroid to see whats going on but whenever I issue a reboot command the text just scrolls up so fast and I just get a blank screen on my monitor. "I assume that it has powered off my odroid without starting it back up?" LED just stays red on my odroid (No blue LED flashes or anything)

Now that sometimes it does successfully reboot and sometimes it doesn't, I'm not sure what does trigger it to do it successfully and when it triggers an unsuccessful reboot. I've sent you some new logs to your email after an unsuccessful reboot if you have some time to take a look at it. Please look at only the last reboot (as that one was unsuccessful) and the other ones did successfully reboot.

I'm using this PSU: http://www.hardkernel.com/main/products ... 3652633329
and I'm using this EMMC: http://www.hardkernel.com/main/products ... 5622510341
Both are bought from hardkernel's website.

On a separate note, I haven't installed apache2 on my system but I did install apache2-utils manually in order to get access to the htpasswd command. However I noticed after I did that whenever I use dietpi-backup or any dietpi command it always shows up apache[failed] when stopping and starting the "service". Is there a way to tell my odroid that apache isn't installed?
Image

Again thank you for your time debugging everything
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Hanging on Reboot/shutdown odroid c2

Post by Fourdee »

bobokun wrote:However I've noticed now half the time it does a reboot successfully and sometimes it doesn't really reboot but I think it's in the shutdown state?
Hi,

It sounds like a possible filesystem corruption on your EMMC. I was kind of hoping the kernel update would resolve the issue and overwrite any possible corrupt files.
I tried plugging in my monitor to the odroid to see whats going on but whenever I issue a reboot command the text just scrolls up so fast and I just get a blank screen on my monitor. "I assume that it has powered off my odroid without starting it back up?" LED just stays red on my odroid (No blue LED flashes or anything)
Thats a pain, without any information to go on, not sure what else we can try :(

I can only suggest writing a new DietPi image on the EMMC, reinstall your software and see if the issue reoccurs. You never know, it could be a hardware fault if it reoccurs on the fresh installation.

EDIT:
If you have a serial/UART connection, that might provide more information on shutdown: https://www.amazon.com/SMAKN%C2%AE-PL23 ... rds=pl2303. You'll also need to enable serial console in dietpi-config > advanced
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply