• 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
Segmentation fault
#1
Hi all,

I've search with google and so on but couln't find a solution to my problemen.

Yesterday I installed pilight. I can use pilight-send to turn on (of off) the light. But when i am using the webgui i run in to a Segmentation fault.

I happens when I flip the switch to turn on the light. The conncetion is lost. I'm kinda cluless of what it is that is causing this. I tried several solutions i found on this forum and elsewhere but to no avail.

Below you kan find my gdb --args pilight-daemon -D log


Code:
Starting program: /usr/local/sbin/pilight-daemon -D
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[Jun 10 09:17:44:640563] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/date_add.lua v2.0
[Jun 10 09:17:44:640871] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/random.lua v2.1
[Jun 10 09:17:44:641186] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/date_format.lua v1.0
[Jun 10 09:17:44:641569] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/ne.lua v1.0
[Jun 10 09:17:44:641773] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/multiply.lua v1.0
[Jun 10 09:17:44:641991] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/lt.lua v1.0
[Jun 10 09:17:44:642172] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/gt.lua v1.0
[Jun 10 09:17:44:642379] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/le.lua v1.0
[Jun 10 09:17:44:642537] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/minus.lua v1.0
[Jun 10 09:17:44:642735] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/intdivide.lua v1.0
[Jun 10 09:17:44:642900] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/and.lua v1.0
[Jun 10 09:17:44:643066] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/eq.lua v1.0
[Jun 10 09:17:44:643262] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/or.lua v1.0
[Jun 10 09:17:44:643444] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/modulus.lua v1.0
[Jun 10 09:17:44:643619] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/ge.lua v1.0
[Jun 10 09:17:44:643775] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/plus.lua v1.0
[Jun 10 09:17:44:643961] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/divide.lua v1.0
[Jun 10 09:17:44:644141] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/concat.lua v1.0
[Jun 10 09:17:44:646956] pilight-daemon: INFO: rule #1 schuuruit was parsed in 0.002719 seconds
[Jun 10 09:17:44:649501] pilight-daemon: INFO: rule #2 schuuraan was parsed in 0.002479 seconds
[Jun 10 09:17:44:650503] pilight-daemon: INFO: version 040e3d863d4e11464e87fb42a1ea7dc184b5c011-nightly-040e3d8
[Jun 10 09:17:44:650681] pilight-daemon: DEBUG: ssdp sent search
[Jun 10 09:17:44:752417] pilight-daemon: INFO: no pilight daemon found, daemonizing
[Jun 10 09:17:44:763551] pilight-daemon: INFO: daemon listening to port: 42033
[New Thread 0x76272470 (LWP 22584)]
[New Thread 0x75a72470 (LWP 22585)]
[New Thread 0x74eff470 (LWP 22586)]
[Jun 10 09:17:44:766916] pilight-daemon: DEBUG: new thread socket, 1 thread running
[Jun 10 09:17:44:767303] pilight-daemon: INFO: new client, ip: 127.0.0.1, port: 53990
[Jun 10 09:17:44:767421] pilight-daemon: DEBUG: client fd: 14
[Jun 10 09:17:44:767449] pilight-daemon: DEBUG: client id: 1
[New Thread 0x746ff470 (LWP 22587)]
[Jun 10 09:17:44:771384] pilight-daemon: DEBUG: new thread ssdp, 2 threads running
[New Thread 0x73cff470 (LWP 22588)]
[Jun 10 09:17:44:772095] pilight-daemon: DEBUG: new thread sender, 3 threads running
[New Thread 0x734ff470 (LWP 22589)]
[Jun 10 09:17:44:773002] pilight-daemon: DEBUG: new thread broadcaster, 4 threads running
[Jun 10 09:17:44:773483] pilight-daemon: INFO: secured webserver started on port: 5002 (fd 15)
[Jun 10 09:17:44:773568] pilight-daemon: INFO: regular webserver started on port: 5000 (fd 16)
[New Thread 0x72aff470 (LWP 22590)]
[Jun 10 09:17:44:774973] pilight-daemon: DEBUG: new thread receive parser, 5 threads running
[New Thread 0x722ff470 (LWP 22591)]
[Jun 10 09:17:44:775579] pilight-daemon: DEBUG: new thread events client, 6 threads running
[Jun 10 09:17:44:775645] pilight-daemon: DEBUG: ssdp sent notify
[Jun 10 09:17:44:775694] pilight-daemon: DEBUG: ssdp sent search
[New Thread 0x71aff470 (LWP 22592)]
[Jun 10 09:17:44:776402] pilight-daemon: DEBUG: new thread events loop, 7 threads running
[Jun 10 09:17:44:882605] pilight-daemon: INFO: new client, ip: 192.168.2.103, port: 36920
[Jun 10 09:17:44:882669] pilight-daemon: DEBUG: client fd: 18
[Jun 10 09:17:44:882685] pilight-daemon: DEBUG: socket write succeeded: {"action":"identify","options":{"config":1,"receiver":1},"media":"all"}

