• 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] connection to main pilight daemon lost
#1
Hello,

My test instance running nightly is doing fine however after a while it's crashing. pilight-daemon version v7.0-212-g7614865
Code:
[ Aug 29 20:03:40:28880] pilight-daemon: NOTICE: connection to main pilight daemon lost
[ Aug 29 20:03:40:29113] pilight-daemon: NOTICE: trying to reconnect...
[Aug 29 20:03:40:360268] pilight-daemon: DEBUG: cpu: 0.173792%
[ Aug 29 20:03:41:29669] pilight-daemon: DEBUG: ssdp sent search
[Aug 29 20:03:41:131790] pilight-daemon: NOTICE: no pilight ssdp connections found
Could this be related to the rewrite backport?
 
Reply
#2
Please post with using code tags.

Secondly, post a debug log with the crash. A howto can be found in the manual.
 
Reply
#3
Code:
(gdb) backtrace
#0  0x767cdeb0 in ?? () from /usr/local/lib/libpilight.so
#1  0x767cc65c in json_stringify () from /usr/local/lib/libpilight.so
#2  0x0004bb30 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Code:
(gdb) frame 2
#2  0x0004bb30 in ?? ()
(gdb) frame 1
#1  0x767cc65c in json_stringify () from /usr/local/lib/libpilight.so
(gdb) frame 0
#0  0x767cdeb0 in ?? () from /usr/local/lib/libpilight.so
(gdb)
 
Reply
#4
Can install the pilight nightly dbg version and retry?
 
Reply
#5
I've got some dependency problems with pilight-webgui when I try to install piligt-dbg. Reinstallation didn't fix it

Code:
$ sudo apt install pilight-dbg                            Pakketlijsten worden ingelezen... Klaar
Boom van vereisten wordt opgebouwd
De statusinformatie wordt gelezen... Klaar
Sommige pakketten konden niet geïnstalleerd worden. Dit kan betekenen
dat u om een onmogelijke situatie gevraagd heeft, of, indien u
de distributie 'unstable' gebruikt, dat sommige benodigde pakketten nog gemaakt moeten worden of uit 'Incoming' verwijderd werden.
De volgende informatie kan misschien helpen de situatie op te lossen:

De volgende pakketten hebben niet-voldane vereisten:
pilight-dbg : Vereisten: pilight-webgui (>= 7.7) maar het zal niet geïnstalleerd worden
E: Kan problemen niet verhelpen, u houdt defecte pakketten vast.
 
Reply
#6
Should be fixed in tonights packages. Or you can choose to force install it manually.
 
Reply
#7
Got pilight-dbg running with apt download and dpkg force. Here are the debug results

Code:
Thread 1 "pilight-daemon" received signal SIGSEGV, Segmentation fault.
0x767cdec0 in emit_value (out=0x7efff1ac, node=0x0)
    at /home/pilight/source/daemon-dev/libs/pilight/core/json.c:987
987     /home/pilight/source/daemon-dev/libs/pilight/core/json.c: Bestand of map bestaat niet.
Code:
(gdb) backtrace
#0  0x767cdec0 in emit_value (out=0x7efff1ac, node=0x0)
    at /home/pilight/source/daemon-dev/libs/pilight/core/json.c:987
#1  0x767cc66c in json_stringify (node=0x0, space=0x0)
    at /home/pilight/source/daemon-dev/libs/pilight/core/json.c:405
#2  0x0000b5ec in broadcast_queue (protoname=0x340d0 "wunderground", json=0x0,
    origin=PROTOCOL) at /home/pilight/source/daemon-dev/daemon.c:280
#3  0x7683b84c in enable (param=0x43fb8)
    at /home/pilight/source/daemon-dev/libs/pilight/protocols/API/wunderground.c:713
#4  0x767ab424 in uv__run_timers (loop=0x76fbf0d8 <default_loop_struct>)
    at /home/pilight/source/daemon-dev/libs/libuv/unix/timer.c:165
#5  0x7679028c in uv_run (loop=0x76fbf0d8 <default_loop_struct>,
    mode=UV_RUN_DEFAULT)
    at /home/pilight/source/daemon-dev/libs/libuv/unix/core.c:353
#6  0x00013e0c in main (argc=2, argv=0x7efff7b4)
    at /home/pilight/source/daemon-dev/daemon.c:3419
Code:
(gdb) frame 6
#6  0x00013e0c in main (argc=2, argv=0x7efff7b4)
    at /home/pilight/source/daemon-dev/daemon.c:3419
3419    /home/pilight/source/daemon-dev/daemon.c: Bestand of map bestaat niet.
(gdb) frame 5
#5  0x7679028c in uv_run (loop=0x76fbf0d8 <default_loop_struct>,
    mode=UV_RUN_DEFAULT)
    at /home/pilight/source/daemon-dev/libs/libuv/unix/core.c:353
353     /home/pilight/source/daemon-dev/libs/libuv/unix/core.c: Bestand of map bestaat niet.
(gdb) frame 4
#4  0x767ab424 in uv__run_timers (loop=0x76fbf0d8 <default_loop_struct>)
    at /home/pilight/source/daemon-dev/libs/libuv/unix/timer.c:165
