1 1
gailu

How to know what causing shutdown and way to stop it

Recommended Posts

Hi Experts,

 

Setup: Ubuntu Xenial image on Orange Pi Zero

 

Target boots fine and WiFi working stable. If I remove xradio_wlan module (rmmod xradio_wlan) target start rebooting (shutdown followed by reboot) automatically within 2 minutes and no information is captured in syslog to indicate the reason of reboot.

 

I understand that something is dependent on wlan that is causing system to shutdown.  I am looking for help to identify what causes shutdown. Can you provide some pointers which log/service should I look at?

 

Thank you in advance

Share this post


Link to post
Share on other sites
37 minutes ago, gailu said:

Setup: Ubuntu Xenial image on Orange Pi Zero

Target boots fine and WiFi working stable. If I remove xradio_wlan module (rmmod xradio_wlan) target start rebooting (shutdown followed by reboot) automatically within 2 minutes and no information is captured in syslog to indicate the reason of reboot.

Which network will you use, when unload the xradio_wlan (which should be the working stable WiFi)?

 

How about to blacklist xradio_wlan in /etc/modprobe.d/blacklist.conf with

blacklist xradio_wlan

 

Will you OPi Zero start with a blacklisted xradio_wlan? (do you see the serial log via USB-TTL serial dongle)

 

 

 

Share this post


Link to post
Share on other sites

Actually I am facing issue - when my AP is OFF and I boot OPI Zero board boots and automatically shutdown and this cycle continues. If AP is ON then it connects with AP works perfectly and no automatic shutdown happens. 

 

To recreate scenario I just unloaded  unloaded xradio_wlan module (rmmod xradio_wlan) and I could see the same behaviour that target reboots without doing anything else.

 

My aim is to stop automatic shutdown/reboot when AP is off, so that connect to AP whenever it is switched on. But I am not able to find the reason why the target reboot if WiFi radio is down or configured WiFi AP is not available. One I know the reason I may try to find the workaround

 

Please find the console log below.

Ubuntu 16.04.1 LTS orangepizero ttyS0

orangepizero login: root
Password:
Last login: Thu Feb  1 17:15:00 IST 2018 on ttyS0
Error: Broken packages exist.  ___                               ____  _   _____
 / _ \ _ __ __ _ _ __   __ _  ___  |  _ \(_) |__  /___ _ __ ___
