Hanging on Reboot/shutdown odroid c2

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:

uname -a
cat /DietPi/dietpi/.version

To debug with log files, first, you will need to change Ramlog to Full logging: https://dietpi.com/forum/t/dietpi-survey-information/32/1
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.

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

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

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

Running the commands give me these results

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

Hi,

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

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:

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

Strangely, Rsyslog looks fine.

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:

systemctl disable servicename

Which PSU and SD/EMMC are you using?

Hi,

runs Odroid C2 on EMMC Card? Which?

cu
k-plan

Hi,

If you are looking for the eMMC power try samsung‘s 5.0 :wink:
http://odroid.com/dokuwiki/doku.php?id=en:emmc_reference_chart
http://www.hardkernel.com/main/products/prdt_info.php?g_code=G145622510341

Bob

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

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/prdt_info.php?g_code=G143652633329
and I’m using this EMMC: http://www.hardkernel.com/main/products/prdt_info.php?g_code=G145622510341
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?

Again thank you for your time debugging everything

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 :frowning:

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®-PL2303-Serial-Converter-Adapter/dp/B00XZTJIJ2/ref=sr_1_2?ie=UTF8&qid=1471459558&sr=8-2&keywords=pl2303. You’ll also need to enable serial console in dietpi-config > advanced

I got the same issues here…not using any emmc, but booting from sdcard…

This is a 6 years old post. Better to start a new one with fresh information.

Well, I tried to be compliant and search first before starting a new post…

anyway: I needed to gp out of the house for 30 min and when I came back, the C2 was reachable again via SSH. I rebooted it a couple of times now without issues. So, either ti needed to work through stuff in the backround or the device needs to warm up…no idea. Right now it works.