165     /home/pilight/source/daemon-dev/libs/libuv/unix/timer.c: Bestand of map bestaat niet.
(gdb) frame 3
#3  0x7683b84c in enable (param=0x43fb8)
    at /home/pilight/source/daemon-dev/libs/pilight/protocols/API/wunderground.c:713
713     /home/pilight/source/daemon-dev/libs/pilight/protocols/API/wunderground.c: Bestand of map bestaat niet.
(gdb) frame 2
#2  0x0000b5ec in broadcast_queue (protoname=0x340d0 "wunderground", json=0x0,
    origin=PROTOCOL) at /home/pilight/source/daemon-dev/daemon.c:280
280     /home/pilight/source/daemon-dev/daemon.c: Bestand of map bestaat niet.
(gdb) frame 1
#1  0x767cc66c in json_stringify (node=0x0, space=0x0)
    at /home/pilight/source/daemon-dev/libs/pilight/core/json.c:405
405     /home/pilight/source/daemon-dev/libs/pilight/core/json.c: Bestand of map bestaat niet.
(gdb) frame 0
#0  0x767cdec0 in emit_value (out=0x7efff1ac, node=0x0)
    at /home/pilight/source/daemon-dev/libs/pilight/core/json.c:987
987     in /home/pilight/source/daemon-dev/libs/pilight/core/json.c
 
Reply
#8
Are both pi's running the same version?

I indeed made an error in the protocol Smile
 
Reply
#9
Hi Curlymoo, I installed the dbg over the normal nightly so can't check versions anymore. Meanwhile I got another one.

Code:
(gdb) backtrace
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x763e3824 in __GI_abort () at abort.c:89
#2  0x7641cf78 in __libc_message (do_abort=do_abort@entry=2, fmt=<optimized out>)
    at ../sysdeps/posix/libc_fatal.c:175
#3  0x76423ad4 in malloc_printerr (action=<optimized out>,
    str=0x764d6398 "malloc(): memory corruption (fast)", ptr=<optimized out>,
    ar_ptr=<optimized out>) at malloc.c:5049
#4  0x76426308 in _int_malloc (av=av@entry=0x764f2794 <main_arena>, bytes=bytes@entry=18)
    at malloc.c:3424
#5  0x76428370 in __GI___libc_malloc (bytes=18) at malloc.c:2928
#6  0x767b827c in explode (str=0x69c80 "device=boekenkast&state=off", delimiter=0x76867678 "&",
    output=0x7eff9b88) at /home/pilight/source/daemon-dev/libs/pilight/core/common.c:129
#7  0x767dcf48 in parse_rest (req=0x3e030)
    at /home/pilight/source/daemon-dev/libs/pilight/core/webserver.c:556
#8  0x767ddd70 in request_handler (req=0x3e030)
    at /home/pilight/source/daemon-dev/libs/pilight/core/webserver.c:747
#9  0x767e1300 in client_read_cb (req=0x3e030, nread=0x6aabc, buf=0x699f0 "GET")
    at /home/pilight/source/daemon-dev/libs/pilight/core/webserver.c:1548
#10 0x767c0fc4 in uv_custom_poll_cb (req=0x3e030, status=0, events=1)
    at /home/pilight/source/daemon-dev/libs/pilight/core/eventpool.c:702
#11 0x7679ed2c in uv__poll_io (loop=0x76fbe4f8 <default_loop_struct>, w=0x3e064, events=1)
    at /home/pilight/source/daemon-dev/libs/libuv/unix/poll.c:64
#12 0x76798500 in uv__io_poll (loop=0x76fbe4f8 <default_loop_struct>, timeout=651)
    at /home/pilight/source/daemon-dev/libs/libuv/unix/linux-core.c:400
#13 0x7678e444 in uv_run (loop=0x76fbe4f8 <default_loop_struct>, mode=UV_RUN_DEFAULT)
    at /home/pilight/source/daemon-dev/libs/libuv/unix/core.c:362
#14 0x00013e2c in main (argc=2, argv=0x7efff7c4) at /home/pilight/source/daemon-dev/daemon.c:3423
Code:
(gdb) frame 14
#14 0x00013e2c in main (argc=2, argv=0x7efff7c4) at /home/pilight/source/daemon-dev/daemon.c:3423
3423    /home/pilight/source/daemon-dev/daemon.c: Bestand of map bestaat niet.
(gdb) frame 13
#13 0x7678e444 in uv_run (loop=0x76fbe4f8 <default_loop_struct>, mode=UV_RUN_DEFAULT)
    at /home/pilight/source/daemon-dev/libs/libuv/unix/core.c:362
362     /home/pilight/source/daemon-dev/libs/libuv/unix/core.c: Bestand of map bestaat niet.
(gdb) frame 12
#12 0x76798500 in uv__io_poll (loop=0x76fbe4f8 <default_loop_struct>, timeout=651)
    at /home/pilight/source/daemon-dev/libs/libuv/unix/linux-core.c:400
