Armadilloフォーラム

shutdown に時間がかかる原因について

asp_washio2017

2022年5月31日 8時06分

お世話になります。

armadillo IoT A6を2台使用していますが、2台で同じshutdownコマンドを
使用していますが一方のシステムで "A stop job is running ..."で止まるまで
1分30秒以上の時間が掛かってしまいます。(一方はすぐ止まります)
原因として考えられることや調べる方法があれば教えてください。
よろしくお願いいたします。

----------------------------log抜粋--------------------------------------
[ OK ] Stopped netfilter persistent configuration.
[ **] A stop job is running for Control EMS31 on Armadillo (19s / 1min 32s)

コメント

at_syunya.ohshio

2022年5月31日 10時26分

大塩です。

> お世話になります。
>
> armadillo IoT A6を2台使用していますが、2台で同じshutdownコマンドを
> 使用していますが一方のシステムで "A stop job is running ..."で止まるまで
> 1分30秒以上の時間が掛かってしまいます。(一方はすぐ止まります)
> 原因として考えられることや調べる方法があれば教えてください。
> よろしくお願いいたします。
>
> ----------------------------log抜粋--------------------------------------
> [ OK ] Stopped netfilter persistent configuration.
> [ **] A stop job is running for Control EMS31 on Armadillo (19s / 1min 32s)

この現象はログにある通り、LTEモジュール EMS31-J の終了作業に時間がかかっているようです。
この原因については /var/log/syslog の aiot-modem-controld と記載された内容を確認することでわかるかもしれません。

また、原因調査のため以下にお答えいただけますでしょうか。
・上記原因は必ず発生するか
・SIMを挿入した状態か
・ご利用のArmadillo2台で環境に差異はあるか

以上です。

asp_washio2017

2022年6月8日 16時50分

大塩様

お世話になります。そして返信が遅くなり大変失礼しました。

1台をマスターとして複数台のコピーを製品として開発しております。
そしてshutdown の問題はこのような開発の中で発生しております。

マスター: A
コピー : B

以下のコマンド A,Bで実行。(SIMは使うとき差し替え)
aiot-modem-control dial で正しくネットに接続

比較コマンド
root@armadillo:~# aiot-modem-control poweroff
root@armadillo:~# shutdown -h now

A:両コマンドとも時間かかからない。
B:両コマンドとも時間かかかる。

ハードの故障がうたがわれますので3台目を準備して見ます。

以上、よろしくお願いいたします。 220608

> 大塩です。
>
> > お世話になります。
> >
> > armadillo IoT A6を2台使用していますが、2台で同じshutdownコマンドを
> > 使用していますが一方のシステムで "A stop job is running ..."で止まるまで
> > 1分30秒以上の時間が掛かってしまいます。(一方はすぐ止まります)
> > 原因として考えられることや調べる方法があれば教えてください。
> > よろしくお願いいたします。
> >
> > ----------------------------log抜粋--------------------------------------
> > [ OK ] Stopped netfilter persistent configuration.
> > [ **] A stop job is running for Control EMS31 on Armadillo (19s / 1min 32s)
>
> この現象はログにある通り、LTEモジュール EMS31-J の終了作業に時間がかかっているようです。
> この原因については /var/log/syslog の aiot-modem-controld と記載された内容を確認することでわかるかもしれません。
>
> また、原因調査のため以下にお答えいただけますでしょうか。
> ・上記原因は必ず発生するか
> ・SIMを挿入した状態か
> ・ご利用のArmadillo2台で環境に差異はあるか
>
> 以上です。

asp_washio2017

2022年6月15日 16時53分

お世話になります。

新しいボードにして startup.conf wvdial.conf を設定して dial で
正しく接続できますが poweroff や shutdown で時間がかかるのは変わりませんでした。

何か解決策を見つけるアドバイスがあればご教授よろしくお願いいたします。
220615

config と syslog
--------------------------------------------------
root@armadillo:~# cat /etc/wvdial.conf
[Dialer Defaults]
Init1 = ATZ
Init2 = AT+CFUN=1
Init3 = AT+COPS?
Init4 = AT+CMGF=1
Modem Type = Analog Modem
Dial Command = ATD
Baud = 460800
Modem = /dev/ttymxc1
New PPPD = yes
Dial Attemps = 0
ISDN = 0
APN = spmode.ne.jp
Phone = *99***1#
Password = pas
Username = usr
Carrier Check = yes
Auto DNS = 1
Check Def Route = 1
Stupid Mode = yes
Check DNS = 1

