• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pilight Error : default_sa_restorer_v2 & CPU High
My pilight session halted on 24th of June around 14:00.

Raspberry Pi Model B Rev. 2.0 512MB
Linux raspberrypi 4.4.11+ #888 Mon May 23 20:02:58 BST 2016 armv6l GNU/Linux
I'm running a manually compiled version. Which i cloned from development on 21st of june around 7:44am localtime the netherlands.
I'm running it with an altered alecto_wx500 protocol (enabling rain meter)

Only enabled these protocols:
CPU temp
Generic Switch
Kaku switch
kaku switch old
Hardware 433 GPIO
Hardware 433 LIRC

I've got a filter installed and DS18B20 and BP180 attached.
So i've gone to go through the logs

Message in pilight.err
[Jun 24 14:02:21:624575] pilight-daemon: -- STACKTRACE (5 FRAMES) --
[Jun 24 14:02:22:266767] pilight-daemon: __default_sa_restorer_v2       ip = 0xb6d45180, sp = 0x*******
[Jun 24 14:02:22:797679] pilight-daemon: broadcast                      ip =    0x*******, sp = 0x*******
[Jun 24 14:02:23:136320] pilight-daemon: start_thread                   ip = 0xb*******, sp = 0xb2*******
[Jun 24 14:02:23:411186] pilight-daemon: clone                          ip = 0x*******, sp = 0x*******
(i've replace the adresses with * )

Messages in pilight.log that get my attention
[Jun 22 02:21:44:636190] pilight-daemon: WARNING: (webserver) could not read /usr/local/share/pilight//nice ports,/Trinity.txt.bak
(not the cause of crash.. but what should i do with it?

Found it:
[Jun 24 12:02:03:371111] pilight-daemon: WARNING: cpu usage too high 88.399633%
[Jun 24 12:02:03:735340] pilight-daemon: WARNING: checking again in 10 seconds
[Jun 24 12:02:15:947036] pilight-daemon: cpu usage still too high 80.356485%, stopping
[Jun 24 12:02:16:349919] pilight-daemon: INFO: removed stale pid_file /var/run/pilight.pid

How come it remains on high CPU?
Does does it halt on pilight CPU usage or total CPU usage?
Can you post the full debug output from the crash? There should also be some kind of thread profiling there, which shows the thread that is responsible for the high CPU usage.

The pilight watchdog monitors pilight CPU usage, not total. So there is something happening in pilight that causes the high usage, which might be found in the debug output from the crash.

Additionally, you should use gdb to further debug the issue, as the stacktrace is not helpful as is it currently is. There are step-by-step instructions in the pilight manual on how to do this, but it may also be that the issue is fixed in the rewrite code. So it would be good if you could try that first and see if it still crashes.
I don't have full debug output because i'm new to debugging in pilight (other then just verifying protocol output).

Just to check:
- I've got gdb version: 7.7.1
- Cloned fresh copy of Development branch
- Copied my alecto_wx500.c into the correct libs folder
- Manually compiled with only protocols needed
- Started pilight with GDB
- Hope/wait for crash

- Is there any way to keep GDB running without having a terminal open? And automatically save output to file including backtraces?
I don't think so, depending on your setup you can probably minimize the window somehow though. I don't think you can make it automatically save the backtrace and all frames for you
I've found answer to question below..
You have to type 'Run' yourself !!

Appearantly I'm using GDB 7.7.1 which is a different version than mentioned in the Online pilight debug manual.

Therefore i don't know if output below is correct.
It's not showing "(gdb) run" but just "(gdb)"

root@raspberrypi:~# service pilight stop
root@raspberrypi:~# gdb --args pilight-daemon -D
GNU gdb (Raspbian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from pilight-daemon...done.

and it just stays that way

Please inform me if i'm doing this correctly.
Yes, that's the beginning. Now you need to follow the remaining steps in the instructions; the next step is to issue the "run" command at the (gdb) prompt to start the pilight-daemon in gdb (this is admittedly a little unclear in the manual, I'll do something about that soon). Then you just need to wait for the program to crash, once it does, keep following the instructions.

Possibly Related Threads...
Thread Author Replies Views Last Post
Question pilight stopped working sl4m01 5 1,071 09-16-2021, 01:34 PM
Last Post: orlo11
  how to compile pilight with custom protocol code? am i missing something? stanwebber 2 154 07-05-2021, 03:49 AM
Last Post: stanwebber
  Security Error Message in Firefox Rschnauzer 2 194 05-05-2021, 02:06 PM
Last Post: Rschnauzer
  hardware info lost after pilight restart Rschnauzer 3 330 03-17-2021, 11:44 AM
Last Post: Rschnauzer
  pilight-raw changes output format from 7 to 8 Rschnauzer 1 694 11-26-2020, 01:52 PM
Last Post: curlymo
Question pilight nightly webgui offline after some hours fleisch 4 756 10-26-2020, 05:19 PM
Last Post: fleisch
  rpi3 Buster Compile Error Nikau 9 2,743 03-26-2020, 08:47 AM
Last Post: tvdgeer
  pilight bugs Ascenion 1 699 03-23-2020, 06:29 PM
Last Post: curlymo
  [Solved] pilight service crashing on first webserver access after reboot VrahoK 20 4,703 12-21-2019, 09:46 AM
Last Post: curlymo
  pilight-control modify values coolinx 16 3,805 11-13-2019, 08:02 PM
Last Post: curlymo

Forum Jump:

Browsing: 2 Guest(s)