[Jun 10 09:17:44:882692] pilight-daemon: DEBUG: client id: 2
[Jun 10 09:17:44:882833] pilight-daemon: DEBUG: socket recv: {"action":"identify","options":{"config":1,"receiver":1},"media":"all"}
[Jun 10 09:17:44:883384] pilight-daemon: DEBUG: socket write succeeded: {"status":"success"}

[Jun 10 09:17:45:628113] pilight-daemon: DEBUG: cpu: 0.000000%
[New Thread 0x712ff470 (LWP 22593)]
[New Thread 0x70aff470 (LWP 22594)]
[New Thread 0x702ff470 (LWP 22595)]
[New Thread 0x6faff470 (LWP 22596)]
[Jun 10 09:17:48:627574] pilight-daemon: DEBUG: cpu: 0.063423%
[Jun 10 09:17:51:189584] pilight-daemon: DEBUG: new client, ip: 192.168.2.9, port: 51620
[Jun 10 09:17:51:189667] pilight-daemon: DEBUG: client fd: 19
[Jun 10 09:17:51:225819] pilight-daemon: DEBUG: new client, ip: 192.168.2.9, port: 51621
[Jun 10 09:17:51:225900] pilight-daemon: DEBUG: client fd: 19
[Jun 10 09:17:51:226256] pilight-daemon: DEBUG: new client, ip: 192.168.2.9, port: 51622
[Jun 10 09:17:51:226299] pilight-daemon: DEBUG: client fd: 21
[Jun 10 09:17:51:230130] pilight-daemon: DEBUG: new client, ip: 192.168.2.9, port: 51623
[Jun 10 09:17:51:230173] pilight-daemon: DEBUG: client fd: 22
[Jun 10 09:17:51:231524] pilight-daemon: DEBUG: new client, ip: 192.168.2.9, port: 51624
[Jun 10 09:17:51:231568] pilight-daemon: DEBUG: client fd: 23
[Jun 10 09:17:51:239433] pilight-daemon: DEBUG: new client, ip: 192.168.2.9, port: 51625
[Jun 10 09:17:51:239479] pilight-daemon: DEBUG: client fd: 24
[Jun 10 09:17:51:241327] pilight-daemon: DEBUG: new client, ip: 192.168.2.9, port: 51626
[Jun 10 09:17:51:241370] pilight-daemon: DEBUG: client fd: 25
[Jun 10 09:17:51:276803] pilight-daemon: DEBUG: new client, ip: 192.168.2.9, port: 51627
[Jun 10 09:17:51:276886] pilight-daemon: DEBUG: client fd: 22
[Jun 10 09:17:51:496183] pilight-daemon: DEBUG: new client, ip: 192.168.2.9, port: 51629
[Jun 10 09:17:51:496266] pilight-daemon: DEBUG: client fd: 19
[Jun 10 09:17:51:518518] pilight-daemon: DEBUG: new client, ip: 192.168.2.9, port: 51630
[Jun 10 09:17:51:518584] pilight-daemon: DEBUG: client fd: 19
[Jun 10 09:17:51:538483] pilight-daemon: DEBUG: new client, ip: 192.168.2.9, port: 51631
[Jun 10 09:17:51:538546] pilight-daemon: DEBUG: client fd: 19
[Jun 10 09:17:51:550109] pilight-daemon: DEBUG: new client, ip: 192.168.2.9, port: 51632
[Jun 10 09:17:51:550176] pilight-daemon: DEBUG: client fd: 19
[Jun 10 09:17:51:559942] pilight-daemon: DEBUG: socket recv: {"action":"request config"}
[Jun 10 09:17:51:577137] pilight-daemon: DEBUG: socket recv: {"action":"request values"}
[Jun 10 09:17:51:627647] pilight-daemon: DEBUG: cpu: 0.745320%
[Jun 10 09:17:53:268208] pilight-daemon: DEBUG: socket recv: {"action":"control","code":{"device":"pischuur","state":"on"}}

