• 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
[SOLVED] Triggering generic_switch leads to segfault
#11
I compiled some more versions between 8.1.5-10 and 8.1.5-28 so we can narrow it down some more. The versions between 8.1.5-20 and 8.1.5-28 will follow tomorrow.
 
Reply
#12
(10-13-2019, 09:37 PM)curlymo Wrote: I compiled some more versions between 8.1.5-10 and 8.1.5-28 so we can narrow it down some more. The versions between 8.1.5-20 and 8.1.5-28 will follow tomorrow.

Will test ASAP

Uli
 
Reply
#13
(10-13-2019, 09:44 PM)Ulrich.Arnold Wrote:
(10-13-2019, 09:37 PM)curlymo Wrote: I compiled some more versions between 8.1.5-10 and 8.1.5-28 so we can narrow it down some more. The versions between 8.1.5-20 and 8.1.5-28 will follow tomorrow.

Will test ASAP

Uli
Hi curlymo!

THX for the compilations. 

8.1.5-16 works still fine 
8.1.5-17 gets a segfault after starting without any user-interaction
8.1.5.18... start fine, but show the error for switching multiple devices

Uli
 
Reply
#14
Would you have the possibility to create a minimal config that triggers this error. The change between 16 and 18 is sadly quit big  Tired

Additionally, what device are you running on?

Last thing you can try is replacing the /usr/local/lib/pilight/hardware/433gpio.lua file with this version:
https://raw.githubusercontent.com/piligh...33gpio.lua
 
Reply
#15
(10-14-2019, 06:32 PM)curlymo Wrote: Would you have the possibility to create a minimal config that triggers this error. The change between 16 and 18 is sadly quit big  Tired

Additionally, what device are you running on?

Last thing you can try is replacing the /usr/local/lib/pilight/hardware/433gpio.lua file with this version:
https://raw.githubusercontent.com/piligh...33gpio.lua

I am on the road forr some days, will continue to test when i return

Uli
 
Reply
#16
(10-14-2019, 06:32 PM)curlymo Wrote: Would you have the possibility to create a minimal config that triggers this error. The change between 16 and 18 is sadly quit big  Tired

Additionally, what device are you running on?

Last thing you can try is replacing the /usr/local/lib/pilight/hardware/433gpio.lua file with this version:
https://raw.githubusercontent.com/piligh...33gpio.lua

Hi

Today I tried with a minimal config, which is enough to trigger the error:
Code:
{
    "devices": {
        "Version": {
            "protocol": [ "generic_label" ],
            "id": [{
                "id": 198
            }],
            "label": "21.09.2019 minimal error",
            "color": "blue"
        },
        "SteckdoseRund1": {
            "protocol": [ "clarus_switch" ],
            "id": [{
                "id": "A3",
                "unit": 18
            }],
            "state": "off"
        },
        "SteckdoseRund2": {
            "protocol": [ "clarus_switch" ],
            "id": [{
                "id": "B3",
                "unit": 18
            }],
            "state": "off"
        },
        "Diele": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 99
            }],
            "state": "off"
        },
        "Currentdatetime": {
            "protocol": [ "datetime" ],
            "id": [{
                "longitude": 8.675,
                "latitude": 49.991
            }],
            "year": 2019,
            "month": 9,
            "day": 21,
            "hour": 18,
            "minute": 36,
            "second": 57,
            "weekday": 7,
            "dst": 1
        },
        "Sunriseset": {
            "protocol": [ "sunriseset" ],
            "id": [{
                "longitude": 8.675,
                "latitude": 49.991
            }],
            "sunrise": 7.09,
            "sunset": 19.28,
            "sun": "rise"
        }
    },
    "rules": {
        "DieleAn": {
            "rule": "IF Diele.state == on THEN switch DEVICE SteckdoseRund1 AND SteckdoseRund2 TO on",
            "active": 1
        },
        "DieleAus": {
            "rule": "IF Diele.state == off THEN switch DEVICE SteckdoseRund1 AND SteckdoseRund2 TO off",
            "active": 1
        }
    },
    "gui": {
        "Diele": {
            "name": "Diele",
            "group": [ "Licht" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Version": {
            "name": "Version",
            "group": [ "Modus" ],
            "media": [ "all" ]
        }
    },
    "settings": {
        "log-level": 6,
        "pid-file": "/var/run/pilight.pid",
        "log-file": "/var/log/pilight.log",
        "standalone": 1,
        "webserver-enable": 1,
        "webserver-root": "/usr/local/share/pilight/webgui",
        "webserver-http-port": 5001,
        "webserver-https-port": 5002,
        "webserver-cache": 1,
        "gpio-platform": "raspberrypi3"
    },
    "hardware": {
        "433gpio": {
            "sender": 0,
            "receiver": 1
        }
    },
    "registry": {
        "hardware": {
            "RF433": {
                "mingaplen": 4420,
                "maxgaplen": 72900,
                "minrawlen": 26,
                "maxrawlen": 400
            }
        },
        "pilight": {
            "version": {
                "current": "8.1.4"
            }
        },
        "webserver": {
            "ssl": {
                "certificate": {
                    "location": "/etc/pilight/pilight.pem"
                }
            }
        },
        "webgui": {
            "tabs": 1
        }
    }
}