400     /home/pilight/source/daemon-dev/libs/libuv/unix/linux-core.c: Bestand of map bestaat niet.(gdb) frame 11
#11 0x7679ed2c in uv__poll_io (loop=0x76fbe4f8 <default_loop_struct>, w=0x3e064, events=1)
    at /home/pilight/source/daemon-dev/libs/libuv/unix/poll.c:64
64      /home/pilight/source/daemon-dev/libs/libuv/unix/poll.c: Bestand of map bestaat niet.
(gdb) frame 10
#10 0x767c0fc4 in uv_custom_poll_cb (req=0x3e030, status=0, events=1)
    at /home/pilight/source/daemon-dev/libs/pilight/core/eventpool.c:702
702     /home/pilight/source/daemon-dev/libs/pilight/core/eventpool.c: Bestand of map bestaat niet.
(gdb) frame 9
#9  0x767e1300 in client_read_cb (req=0x3e030, nread=0x6aabc, buf=0x699f0 "GET")
    at /home/pilight/source/daemon-dev/libs/pilight/core/webserver.c:1548
1548    /home/pilight/source/daemon-dev/libs/pilight/core/webserver.c: Bestand of map bestaat niet.
(gdb) frame 8
#8  0x767ddd70 in request_handler (req=0x3e030)
    at /home/pilight/source/daemon-dev/libs/pilight/core/webserver.c:747
747     in /home/pilight/source/daemon-dev/libs/pilight/core/webserver.c
(gdb) frame 7
#7  0x767dcf48 in parse_rest (req=0x3e030)
    at /home/pilight/source/daemon-dev/libs/pilight/core/webserver.c:556
556     in /home/pilight/source/daemon-dev/libs/pilight/core/webserver.c
(gdb) frame 6
#6  0x767b827c in explode (str=0x69c80 "device=boekenkast&state=off", delimiter=0x76867678 "&",
    output=0x7eff9b88) at /home/pilight/source/daemon-dev/libs/pilight/core/common.c:129
129     /home/pilight/source/daemon-dev/libs/pilight/core/common.c: Bestand of map bestaat niet.
(gdb) frame 5
#5  0x76428370 in __GI___libc_malloc (bytes=18) at malloc.c:2928
2928    malloc.c: Bestand of map bestaat niet.
(gdb) frame 4
#4  0x76426308 in _int_malloc (av=av@entry=0x764f2794 <main_arena>, bytes=bytes@entry=18)
    at malloc.c:3424
3424    in malloc.c
(gdb) frame 3
#3  0x76423ad4 in malloc_printerr (action=<optimized out>,
    str=0x764d6398 "malloc(): memory corruption (fast)", ptr=<optimized out>,
    ar_ptr=<optimized out>) at malloc.c:5049
5049    in malloc.c
(gdb) frame 2
#2  0x7641cf78 in __libc_message (do_abort=do_abort@entry=2, fmt=<optimized out>)
    at ../sysdeps/posix/libc_fatal.c:175
175     ../sysdeps/posix/libc_fatal.c: Bestand of map bestaat niet.
(gdb) frame 1
#1  0x763e3824 in __GI_abort () at abort.c:89
89      abort.c: Bestand of map bestaat niet.
(gdb) frame 0
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51      ../sysdeps/unix/sysv/linux/raise.c: Bestand of map bestaat niet.

pilight-daemon version v7.0-230-g5199090
 
Reply
#10
So this is a webserver issue. What's the url that was called?

Also, why can't you check the version?
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  [SOLVED] Triggering generic_switch leads to segfault Ulrich.Arnold 19 4,843 10-23-2019, 09:03 AM
Last Post: Ulrich.Arnold
  Protocol options defined as JSON_ARRAY getting lost Niek 6 2,693 01-01-2019, 11:03 AM
Last Post: curlymo
  ][solved]Segfault when retrieving big chunked http message Niek 21 8,468 11-29-2018, 03:17 PM
Last Post: curlymo
  pilight-control not able to connect with port and server setting apartmedia 10 5,540 10-22-2018, 08:00 AM
Last Post: apartmedia
  [Solved] config.json not updated Niek 6 2,318 12-31-2017, 03:19 PM
Last Post: curlymo
  [Solved] callback not executing when dns lookup fails Niek 1 1,168 10-08-2017, 11:44 AM
Last Post: curlymo
  [Solved] Rules switching state based on another device state not working apartmedia 6 3,369 09-27-2017, 01:41 PM
Last Post: apartmedia
  homebridge and pilight with scenes ebini 2 1,733 09-16-2017, 10:37 PM
Last Post: apartmedia
  [Solved] dimmer protocol kaku_dimmer does not react on dimmervalue apartmedia 25 6,656 09-16-2017, 10:29 PM
Last Post: apartmedia
  [Solved] Webgui not working in IE Ulrich.Arnold 7 2,807 09-12-2017, 05:22 PM
Last Post: Ulrich.Arnold

Forum Jump:


Browsing: 1 Guest(s)