------------------------------------------------

root@armadillo:~# cat /etc/aiot-modem-control/startup.conf
# startup.conf
# setting samples: /usr/share/aiot-modem-control

# apn ex "example.com"
#apn=
apn=spmode.ne.jp

# auth_prot: "pap" or "chap" or "none"
# if set "none", ignore username and password
#auth_prot=
auth_prot=chap

# username and password ex "username" "password"
#username=
#password=

# operator_id: ex "44010":docomo or "auto"
#operator_id=
operator_id=auto

# create_wvdial_conf
# true: create /etc/wvdia.conf when deamon start.
# false or comment out: no action
###create_wvdial_conf=true

# fix_profile:"docomojp"
#fix_profile=

# interval to go to sleep mode
# disable or from 100 to 5000 (msec)
sleep=5000

# suspend enable or disable
suspend=enable

# psm Power Save Mode disable or tau,act-time
# default: 3m,1m(tau:3minutes, act-time:1minute)
# tau [**s or **m] Periodic TAU cycle (T3412)
# 2s,4s,6s...62s,90s,120s,150s...930s
# 1m,2m,3m...31m,40m,50m,60m...310m
# 1h,2h,3h...31h,40h,50h,60h...310h
# act-time [**s or **m or **h] Active time (T3324) seconds
# 2s,4s,6s...62s
# 1m,2m,3m...31m,36m,42m,48m...186m
# s:seconds, m:minutes, h:hours
psm=3m,1m

# edrx: set eDRX disable or pcl(seconds),ptw(seconds)
# pcl(Paging Cycle Length) seconds
# 5.12, 10.24, 20.48, 40.96, 61.44, 81.92, 102.4, 122.88,
# 143.36, 163.84, 327.68, 655.36, 1310.72, 2621.44
# ptw(Paging Time Window eDRX) seconds
# 1.28, 2.56, 5.12, 6.40, 7.68, 8.96, 10.24, 11.52, 12.80,
# 14.08, 15.36, 16.64, 17.92, 19.20, 20.48
edrx=20.48,5.12

# auto_dial: auto connect ppp
# auto_dial=true: auto connect ppp
#auto_dial

# multiplex setting
# enable: enable multiplex function
# disable: disable multiplex function
# auto: auto select(prioritize enable)
multiplex=auto

