• 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
Bug report: segmentation fault using rule with AFTER
#1
Bug 
Hi there,

I received a segmentation fault when starting pilight.
I was trying to follow this good hint from @terrar by writing
Code:
"rule": "IF ping_smartphone_A.state IS disconnected THEN switch DEVICE general_A_present TO off AFTER 3 MINUTES",
when I stumbled upon this.
I reduced & changed my config.json to
Code:
{
    "rules": {
        "y": {
            "rule": "IF a THEN switch DEVICE b TO c AFTER d e",
            "active": 0
        }
    }
}
the result is (still):
Code:
[....] Starting : pilight-- STACKTRACE (1 FRAMES) --
segmentation fault
failed!
but these are OK:
Code:
"rule": "IF a THEN switch DEVICE b TO c AFTER d",
"rule": "IF a THEN switch DEVICE b TO c AFTER d e f",


Also this (taken from the documentation) is OK:
Code:
"rule": "IF 1 == 1 THEN switch DEVICE light TO on AFTER 30 MILLISECOND",
but this also gives a segmentation fault:
Code:
"rule": "IF 1 == 1 THEN switch DEVICE light TO on AFTER 30 MILISECOND",
also this (taken from the same documentation) gives a segmentation fault: (EDIT: corrected typo on wiki)
Code:
"rule": "IF 1 == 1 THEN switch DEVICE light TO off FOR 10 SECOND AFTER 30 MINUTES",
So apparently a typo in the unit leads to this error.


All this using version
Code:
pilight-control -V
pilight-control v7.0

And using
Code:
pilight-daemon version 6c2f21a
I received this result containing more info:
Code:
[....] Starting : pilight-- STACKTRACE (12 FRAMES) --
__default_sa_restorer_v2       ip = 0xb6d30b20, sp = 0xbec68f78
checkArguments                 ip =    0x7a42c, sp = 0xbec69268
event_parse_action             ip =    0x6c360, sp = 0xbec692f8
event_parse_rule               ip =    0x6d05c, sp = 0xbec693b8
rules_parse                    ip =    0x65160, sp = 0xbec69428
config_parse                   ip =    0x316ac, sp = 0xbec69470
config_read                    ip =    0x31a78, sp = 0xbec69490
start_pilight                  ip =    0x20f44, sp = 0xbec694a0
main                           ip =    0x21d0c, sp = 0xbec69d20
__libc_start_main              ip = 0xb6d1a81c, sp = 0xbec69d38
_start                         ip =    0x1a5fc, sp = 0xbec69e78
segmentation fault
failed!

EDIT: last part of
Code:
/usr/local/sbin/pilight-daemon --stacktracer
is:
Code:
[Nov 21 19:40:52:748113] pilight-daemon: STACK: isNumeric(...)
[Nov 21 19:40:52:748439] pilight-daemon: STACK: isNumeric(...)
[Nov 21 19:40:52:748733] pilight-daemon: STACK: isNumeric(...)
[Nov 21 19:40:52:749028] pilight-daemon: STACK: isNumeric(...)
[Nov 21 19:40:52:749615] pilight-daemon: STACK: isNumeric(...)
[Nov 21 19:40:52:749930] pilight-daemon: STACK: isNumeric(...)
[Nov 21 19:40:52:750217] pilight-daemon: STACK: isNumeric(...)
[Nov 21 19:40:52:750515] pilight-daemon: STACK: isNumeric(...)
[Nov 21 19:40:52:750844] pilight-daemon: STACK: isNumeric(...)
[Nov 21 19:40:52:751255] pilight-daemon: STACK: gc_handler(...)
-- STACKTRACE (1 FRAMES) --
segmentation fault


Is there more info I can provide?
 
Reply
  


Messages In This Thread
Bug report: segmentation fault using rule with AFTER - by woutput - 11-21-2015, 08:37 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  [Fixed] Segmentation fault when using Socket API wrong tomk 2 160 08-19-2019, 07:09 PM
Last Post: curlymo
  Infinite loop on sunrise rule caused by currentdatetime Trashware 18 1,845 10-14-2018, 03:41 PM
Last Post: kylex
Bug Bug report: WIFI dongle stops when gpio_switch.gpio = 20 woutput 16 5,206 01-03-2018, 10:11 PM
Last Post: zackdvd
Bug Bug report: double free or corruption (!prev) diman87 16 5,161 03-09-2016, 11:10 AM
Last Post: diman87
Bug Bug report: gpio_switch does not accept high pin numbers woutput 2 2,407 10-12-2015, 03:54 PM
Last Post: woutput
  Kernel Fault - Raspberry Pi 2 simonsmart99 7 5,107 05-04-2015, 05:52 PM
Last Post: wo_rasp
  Bug Report: pilight will not compile if the ARP protocol is not specified UndeadKernel 1 1,966 05-01-2015, 09:41 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)