Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dietpi-wifi-monitor failed (Result: exit-code) #2802

Closed
GulyFMG opened this issue May 15, 2019 · 11 comments
Closed

dietpi-wifi-monitor failed (Result: exit-code) #2802

GulyFMG opened this issue May 15, 2019 · 11 comments
Labels
Bug 🐞 Solution available 🥂 Definite solution has been done
Milestone

Comments

@GulyFMG
Copy link

GulyFMG commented May 15, 2019

Creating a bug report/issue

Required Information

  • DietPi version |
    #!/bin/bash
    G_DIETPI_VERSION_CORE=6
    G_DIETPI_VERSION_SUB=23
    G_DIETPI_VERSION_RC=3
    G_GITBRANCH=master
    G_GITOWNER=MichaIng`
  • Distro version | 9.9
  • Kernel version | Linux blacksun 4.14.98-v7+ Request | RT Kernel option #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux
  • SBC device | RPi 3 Model B+ (armv7l)
  • Power supply used | Standart
  • SDcard used | SanDisk 16Gb

Additional Information (if applicable)

  • Bug report ID | 36406472-2e79-47f0-b6c3-82d2e78d0784

Steps to reproduce

Just boot RPI and every single time the script fails.

Expected behaviour

Should start without any error.

Actual behaviour

dietpi-wifi-monitor failed (Result: exit-code)

Extra details

[FAILED] DietPi-Services | dietpi-wifi-monitor failed (Result: exit-code) since Wed 2019-05-15 18:20:07 BST; 1min 14s ago
● dietpi-wifi-monitor.service - DietPi-WiFi-Monitor
Loaded: loaded (/etc/systemd/system/dietpi-wifi-monitor.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2019-05-15 18:20:07 BST; 1min 15s ago
Process: 753 ExecStart=/var/lib/dietpi/services/dietpi-wifi-monitor.sh (code=exited, status=1/FAILURE)
Process: 750 ExecStartPre=/bin/dash -c [ -e /sys/class/net/wlan$(sed -n 2p /DietPi/dietpi/.network) ] (code=exited, status=0/SUCCESS)
Process: 739 ExecStartPre=/DietPi/dietpi/func/obtain_network_details (code=exited, status=0/SUCCESS)
Main PID: 753 (code=exited, status=1/FAILURE)

May 15 18:20:07 blacksun systemd[1]: Starting DietPi-WiFi-Monitor...
May 15 18:20:07 blacksun systemd[1]: Started DietPi-WiFi-Monitor.
May 15 18:20:07 blacksun dietpi-wifi-monitor.sh[753]: ERROR: Concurrent execution detected. Please exit the running instance of DietPi-WiFi-Monitor first. Exiting...
May 15 18:20:07 blacksun systemd[1]: dietpi-wifi-monitor.service: Main process exited, code=exited, status=1/FAILURE
May 15 18:20:07 blacksun systemd[1]: dietpi-wifi-monitor.service: Unit entered failed state.
May 15 18:20:07 blacksun systemd[1]: dietpi-wifi-monitor.service: Failed with result 'exit-code'.

@MichaIng MichaIng added this to the v6.24 milestone May 15, 2019
@MichaIng
Copy link
Owner

MichaIng commented May 15, 2019

@GulyFMG
Many thanks for reporting.

Indeed the concurrency check fails. Somehow pgrep does not exclude the own process any more.

To fix this, please do:

sed -i "s|pgrep -f 'dietpi-wifi-monitor\.sh' \&> /dev/null|(( $(pgrep -cf 'dietpi-wifi-monitor\.sh') > 1 ))|" /var/lib/dietpi/services/dietpi-wifi-monitor.sh
systemctl restart dietpi-wifi-monitor
systemctl status dietpi-wifi-monitor

@MichaIng
Copy link
Owner

Resolved with just released v6.24. Done as hotfix due to critical issue on ARMv6.

@GulyFMG
Copy link
Author

GulyFMG commented May 16, 2019

Just to do a follow up... there is no more errors on boot but i noticed on journalctl:

May 16 14:42:12 blacksun dietpi-wifi-monitor.sh[746]: Try 'sleep --help' for more information.
May 16 14:42:12 blacksun dietpi-wifi-monitor.sh[746]: sleep: invalid time interval ‘{TICKRATE:-10}’
May 16 14:42:12 blacksun dietpi-wifi-monitor.sh[746]: Try 'sleep --help' for more information.
May 16 14:42:13 blacksun dietpi-wifi-monitor.sh[746]: sleep: invalid time interval ‘{TICKRATE:-10}’
May 16 14:42:13 blacksun dietpi-wifi-monitor.sh[746]: Try 'sleep --help' for more information.
May 16 14:42:13 blacksun dietpi-wifi-monitor.sh[746]: sleep: invalid time interval ‘{TICKRATE:-10}’
May 16 14:42:13 blacksun dietpi-wifi-monitor.sh[746]: Try 'sleep --help' for more information.
May 16 14:42:13 blacksun dietpi-wifi-monitor.sh[746]: sleep: invalid time interval ‘{TICKRATE:-10}’
May 16 14:42:13 blacksun dietpi-wifi-monitor.sh[746]: Try 'sleep --help' for more information.
May 16 14:42:13 blacksun dietpi-wifi-monitor.sh[746]: sleep: invalid time interval ‘{TICKRATE:-10}’
May 16 14:42:13 blacksun dietpi-wifi-monitor.sh[746]: Try 'sleep --help' for more information.
May 16 14:42:13 blacksun dietpi-wifi-monitor.sh[746]: sleep: invalid time interval ‘{TICKRATE:-10}’
May 16 14:42:13 blacksun dietpi-wifi-monitor.sh[746]: Try 'sleep --help' for more information.
May 16 14:42:13 blacksun dietpi-wifi-monitor.sh[746]: sleep: invalid time interval ‘{TICKRATE:-10}’
May 16 14:42:13 blacksun dietpi-wifi-monitor.sh[746]: Try 'sleep --help' for more information.
May 16 14:42:13 blacksun dietpi-wifi-monitor.sh[746]: sleep: invalid time interval ‘{TICKRATE:-10}’
May 16 14:42:13 blacksun dietpi-wifi-monitor.sh[746]: Try 'sleep --help' for more information.
May 16 14:42:13 blacksun dietpi-wifi-monitor.sh[746]: sleep: invalid time interval ‘{TICKRATE:-10}’
May 16 14:42:13 blacksun dietpi-wifi-monitor.sh[746]: Try 'sleep --help' for more information.
May 16 14:42:13 blacksun dietpi-wifi-monitor.sh[746]: sleep: invalid time interval ‘{TICKRATE:-10}’
May 16 14:42:13 blacksun dietpi-wifi-monitor.sh[746]: Try 'sleep --help' for more information.
root@blacksun:~# sleep --help
Usage: sleep NUMBER[SUFFIX]...
or: sleep OPTION
Pause for NUMBER seconds. SUFFIX may be 's' for seconds (the default),
'm' for minutes, 'h' for hours or 'd' for days. Unlike most implementations
that require NUMBER be an integer, here NUMBER may be an arbitrary floating
point number. Given two or more arguments, pause for the amount of time
specified by the sum of their values.

@Fourdee
Copy link
Collaborator

Fourdee commented May 16, 2019

@GulyFMG

Confirmed, will fix.

@Fourdee Fourdee reopened this May 16, 2019
@MichaIng
Copy link
Owner

Ah did already fix. Syntax. Will merge this into stable silently.

@Fourdee
Copy link
Collaborator

Fourdee commented May 16, 2019

@MichaIng

Just about to commit lol 👍

Recommend workaround (update script or copy paste fix), loop will run at full speed.

@MichaIng
Copy link
Owner

MichaIng commented May 16, 2019

Actually the MOTD implementation via script allows to push such small fixes live. So sed faulty line and restart service if it runs (with &> /dev/null). Will verify this on notebook later and adjust MOTD. Should be not used on regular basis but for such small ones it should work well.

Since MOTD is enabled by default this should cover most systems and all newly updated ones.

@Fourdee
Copy link
Collaborator

Fourdee commented May 16, 2019

@MichaIng

Actually the MOTD implementation via script allows to push such small fixes live.

Nice idea 👍

Personally, I would not use this feature. Updates/fixes/changes should only be applied when the user selects them (end user trust). Risky if it goes wrong aswell?

@MichaIng
Copy link
Owner

I mark this as closed. Will release v6.24.1 with this fix until the night, which is mostly required as hotfix for ARMv6 anyway.

@GulyFMG
Copy link
Author

GulyFMG commented May 18, 2019

thank you for the feedback... btw this build is solid as hell. congrats

@MichaIng
Copy link
Owner

@GulyFMG
Thanks for feedback! Fine tuning/fixes for ARMv6 are ready as well to ship later: #2809

@MichaIng MichaIng mentioned this issue May 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Solution available 🥂 Definite solution has been done
Projects
None yet
Development

No branches or pull requests

3 participants