Thread 14 "pilight-daemon" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x6faff470 (LWP 22596)]
0x000155ec in send_queue (json=0x75000878, origin=SENDER) at /home/pi/pilight/daemon.c:902
902                             protocol->raw = raw;



And my config.json looks like this:

Code:
{
        "devices": {
                "pischuur": {
                        "protocol": [ "kaku_switch" ],
                        "id": [{
                                "id": 1,
                                "unit": 1
                        }],
                        "state": "off"
                }
        },
        "rules": {
                "schuuruit": {
                        "rule": "IF pischuur.state == on THEN switch DEVICE pischuur TO off AFTER '800 MILLISECOND'",
                        "active": 1
                },
                "schuuraan": {
                        "rule": "IF pischuur.state == off THEN switch DEVICE pischuur TO on AFTER '800 MILLISECOND'",
                        "active": 1
                }
        },
        "gui": {
                "pischuur": {
                        "name": "Pi Schuur",
                        "group": [ "Schuur" ],
                        "media": [ "all" ],
                        "readonly": 0
                }
        },
        "settings": {
                "log-level": 6,
                "pid-file": "/var/run/pilight.pid",
                "log-file": "/var/log/pilight.log",
                "webserver-enable": 1,
                "webserver-root": "/usr/local/share/pilight/webgui",
                "webserver-http-port": 5000,
                "webserver-https-port": 5002,
                "webserver-cache": 1,
                "standalone": 0,
                "gpio-platform": "raspberrypi3"
        },
        "hardware": {
                "433gpio": {
                        "sender": 0,
                        "receiver": 1
                }
        },
        "registry": {
                "pilight": {
                        "version": {
                                "current": "7.0"
                        }
                }
        }
}


Any idea whats wrong?

Thanks in advance
 
Reply
#2
Your post is absolutely unreadable. Please use code tags to fix t.
 
Reply
#3
(06-10-2018, 10:44 AM)curlymo Wrote: Your post is absolutely unreadable. Please use code tags to fix t.

Hope this is better!
 
Reply
#4
Can you check if the issue persists in the latest pilight version?
 
Reply
#5
(06-10-2018, 10:52 AM)curlymo Wrote: Can you check if the issue persists in the latest pilight version?

I'll have a look.
 
Reply
#6
(06-10-2018, 10:55 AM)pluis29 Wrote:
(06-10-2018, 10:52 AM)curlymo Wrote: Can you check if the issue persists in the latest pilight version?

I'll have a look.

According to apt-cache policy pilight :
  Geïnstalleerd: 8.1.0
  Kandidaat:     8.1.0

Or am i doing somting wrong?
 
Reply
#7
Your debug output version string didn't look right. That's why i asked.
 
Reply
#8
(06-10-2018, 12:36 PM)curlymo Wrote: Your debug output version string didn't look right. That's why i asked.

I did a complete reinstall. and it seems to work fine now. 



Anyway thank for the support!

edit: looks like I installed it twice somehow.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  pilight-debug with 433nano Segmentation fault hurdigurdi 6 766 09-30-2018, 12:07 PM
Last Post: hurdigurdi
  Segmentation fault wth gpio-platform raspberrypi1b1 meloen 12 1,152 09-10-2018, 07:44 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)