# register_check_interval
# Interval seconds(from 30 to 300) for checking netowrk registration.
# if set 0 or out of range(< 30 or > 300) or
# no register_check_interval element, no check without wakeup daemon.
register_check_interval=30
------------------------------------------------------
root@armadillo:~# aiot-modem-control poweroff
---------------------------------------------------------
root@armadillo:~# tail -40 /var/log/syslog
Jun 15 16:22:02 armadillo aiot-modem-controld[220]: is_registered(2823): operator registered:"44010"
Jun 15 16:22:09 armadillo aiot-modem-controld[220]: ==> AT+CESQ
Jun 15 16:22:09 armadillo aiot-modem-controld[220]: <== AT+CESQ
Jun 15 16:22:09 armadillo aiot-modem-controld[220]: <== +CESQ: 99,99,255,255,255,255
Jun 15 16:22:09 armadillo aiot-modem-controld[220]: <==
Jun 15 16:22:09 armadillo aiot-modem-controld[220]: <== OK
Jun 15 16:22:16 armadillo aiot-modem-controld[220]: ==> AT^SMONI
Jun 15 16:22:17 armadillo aiot-modem-controld[220]: <== AT^SMONI
Jun 15 16:22:17 armadillo aiot-modem-controld[220]: <== ^SMONI: 4G,,,,,,,,,,,,,,SLEEP - PSM,
Jun 15 16:22:17 armadillo aiot-modem-controld[220]: <==
Jun 15 16:22:17 armadillo aiot-modem-controld[220]: <== OK
Jun 15 16:22:24 armadillo aiot-modem-controld[220]: ==> AT
Jun 15 16:22:24 armadillo aiot-modem-controld[220]: <== AT
Jun 15 16:22:24 armadillo aiot-modem-controld[220]: <== OK
Jun 15 16:22:31 armadillo aiot-modem-controld[220]: ==> AT^SMSO
Jun 15 16:22:31 armadillo aiot-modem-controld[220]: <== AT^SMSO
Jun 15 16:22:31 armadillo aiot-modem-controld[220]: <== ^SMSO: MS OFF
Jun 15 16:22:31 armadillo aiot-modem-controld[220]: <==
Jun 15 16:22:31 armadillo aiot-modem-controld[220]: <== OK
Jun 15 16:25:25 armadillo aiot-modem-controld[220]: open serial: No such device
Jun 15 16:25:25 armadillo aiot-modem-controld[220]: open_with_default_baudrate(147): open failed
Jun 15 16:26:53 armadillo aiot-modem-controld[220]: open serial: No such device
Jun 15 16:26:53 armadillo aiot-modem-controld[220]: open_with_default_baudrate(147): open failed
Jun 15 16:28:21 armadillo aiot-modem-controld[220]: open serial: No such device
Jun 15 16:28:21 armadillo aiot-modem-controld[220]: open_with_default_baudrate(147): open failed
Jun 15 16:29:49 armadillo aiot-modem-controld[220]: open serial: No such device
Jun 15 16:29:49 armadillo aiot-modem-controld[220]: open_with_default_baudrate(147): open failed
Jun 15 16:30:54 armadillo systemd[1]: Starting Cleanup of Temporary Directories...
Jun 15 16:30:54 armadillo systemd[1]: systemd-tmpfiles-clean.service: Succeeded.
Jun 15 16:30:54 armadillo systemd[1]: Started Cleanup of Temporary Directories.
Jun 15 16:31:17 armadillo aiot-modem-controld[220]: open serial: No such device
Jun 15 16:31:17 armadillo aiot-modem-controld[220]: open_with_default_baudrate(147): open failed
Jun 15 16:32:45 armadillo aiot-modem-controld[220]: open serial: No such device
Jun 15 16:32:45 armadillo aiot-modem-controld[220]: open_with_default_baudrate(147): open failed
Jun 15 16:34:13 armadillo aiot-modem-controld[220]: open serial: No such device
Jun 15 16:34:13 armadillo aiot-modem-controld[220]: open_with_default_baudrate(147): open failed
Jun 15 16:35:41 armadillo aiot-modem-controld[220]: open serial: No such device
Jun 15 16:35:41 armadillo aiot-modem-controld[220]: open_with_default_baudrate(147): open failed
Jun 15 16:37:05 armadillo aiot-modem-controld[220]: open serial: No such device
Jun 15 16:37:05 armadillo aiot-modem-controld[220]: open_with_default_baudrate(147): open failed
root@armadillo:~#

> 大塩様
>
> お世話になります。そして返信が遅くなり大変失礼しました。
>
> 1台をマスターとして複数台のコピーを製品として開発しております。
> そしてshutdown の問題はこのような開発の中で発生しております。
>
> マスター: A
> コピー : B
>
> 以下のコマンド A,Bで実行。(SIMは使うとき差し替え)
> aiot-modem-control dial で正しくネットに接続
>
> 比較コマンド
> root@armadillo:~# aiot-modem-control poweroff
> root@armadillo:~# shutdown -h now
>
> A:両コマンドとも時間かかからない。
> B:両コマンドとも時間かかかる。
>
> ハードの故障がうたがわれますので3台目を準備して見ます。
>
> 以上、よろしくお願いいたします。 220608
>
> > 大塩です。
> >
> > > お世話になります。
> > >
> > > armadillo IoT A6を2台使用していますが、2台で同じshutdownコマンドを
> > > 使用していますが一方のシステムで "A stop job is running ..."で止まるまで
> > > 1分30秒以上の時間が掛かってしまいます。(一方はすぐ止まります)
> > > 原因として考えられることや調べる方法があれば教えてください。
> > > よろしくお願いいたします。
> > >
> > > ----------------------------log抜粋--------------------------------------
> > > [ OK ] Stopped netfilter persistent configuration.
> > > [ **] A stop job is running for Control EMS31 on Armadillo (19s / 1min 32s)
> >
> > この現象はログにある通り、LTEモジュール EMS31-J の終了作業に時間がかかっているようです。
> > この原因については /var/log/syslog の aiot-modem-controld と記載された内容を確認することでわかるかもしれません。
> >
> > また、原因調査のため以下にお答えいただけますでしょうか。
> > ・上記原因は必ず発生するか
> > ・SIMを挿入した状態か
> > ・ご利用のArmadillo2台で環境に差異はあるか
> >
> > 以上です。

at_keitaro.takahashi

2022年6月15日 17時02分

アットマークテクノ高橋です。
以下のコマンドの実行結果を教えていただけますでしょうか。

dpkg -l |grep ems31-utils

versionが1.2.1より前の場合は、以下コマンドでアップデートをした後、症状が発生するかお試し頂けると幸いです。