That is the gdb-output
Code:
(/home/pilight/source/daemon-dev/daemon.c #410) [Oct 19 13:23:53:101356] DEBUG: broadcasted: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-cd7a82","devices":["Diele"],"values":{"timestamp":1571491433,"state":"on"}}
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #395) [Oct 19 13:23:53:101567] DEBUG: socket write succeeded: {"origin":"sender","protocol":"generic_switch","message":{"id":99,"state":"on"},"repeat":1,"uuid":"0000-b8-27-eb-cd7a82"}

(/home/pilight/source/daemon-dev/daemon.c #501) [Oct 19 13:23:53:101621] DEBUG: broadcasted: {"origin":"sender","protocol":"generic_switch","message":{"id":99,"state":"on"},"repeat":1,"uuid":"0000-b8-27-eb-cd7a82"}
(/home/pilight/source/daemon-dev/libs/pilight/lua_c/async/thread.c #247) [Oct 19 13:23:53:102137] DEBUG: lua thread on state #1
(/home/pilight/source/daemon-dev/libs/pilight/events/events.c #2043) [Oct 19 13:23:53:102507] INFO: executed rule: DieleAn
(/home/pilight/source/daemon-dev/libs/pilight/lua_c/async/thread.c #247) [Oct 19 13:23:53:102532] DEBUG: lua thread on state #0
(/home/pilight/source/daemon-dev/libs/pilight/events/events.c #2050) [Oct 19 13:23:53:102577] DEBUG: rule #1 DieleAn was parsed in 0.001140 seconds
(/home/pilight/source/daemon-dev/libs/pilight/events/events.c #2050) [Oct 19 13:23:53:102807] DEBUG: rule #2 DieleAus was parsed in 0.000072 seconds
(/home/pilight/source/daemon-dev/daemon.c #743) [Oct 19 13:23:53:103551] DEBUG: **** RAW CODE ****
180 540 540 180 180 540 180 540 180 540 540 180 180 540 540 180 180 540 180 540 180 540 540 180 180 540 540 180 180 540 540 180 180 540 180 540 540 180 540 180 180 540 180 540 540 180 540 180 180 6120
(/home/pilight/source/daemon-dev/daemon.c #750) [Oct 19 13:23:53:103799] DEBUG: **** RAW CODE ****
(/home/pilight/source/daemon-dev/daemon.c #743) [Oct 19 13:23:53:105034] DEBUG: **** RAW CODE ****
(/home/pilight/source/daemon-dev/libs/pilight/lua_c/async/event.c #88) [Oct 19 13:23:53:105045] DEBUG: lua async on state #0
180 540 540 180 180 540 180 540 180 540 540 180 180 540 540 180 180 540 180 540 180 540 540 180 180 540 540 180 180 540 540 180 540 180 540 180 180 540 180 540 180 540 180 540 540 180 540 180 180 6120
(/home/pilight/source/daemon-dev/daemon.c #750) [Oct 19 13:23:53:105221] DEBUG: **** RAW CODE ****
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #395) [Oct 19 13:23:53:105593] DEBUG: socket write succeeded: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-cd7a82","devices":["SteckdoseRund1"],"values":{"timestamp":1571491433,"state":"on"}}

(/home/pilight/source/daemon-dev/daemon.c #410) [Oct 19 13:23:53:105679] DEBUG: broadcasted: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-cd7a82","devices":["SteckdoseRund1"],"values":{"timestamp":1571491433,"state":"on"}}
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #395) [Oct 19 13:23:53:106205] DEBUG: socket write succeeded: {"origin":"sender","protocol":"clarus_switch","message":{"id":"A3","unit":18,"state":"on"},"repeat":1,"uuid":"0000-b8-27-eb-cd7a82"}

(/home/pilight/source/daemon-dev/daemon.c #501) [Oct 19 13:23:53:106320] DEBUG: broadcasted: {"origin":"sender","protocol":"clarus_switch","message":{"id":"A3","unit":18,"state":"on"},"repeat":1,"uuid":"0000-b8-27-eb-cd7a82"}
(/home/pilight/source/daemon-dev/libs/pilight/lua_c/async/event.c #88) [Oct 19 13:23:53:106645] DEBUG: lua async on state #0
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #395) [Oct 19 13:23:53:107000] DEBUG: socket write succeeded: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-cd7a82","devices":["SteckdoseRund2"],"values":{"timestamp":1571491433,"state":"on"}}

(/home/pilight/source/daemon-dev/daemon.c #410) [Oct 19 13:23:53:107062] DEBUG: broadcasted: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-cd7a82","devices":["SteckdoseRund2"],"values":{"timestamp":1571491433,"state":"on"}}
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #395) [Oct 19 13:23:53:107309] DEBUG: socket write succeeded: {"origin":"sender","protocol":"clarus_switch","message":{"id":"B3","unit":18,"state":"on"},"repeat":1,"uuid":"0000-b8-27-eb-cd7a82"}

(/home/pilight/source/daemon-dev/daemon.c #501) [Oct 19 13:23:53:107370] DEBUG: broadcasted: {"origin":"sender","protocol":"clarus_switch","message":{"id":"B3","unit":18,"state":"on"},"repeat":1,"uuid":"0000-b8-27-eb-cd7a82"}
(/home/pilight/source/daemon-dev/libs/pilight/lua_c/async/timer.c #377) [Oct 19 13:23:53:204487] DEBUG: lua timer on state #0
(/home/pilight/source/daemon-dev/libs/pilight/lua_c/async/timer.c #377) [Oct 19 13:23:53:450686] DEBUG: lua timer on state #0

Thread 1 "pilight-daemon" received signal SIGSEGV, Segmentation fault.
0x76801238 in plua_namespace (module=0x0, p=p@entry=0x7effefc0 "")
   at /home/pilight/source/daemon-dev/libs/pilight/lua_c/lua.c:202
202    /home/pilight/source/daemon-dev/libs/pilight/lua_c/lua.c: Datei oder Verzeichnis nicht gefunden.
(gdb) backtrace
#0  0x76801238 in plua_namespace (module=0x0, p=p@entry=0x7effefc0 "")
   at /home/pilight/source/daemon-dev/libs/pilight/lua_c/lua.c:202
#1  0x768278b0 in timer_callback (req=<optimized out>)
   at /home/pilight/source/daemon-dev/libs/pilight/lua_c/async/timer.c:380
#2  0x7678e8a8 in uv__run_timers (
   loop=loop@entry=0x76f9d598 <default_loop_struct>)
   at /home/pilight/source/daemon-dev/libs/libuv/unix/timer.c:165
#3  0x7677fd54 in uv_run (loop=0x76f9d598 <default_loop_struct>,
   mode=mode@entry=UV_RUN_DEFAULT)
   at /home/pilight/source/daemon-dev/libs/libuv/unix/core.c:353
#4  0x0000b898 in main (argc=<optimized out>, argv=<optimized out>)
   at /home/pilight/source/daemon-dev/daemon.c:3512
(gdb)

If I replace the rule containing the AND with 2 rules, which switch only one device, the error stays. But introducing a AFTER '1 SECOND' in the second rule fixes the error. I am running on a Raspberry3. I would like to remind you that earlier there was an issue with the AND clause. Then the devices just did not respond. In the late 8.1.4 and in 8.1.5 versions that was fixed. That seems to be an issue of a end-event starting durring an already running pulse.

Can you give me some guidance for replacing the lua-file?

Uli
 
Reply
#17
Quote:Can you give me some guidance for replacing the lua-file?
As i said, you just have to replace the content of the local file with the one i've linked.



Additionally, i could finally reproduce the error. Thanks.



I also know where the error occurs. Replace the 433gpio module to a previous version indeed fixes it. You can use that intermediat fix until i fixed it properly in the latest 433gpio module.
 
Reply
#18
(10-19-2019, 06:29 PM)curlymo Wrote:
Quote:Can you give me some guidance for replacing the lua-file?
As i said, you just have to replace the content of the local file with the one i've linked.



Additionally, i could finally reproduce the error. Thanks.



I also know where the error occurs. Replace the 433gpio module to a previous version indeed fixes it. You can use that intermediat fix until i fixed it properly in the latest 433gpio module.

I tried to replace this file, but it did not help. Will wait for the real fix. BTW how could you reproduce it now?
Uli
 
Reply
#19
The issue should be fixed in the next nightly.
 
Reply
#20
(10-20-2019, 09:14 PM)curlymo Wrote: The issue should be fixed in the next nightly.

The nightly of today solves the problem, many thanks!

Uli
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  ][solved]Segfault when retrieving big chunked http message Niek 21 5,836 11-29-2018, 03:17 PM
Last Post: curlymo
  http code 301 causes segfault Niek 3 3,334 08-14-2018, 06:57 PM
Last Post: curlymo
  Long label text causes segfault Niek 10 1,315 06-29-2018, 02:18 PM
Last Post: Niek
  [Solved] config.json not updated Niek 6 1,510 12-31-2017, 03:19 PM
Last Post: curlymo
  [Solved] callback not executing when dns lookup fails Niek 1 638 10-08-2017, 11:44 AM
Last Post: curlymo
  [Solved] Rules switching state based on another device state not working apartmedia 6 2,460 09-27-2017, 01:41 PM
Last Post: apartmedia
  [Solved] connection to main pilight daemon lost TopdRob 20 4,225 09-17-2017, 04:30 PM
Last Post: curlymo
  [Solved] dimmer protocol kaku_dimmer does not react on dimmervalue apartmedia 25 4,050 09-16-2017, 10:29 PM
Last Post: apartmedia
  [Solved] Webgui not working in IE Ulrich.Arnold 7 1,779 09-12-2017, 05:22 PM
Last Post: Ulrich.Arnold
  [Solved] Sunriseset v7 fails after update and gives negative values PPacman 7 1,677 09-06-2017, 06:25 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)