| | | | '__/ _` | '_ \ / _` |/ _ \ | |_) | |   / // _ \ '__/ _ \
| |_| | | | (_| | | | | (_| |  __/ |  __/| |  / /|  __/ | | (_) |
 \___/|_|  \__,_|_| |_|\__, |\___| |_|   |_| /____\___|_|  \___/
                       |___/

Welcome to ARMBIAN 5.25 stable Ubuntu 16.04.1 LTS 3.4.113-sun8i
System load:   1.50             Up time:       1 min
Memory usage:  29 % of 494Mb    IP:            192.168.1.12
CPU temp:      32°C
Usage of /:    66% of 3.2G

/dev/mmcblk0p5 /media/root-rw/data ext4 rw,relatime,data=ordered 0 0

root@orangepizero:~# ifconfig
eth0      Link encap:Ethernet  HWaddr ee:87:90:c2:da:e5
          inet6 addr: fe80::ec87:90ff:fec2:dae5/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:238 (238.0 B)
          Interrupt:114

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr dc:44:6d:e3:d0:72
          inet addr:192.168.1.12  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::de44:6dff:fee3:d072/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:86 errors:0 dropped:0 overruns:0 frame:0
          TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9894 (9.8 KB)  TX bytes:6852 (6.8 KB)

root@orangepizero:~# echo "Everything is fine and WiFi working without any issue"
Everything is fine and WiFi working without any issue
root@orangepizero:~# rmmod xradio_wlan
[  158.540068] [WSM_WRN] Issue unjoin command(TX).
[  159.470267] [STA_WRN] !!! xradio_remove_interface: vif_id=0
[  159.560185] xradio wlan power off
[  159.629941] [XRADIO] Remove SDIO card 1
root@orangepizero:~#
root@orangepizero:~# date
Thu Feb  1 23:23:30 IST 2018
root@orangepizero:~# date
Thu Feb  1 23:23:45 IST 2018
root@orangepizero:~# date
Thu Feb  1 23:23:48 IST 2018
root@orangepizero:~# date
Thu Feb  1 23:23:52 IST 2018
root@orangepizero:~# date
Thu Feb  1 23:23:55 IST 2018
root@orangepizero:~# date
Thu Feb  1 23:23:59 IST 2018
root@orangepizero:~# date
Thu Feb  1 23:24:02 IST 2018
root@orangepizero:~# date
Thu Feb  1 23:24:07 IST 2018
root@orangepizero:~# date
Thu Feb  1 23:24:11 IST 2018
root@orangepizero:~# date
Thu Feb  1 23:24:16 IST 2018
root@orangepizero:~# date
Thu Feb  1 23:24:20 IST 2018
root@orangepizero:~# date
Thu Feb  1 23:24:29 IST 2018
root@orangepizero:~# date
Thu Feb  1 23:24:37 IST 2018
root@orangepizero:~# date
Thu Feb  1 23:24:45 IST 2018
root@orangepizero:~# date
Thu Feb  1 23:24:53 IST 2018
root@orangepizero:~# date
Thu Feb  1 23:25:01 IST 2018
root@orangepizero:~# date
Thu Feb  1 23:25:06 IST 2018
root@orangepizero:~# date
Thu Feb  1 23:25:14 IST 2018
root@orangepizero:~# date
Thu Feb  1 23:25:23 IST 2018
root@orangepizero:~# date
Thu Feb  1 23:25:31 IST 2018
root@orangepizero:~# date
Thu Feb  1 23:25:42 IST 2018
root@orangepizero:~#          Stopping Session 1 of user root.
         Stopping User Manager for UID 0...
[  OK  ] Stopped target Graphical Interface.
[  OK  ] Closed Load/Save RF Kill Switch Status /dev/rfkill Watch.
         Stopping Authenticate and Authorize Users to Run Privileged Tasks...
[  OK  ] Stopped target Multi-User System.
         Stopping LSB: Starts LIRC daemon....
         Stopping LSB: Start/stop sysstat's sadc...
         Stopping System Logging Service...
         Stopping OpenBSD Secure Shell server...
         Stopping Regular background program processing daemon...
         Stopping LSB: Armbian gathering hardware information...
         Stopping LSB: Set sysfs variables from /etc/sysfs.conf...
         Stopping LSB: disk temperature monitoring daemon...
[  OK  ] Stopped target Login Prompts.
         Stopping LSB: Advanced IEEE 802.11 management daemon...
         Stopping Save/Restore Sound Card State...
[  OK  ] Stopped target Sound Card.
         Stopping RFID Reader Service...
         Stopping Serial Getty on ttyS0...
[  OK  ] Stopped target Timers.
[  OK  ] Stopped Daily apt activities.
[  OK  ] Stopped target System Time Synchronized.
[  OK  ] Stopped Daily Cleanup of Temporary Directories.
[  OK  ] Stopped Regular background program processing daemon.
[  OK  ] Stopped System Logging Service.
[  OK  ] Stopped OpenBSD Secure Shell server.
[  OK  ] Stopped Authenticate and Authorize Users to Run Privileged Tasks.
[  OK  ] Stopped RFID Reader Service.
[  OK  ] Stopped Serial Getty on ttyS0.
[  OK  ] Stopped User Manager for UID 0.
[  OK  ] Stopped Session 1 of user root.
[  OK  ] Stopped LSB: Advanced IEEE 802.11 management daemon.
[  OK  ] Stopped Save/Restore Sound Card State.
[  OK  ] Stopped LSB: Armbian gathering hardware information.
[  OK  ] Stopped LSB: Starts LIRC daemon..
[  OK  ] Stopped LSB: Start/stop sysstat's sadc.
[  OK  ] Stopped LSB: Set sysfs variables from /etc/sysfs.conf.
[  OK  ] Stopped LSB: disk temperature monitoring daemon.
[  OK  ] Stopped User Manager for UID 0.
         Stopping LSB: set CPUFreq kernel parameters...
[  OK  ] Removed slice User Slice of root.
         Stopping Login Service...
[  OK  ] Removed slice system-serial\x2dgetty.slice.
         Stopping /etc/rc.local Compatibility...
         Stopping Permit User Sessions...
         Stopping Access Control Service...
[  OK  ] Stopped Login Service.
[  OK  ] Stopped /etc/rc.local Compatibility.
[  OK  ] Stopped Permit User Sessions.
[  OK  ] Stopped target Network is Online.
[  OK  ] Stopped Network Manager Wait Online.
[  OK  ] Stopped Access Control Service.
[  OK  ] Stopped LSB: set CPUFreq kernel parameters.
         Stopping LSB: Load kernel modules needed to enable cpufreq scaling...
         Stopping MySQL Community Server...
[  OK  ] Stopped LSB: Load kernel modules needed to enable cpufreq scaling.
[  OK  ] Stopped target Remote File Systems.
[  OK  ] Stopped target Remote File Systems (Pre).
[  OK  ] Stopped MySQL Community Server.
[  OK  ] Stopped target Network.
         Stopping Network Manager...
         Stopping WPA supplicant...
[  OK  ] Stopped WPA supplicant.
[  OK  ] Stopped Network Manager.
         Stopping D-Bus System Message Bus...
[  OK  ] Stopped D-Bus System Message Bus.
[  OK  ] Stopped target Basic System.
[  OK  ] Stopped target Sockets.
[  OK  ] Closed Syslog Socket.
[  OK  ] Stopped target Paths.
[  OK  ] Stopped Forward Password Requests to Wall Directory Watch.
[  OK  ] Stopped Dispatch Password Requests to Console Directory Watch.
[  OK  ] Stopped target Slices.
[  OK  ] Removed slice User and Session Slice.
[  OK  ] Closed D-Bus System Message Bus Socket.
[  OK  ] Stopped target System Initialization.
         Stopping Entropy daemon using the HAVEGE algorithm...
[  OK  ] Stopped Create Volatile Files and Directories.
[  OK  ] Stopped target Swap.
         Deactivating swap /var/swap...
         Deactivating swap /media/root-rw/data/var/swapfile...
[  OK  ] Stopped target Encrypted Volumes.
[  OK  ] Stopped Apply Kernel Variables.
[  OK  ] Stopped target Local File Systems.
         Unmounting /var/log...
         Starting Unattended Upgrades Shutdown...
         Unmounting /var/log.hdd...
         Unmounting /run/user/0...
         Stopping Restore / save the current clock...
[  OK  ] Stopped Entropy daemon using the HAVEGE algorithm.
[  OK  ] Deactivated swap /var/swap.
[  OK  ] Deactivated swap /media/root-rw/data/var/swapfile.
[  OK  ] Unmounted /var/log.
[  OK  ] Unmounted /run/user/0.
[  OK  ] Stopped Restore / save the current clock.
[FAILED] Failed unmounting /var/log.hdd.
         Unmounting /media/root-rw/data...
         Stopping Load/Save Random Seed...
         Unmounting /tmp...
[  OK  ] Started Unattended Upgrades Shutdown.
[  OK  ] Stopped Load/Save Random Seed.
[  OK  ] Unmounted /tmp.
[  OK  ] Unmounted /media/root-rw/data.
[  OK  ] Reached target Unmount All Filesystems.
[  OK  ] Stopped target Local File Systems (Pre).
[  OK  ] Stopped Create Static Device Nodes in /dev.
[  OK  ] Stopped Remount Root and Kernel File Systems.
[  OK  ] Reached target Shutdown.

 

Share this post


Link to post
Share on other sites
40 minutes ago, gailu said:

Please find the console log below.

Ubuntu 16.04.1 LTS orangepizero ttyS0
orangepizero login: root
Password:
Last login: Thu Feb  1 17:15:00 IST 2018 on ttyS0
Error: Broken packages exist.
Welcome to ARMBIAN 5.25 stable Ubuntu 16.04.1 LTS 3.4.113-sun8i

 

You have broken packages & a "old" version of armbian.

 

I have actually on a Zero with legacy-kernel:

Welcome to ARMBIAN 5.38 stable Ubuntu 16.04.3 LTS 3.4.113-sun8i

 

I would try the following commands:

sudo apt-get clean && sudo apt-get update

sudo apt-get upgrade

 

if that doesnt work:

apt-get install -f

or

dpkg --configure -a

 

after that maybe xradio_wlan does work better? :)

 

 

 

 

Share this post


Link to post
Share on other sites

No difference even after upgrade.  

 

Ubuntu 16.04.3 LTS orangepizero ttyS0

orangepizero login: root
Password:
Last login: Fri Feb  2 07:41:04 IST 2018 on ttyS0
  ___                               ____  _   _____
 / _ \ _ __ __ _ _ __   __ _  ___  |  _ \(_) |__  /___ _ __ ___
| | | | '__/ _` | '_ \ / _` |/ _ \ | |_) | |   / // _ \ '__/ _ \
| |_| | | | (_| | | | | (_| |  __/ |  __/| |  / /|  __/ | | (_) |
 \___/|_|  \__,_|_| |_|\__, |\___| |_|   |_| /____\___|_|  \___/
                       |___/

Welcome to ARMBIAN 5.38 stable Ubuntu 16.04.3 LTS 3.4.113-sun8i
System load:   0.91 0.60 0.24   Up time:       2 min
Memory usage:  30 % of 494MB    IP:            192.168.1.12
CPU temp:      41°C
Usage of /:    59% of 3.2G

[ 0 security updates available, 2 updates total: apt upgrade ]
Last check: 2018-02-02 07:42

[ Menu-driven system configuration (beta): sudo apt update && sudo apt install armbian-config ]

/dev/mmcblk0p5 /media/root-rw/data ext4 rw,relatime,data=ordered 0 0

Warning: a reboot is needed to finish resizing the filesystem
Please reboot the system as soon as possible

root@orangepizero:~# rmmod xradio_wlan
[  322.130074] [WSM_WRN] Issue unjoin command(TX).
[  323.070700] [STA_WRN] !!! xradio_remove_interface: vif_id=0
[  323.171445] xradio wlan power off
[  323.249236] [XRADIO] Remove SDIO card 1
root@orangepizero:~#
root@orangepizero:~#
root@orangepizero:~#
root@orangepizero:~# date
Fri Feb  2 07:48:35 IST 2018
root@orangepizero:~# [  OK  ] Stopped target Graphical Interface.
[  OK  ] Stopped target Multi-User System.
         Stopping OpenBSD Secure Shell server...
         Stopping System Logging Service...
         Stopping Authenticate and Authorize Users to Run Privileged Tasks...
         Stopping LSB: Start NTP daemon...
         Stopping Unattended Upgrades Shutdown...
[  OK  ] Stopped target Sound Card.
         Stopping User Manager for UID 0...
            Stopping Session 2 of user root.
...

 

Share this post


Link to post
Share on other sites

This is to update that problem was not with the Armbian image. There was a third party app (that we outsourced to a freelancer). He made a check when networks goes down and does not recover automatically within two minutes it restarted programmatically.  Extremely sorry to trouble you.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
1 1