apt update
apt install ems31-utils

asp_washio2017

2022年6月16日 13時18分

高橋様

やってみましたが最新ヴァージョンでした。今月、chiponestopで購入したボードです。
root@armadillo:~# dpkg -l|grep ems31-utils
-------------------------------------------
ii ems31-utils 1.2.0 armhf Utilities for Thales EMS31 on Armadillo board
root@armadillo:~#
root@armadillo:~# apt update
----------------------------
Ign:1 http://download.atmark-techno.com/debian buster InRelease
-=====中略=======================-
E: Some index files failed to download. They have been ignored, or old ones used instead.
root@armadillo:~# apt install ems31-utils
-------------------------------------------
Reading package lists... Done
Building dependency tree
Reading state information... Done
ems31-utils is already the newest version (1.2.0).
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.

よろしくお願いいたします。 220616

> アットマークテクノ高橋です。
> 以下のコマンドの実行結果を教えていただけますでしょうか。
>

> dpkg -l |grep ems31-utils
> 

>
> versionが1.2.1より前の場合は、以下コマンドでアップデートをした後、症状が発生するかお試し頂けると幸いです。
>

> apt update
> apt install ems31-utils
> 

at_keitaro.takahashi

2022年6月16日 14時44分

高橋です。

ems31-utilsの最新バージョンは1.2.1となります。

apt updateコマンドに失敗しているようなので、
インターネットへの接続をご確認の上、もう1度試していただけますでしょうか。
インターネットへ接続されているかどうかは、以下のように任意のホストにpingを実行するとわかります。
ping 8.8.8.8

インターネットへ接続されているにもかかわらずapt update及びems31-utilsのアップデートが失敗する場合、
コマンド実行時のログを省略せずに添付していただけると幸いです。

よろしくお願いいたします。

asp_washio2017

2022年6月16日 18時53分

高橋様

失礼しました。接続を確認してv1.2.1となり、shutdown 時間も10秒程度になりました。
いろいろ確かめてみます。 ありがとうございました。220616

