• 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
#1
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:
Code:
Webserver
Events
Alecto_ws170
Alecto_wx500
BMP180
CPU temp
Datetime
DS18B20
DS18S20
DHT11
DHT22
Generic Switch
Kaku switch
kaku switch old
Ping
Program
Raw
Sunriseset
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
Code:
[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
Code:
[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:
Code:
[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?
 
Reply
#2
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.
 
Reply
#3
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?
 
Reply
#4
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
 
Reply
#5
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)"

Code:
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:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from pilight-daemon...done.
(gdb)

and it just stays that way

Please inform me if i'm doing this correctly.
 
Reply
#6
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.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  rpi3 Buster Compile Error Nikau 4 72 08-18-2019, 09:08 AM
Last Post: curlymo
  [Fixed] High CPU usage when pilight usb nano disconnects DieterK 1 55 08-13-2019, 05:43 PM
Last Post: curlymo
  pilight Nano USB interface curlymo 228 94,237 07-10-2019, 06:14 PM
Last Post: curlymo
  ERROR: The Broadcom 2835 GPIO 0 is not set to output mode stuckinger 10 625 05-07-2019, 09:11 PM
Last Post: curlymo
  problems compiling pilight on Odroid C2 WitchDoctor 101 8,702 03-14-2019, 09:01 PM
Last Post: curlymo
  High cpu usage Dergo 1 222 02-23-2019, 04:31 PM
Last Post: curlymo
  pilight 8 what chages for custom protocols? polo 11 2,675 02-15-2019, 06:22 PM
Last Post: polo
  v8.1.3 compile error without https fourty2 3 427 11-21-2018, 08:02 PM
Last Post: fourty2
  Assert error in v8.1.3-nightly-d2ee2d0d Ulrich.Arnold 4 433 10-24-2018, 09:28 PM
Last Post: curlymo
  pilight-debug shows nothing minhdomanh 3 477 10-18-2018, 07:01 AM
Last Post: felfert

Forum Jump:


Browsing: 1 Guest(s)