ログ
root@armadillo:~# aiot-modem-control dial
root@armadillo:~# ping google.com
PING google.com (172.217.161.78) 56(84) bytes of data.
64 bytes from nrt20s09-in-f14.1e100.net (172.217.161.78): icmp_seq=1 ttl=114 time=87.8 ms
64 bytes from nrt20s09-in-f14.1e100.net (172.217.161.78): icmp_seq=2 ttl=114 time=120 ms
64 bytes from nrt20s09-in-f14.1e100.net (172.217.161.78): icmp_seq=3 ttl=114 time=76.6 ms
^C
--- google.com ping statistics ---
4 packets transmitted, 3 received, 25% packet loss, time 8ms
rtt min/avg/max/mdev = 76.613/94.688/119.677/18.249 ms
root@armadillo:~# aiot-modem-control poweroff
root@armadillo:~# aiot-modem-control dial
root@armadillo:~# shutdown -h now
root@armadillo:~# [ OK ] Stopped target Timers.
[ OK ] Stopped Daily apt upgrade and clean activities.
[ OK ] Stopped Daily Stopping Session c1 of user root.
Unmounting /opt/license...
[ OK ] Stopped Daily apt download activities.
[ OK ] Stopped Daily man-db regeneration.
[ OK ] Stopped target Graphical Interface.
[ OK ] Stopped target Multi-User System.
Stopping Regular background program processing daemon...
Stopping System Logging Service...
[ OK ] Stopped target Login Prompts.
Stopping Getty on tty1...
Stopping LSB: exim Mail Transport Agent...
[ OK ] Stopped Daily Cleanup of Temporary Directories.
Stopping Serial Getty on ttymxc2...
[ OK ] Stopped System Logging Service.
[ OK ] Stopped Regular background program processing daemon.
[ OK ] Stopped Getty on tty1.
[ OK ] Stopped Serial Getty on ttymxc2.
[ OK ] Unmounted /opt/license.
[ OK ] Stopped Session c1 of user root.
Stopping User Manager for UID 0...
Stopping Login Service...
[ OK ] Removed slice system-serial\x2dgetty.slice.
[ OK ] Stopped /etc/rc.local Compatibility.
[ OK ] Removed slice system-getty.slice.
[ OK ] Stopped Login Service.
[ OK ] Stopped User Manager for UID 0.
[ OK ] Stopped LSB: exim Mail Transport Agent.
[ OK ] Stopped target Network is Online.
[ OK ] Stopped target System Time Synchronized.
Stopping User Runtime Directory /run/user/0...
[ OK ] Unmounted /run/user/0.
[ OK ] Stopped User Runtime Directory /run/user/0.
[ OK ] Removed slice User Slice of UID 0.
Stopping Permit User Sessions...
Stopping D-Bus System Message Bus...
[ OK ] Reached target Unmount All Filesystems.
[ OK ] Stopped D-Bus System Message Bus.
[ OK ] Stopped Permit User Sessions.
[ OK ] Stopped target Remote File Systems.
[ OK ] Stopped target Network.
Stopping Control EMS31 on Armadillo...
Stopping Raise network interfaces...
[ OK ] Stopped Raise network interfaces.
[ OK ] Stopped target Network (Pre).
Stopping netfilter persistent configuration...
[ OK ] Stopped netfilter persistent configuration.
[ OK ] Stopped Control EMS31 on Armadillo.
[ OK ] Stopped target Basic System.
[ OK ] Stopped target Sockets.
[ OK ] Closed Syslog Socket.
[ OK ] Closed D-Bus System Message Bus Socket.
[ OK ] Stopped target Paths.
[ OK ] Stopped target Slices.
[ OK ] Removed slice User and Session Slice.
[ OK ] Stopped target System Initialization.
[ OK ] Stopped target Swap.
Stopping Network Time Synchronization...
Stopping Load/Save Random Seed...
[ OK ] Stopped target Local Encrypted Volumes.
[ OK ] Stopped Dispatch Password …ts to Console Directory Watch.
[ OK ] Stopped Forward Password R…uests to Wall Directory Watch.
Stopping Update UTMP about System Boot/Shutdown...
[ OK ] Stopped Apply Kernel Variables.
[ OK ] Stopped Load Kernel Modules.
[ OK ] Stopped Network Time Synchronization.
[ OK ] Stopped Load/Save Random Seed.
[ OK ] Stopped Update UTMP about System Boot/Shutdown.
[ OK ] Stopped Create Volatile Files and Directories.
[ OK ] Stopped target Local File Systems.
[ OK ] Stopped target Local File Systems (Pre).
[ OK ] Stopped Create Static Device Nodes in /dev.
[ OK ] Stopped Create System Users.
[ OK ] Stopped Remount Root and Kernel File Systems.
[ OK ] Reached target Shutdown.
[ OK ] Reached target Final Step.
[ OK ] Started Power-Off.
[ OK ] Reached target Power-Off.
[ 216.411764] systemd-shutdow: 33 output lines suppressed due to ratelimiting
[ 216.522207] systemd-shutdown[1]: Syncing filesystems and block devices.
[ 216.541113] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
[ 216.559631] systemd-journald[157]: Received SIGTERM from PID 1 (systemd-shutdow).
[ 216.578441] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[ 216.598186] systemd-shutdown[1]: Unmounting file systems.
[ 216.610577] [599]: Remounting '/' read-only in with options 'data=ordered'.
[ 216.630467] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
[ 216.643591] systemd-shutdown[1]: All filesystems unmounted.
[ 216.649475] systemd-shutdown[1]: Deactivating swaps.
[ 216.654895] systemd-shutdown[1]: All swaps deactivated.
[ 216.660248] systemd-shutdown[1]: Detaching loop devices.
[ 216.666415] systemd-shutdown[1]: All loop devices detached.
[ 216.672048] systemd-shutdown[1]: Detaching DM devices.
[ 216.702259] ci_hdrc ci_hdrc.1: remove, state 4
[ 216.706813] usb usb2: USB disconnect, device number 1
[ 216.713001] ci_hdrc ci_hdrc.1: USB bus 2 deregistered
[ 216.721442] ci_hdrc ci_hdrc.0: remove, state 4
[ 216.725943] usb usb1: USB disconnect, device number 1
[ 216.732176] ci_hdrc ci_hdrc.0: USB bus 1 deregistered
[ 216.737573] reboot: Power down

> 高橋です。
>
> ems31-utilsの最新バージョンは1.2.1となります。
>
> apt updateコマンドに失敗しているようなので、
> インターネットへの接続をご確認の上、もう1度試していただけますでしょうか。
> インターネットへ接続されているかどうかは、以下のように任意のホストにpingを実行するとわかります。
> ping 8.8.8.8
>
> インターネットへ接続されているにもかかわらずapt update及びems31-utilsのアップデートが失敗する場合、
> コマンド実行時のログを省略せずに添付していただけると幸いです。
>
> よろしくお願いいたします。