• 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


Datetime
#21
I've removed all elements using the datetime protocol and now getting a segmentation fault ... Crying
Code:
root@homepi:/home/pi# pilight-daemon -D
[Dec 26 20:46:52:959869] pilight-daemon: DEBUG: removed protocol elro_he_contact
[Dec 26 20:46:52:963250] pilight-daemon: DEBUG: freed options struct
[Dec 26 20:46:52:966169] pilight-daemon: DEBUG: loaded protocol elro_he_contact.so
[Dec 26 20:46:52:968086] pilight-daemon: DEBUG: removed protocol openweathermap
[Dec 26 20:46:52:969978] pilight-daemon: DEBUG: stopped protocol threads
[Dec 26 20:46:52:971046] pilight-daemon: DEBUG: freed options struct
[Dec 26 20:46:52:971843] pilight-daemon: DEBUG: loaded protocol openweathermap.so
[Dec 26 20:46:52:973852] pilight-daemon: DEBUG: removed protocol datetime
[Dec 26 20:46:52:975022] pilight-daemon: DEBUG: stopped protocol threads
[Dec 26 20:46:52:976062] pilight-daemon: DEBUG: ran garbage collector
[Dec 26 20:46:52:977103] pilight-daemon: DEBUG: freed options struct
[Dec 26 20:46:52:978050] pilight-daemon: DEBUG: loaded protocol datetime.so
[Dec 26 20:46:52:980341] pilight-daemon: DEBUG: loaded protocol elro_he.so
[  Dec 26 20:46:53:6775] pilight-daemon: DEBUG: ssdp sent search
[Dec 26 20:46:53:108838] pilight-daemon: NOTICE: no pilight daemon found, daemonizing
[Dec 26 20:46:53:112099] pilight-daemon: INFO: daemon listening to port: 48721
[Dec 26 20:46:53:118316] pilight-daemon: DEBUG: running on a raspberrypi
[Dec 26 20:46:53:129417] pilight-daemon: DEBUG: new thread lirc, 1 thread running
[Dec 26 20:46:53:132244] pilight-daemon: DEBUG: new thread openweathermap, 2 threads running
[Dec 26 20:46:53:135122] pilight-daemon: DEBUG: new thread socket, 3 threads running
[Dec 26 20:46:53:137311] pilight-daemon: DEBUG: new thread ssdp, 4 threads running
[Dec 26 20:46:53:140755] pilight-daemon: DEBUG: new thread sender, 5 threads running
[Dec 26 20:46:53:146465] pilight-daemon: DEBUG: new thread broadcaster, 6 threads running
[Dec 26 20:46:53:146465] pilight-daemon: INFO: new client, ip: 127.0.0.1, port: 33552
[Dec 26 20:46:53:151454] pilight-daemon: DEBUG: client fd: 10
[Dec 26 20:46:53:151832] pilight-daemon: DEBUG: client id: 1
[Dec 26 20:46:53:153682] pilight-daemon: DEBUG: new thread 433gpio, 7 threads running
[Dec 26 20:46:53:156251] pilight-daemon: DEBUG: new thread receive parser, 8 threads running
[Dec 26 20:46:53:158062] pilight-daemon: DEBUG: new thread events client, 9 threads running
[Dec 26 20:46:53:159743] pilight-daemon: DEBUG: new thread events loop, 10 threads running
[Dec 26 20:46:53:161709] pilight-daemon: NOTICE: php support disabled due to missing php-cgi executable
[Dec 26 20:46:53:164729] pilight-daemon: DEBUG: ssdp sent notify
[Dec 26 20:46:53:168019] pilight-daemon: DEBUG: ssdp sent search
[Dec 26 20:46:53:170094] pilight-daemon: DEBUG: new thread webserver worker #0, 11 threads running
[Dec 26 20:46:53:172234] pilight-daemon: DEBUG: webserver listening to port 5001
[Dec 26 20:46:53:173950] pilight-daemon: DEBUG: new thread webserver client, 12 threads running
[Dec 26 20:46:53:175610] pilight-daemon: DEBUG: new thread webserver broadcast, 13 threads running
[Dec 26 20:46:53:179678] pilight-daemon: DEBUG: new thread firmware upgrader, 14 threads running
[Dec 26 20:46:53:183095] pilight-daemon: DEBUG: ssdp sent notify
[Dec 26 20:46:53:186125] pilight-daemon: DEBUG: ssdp sent search
[Dec 26 20:46:53:187979] pilight-daemon: DEBUG: cpu: 0.000000%, ram: 0.499303%
[Dec 26 20:46:53:269735] pilight-daemon: DEBUG: [Dec 26 20:46:53:270654] pilight-daemon: INFO: new client, ip: 192.168.122.65, port: 34716
[Dec 26 20:46:53:273118] pilight-daemon: DEBUG: client fd: 14
[Dec 26 20:46:53:273525] pilight-daemon: DEBUG: client id: 2
[Dec 26 20:46:53:274714] pilight-daemon: DEBUG: socket recv: {"action":"identify","options":{"config":1},"media":"all"}
[Dec 26 20:46:53:276379] pilight-daemon: DEBUG: socket write succeeded: {"action":"identify","options":{"config":1},"media":"all"}

socket write succeeded: {"status":"success"}

[Dec 26 20:46:53:289732] pilight-daemon: DEBUG: socket write succeeded: {"action":"identify","options":{"config":1,"core":1},"media":"web"}

[Dec 26 20:46:53:290696] pilight-daemon: INFO: new client, ip: 192.168.122.65, port: 34717
[Dec 26 20:46:53:292583] pilight-daemon: DEBUG: client fd: 16
[Dec 26 20:46:53:293509] pilight-daemon: DEBUG: client id: 3
[Dec 26 20:46:53:294722] pilight-daemon: DEBUG: socket recv: {"action":"identify","options":{"config":1,"core":1},"media":"web"}
[Dec 26 20:46:53:295517] pilight-daemon: DEBUG: socket write succeeded: {"status":"success"}

Segmentation fault
EDIT: removed datetime protocol but did not help.
EDIT 2:
I've followed the steps on the site for debugging:
Code:
[Dec 26 20:56:17:695968] pilight-daemon: DEBUG: new thread firmware upgrader, 14 threads running

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb5c87470 (LWP 1453)]
0x00000000 in ?? ()
(gdb) backtrace
#0  0x00000000 in ?? ()
#1  0xb6c93d74 in openweathermapParse () from /usr/local/lib/pilight/protocols/openweathermap.so
#2  0xb6e31bfc in start_thread () from /lib/arm-linux-gnueabihf/libpthread.so.0
#3  0xb6d8f968 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#4  0xb6d8f968 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) frame 4
#4  0xb6d8f968 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
(gdb) frame 3
#3  0xb6d8f968 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
(gdb) frame 2
#2  0xb6e31bfc in start_thread () from /lib/arm-linux-gnueabihf/libpthread.so.0
(gdb) frame 1
#1  0xb6c93d74 in openweathermapParse () from /usr/local/lib/pilight/protocols/openweathermap.so
(gdb) frame 0
#0  0x00000000 in ?? ()
(gdb)
so I removed the Openweathermap protocol and the segmentation fault was gone. I've reinstalled datetime, but the ID related error is till there, so I removed the datetime device and pilight is starting without any issues now ...
 
Reply
#22
No it did not... Also after removing the program protocol from either the config and the actual removal itself gives me another segfault;
Code:
(gdb) backtrace
#0  0x00000000 in ?? ()
#1  0xb6c89658 in datetimeParse () from /usr/local/lib/pilight/protocols/datetime.so
#2  0xb6e31bfc in start_thread () from /lib/arm-linux-gnueabihf/libpthread.so.0
#3  0xb6d8f968 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#4  0xb6d8f968 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Again no extra information after the frame 1 command...
 
Reply
#23
The datetime issue was asked and answered before.
 
Reply
#24
Is the answer reinstalling pilight? Because this got wrecked up after updating to the newest nightly, without touching it. Also I have tried and copypasted from wiki - nothing.
 
Reply
#25
I can confirm that.
Updated to last dev this moment.

Alwaysworked before:
Code:
"zeit": {
                        "protocol": [ "datetime" ],
                        "id": [{
                                "longitude": "13.8437",
                                "latitude": "48.3428",
                                "ntpserver": "at.pool.ntp.org"
                        }],
                        "year": 2014,
                        "month": 12,
                        "day": 26,
                        "hour": 15,
                        "minute": 24,
                        "second": 28
                },

Now i get this error:

Code:
root@terrar:/home/pi/pilight# pilight-daemon -V
pilight-daemon version 5.0, commit 3314bad
root@terrar:/home/pi/pilight# service pilight start
[....] Starting : pilight[Dec 27 00:31:06:446475] pilight-daemon: ERROR: config device setting #2 "id" of "zeit", invalid
failed!
 
Reply
#26
Yay! Happy to hear there are more people, not only me :-)
 
Reply
#27
No, the answer is checking the github commit messages and searching the forum for the other thread.
 
Reply
#28
I would not have posted this here if I wouldn't crawl the forum Smile And btw, you should not expect users to go thru code on git. Even if I've done some programming, I am very unfamiliar with C's syntax and also I don't know your algorithm. Wink
I struggle day by day with this - even the entry in the wiki is not helping. I'm also trying to avoid going back to stable hoping that the bugs are been fixed, and "swallow down" other less important bugs. Please don't be the "bad moderator" only posting RTFMs Smile This time it is really not my fault.

OK, something new. Config:
Code:
Config:
                "datetime": {
                        "protocol": [ "datetime" ],
                        "id": [{
                                "longitude": 8.53031,
                                "latitude": 50.15403,
                                "ntpserver": "0.europe.pool.ntp.org"
                        }],
                        "year": 2014,
                        "second": 54,
                        "minute": 33,
                        "hour": 23,
                        "day": 23,
                        "month": 12
                }
Debug:
Code:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb5c74470 (LWP 3490)]
0x00000000 in ?? ()
(gdb) backtrace
#0  0x00000000 in ?? ()
#1  0xb6c80658 in datetimeParse () from /usr/local/lib/pilight/protocols/datetime.so
#2  0xb6e31bfc in start_thread () from /lib/arm-linux-gnueabihf/libpthread.so.0
#3  0xb6d8f968 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#4  0xb6d8f968 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Now trying terrar's code:
Code:
root@homepi:/etc/pilight# service pilight start
[....] Starting : pilight[Dec 27 04:12:43:170239] pilight-daemon: ERROR: config device setting #2 "id" of "zeit", invalid
failed!
Conclusion:
setting the ID as string produces the invalid ID error, setting the ID as number produces a segmentation fault.
@terrar and @fvandenreek do you experience the same?^
EDIT: try removing /usr/local/lib/pilight/protocols/datetime.so, this has helped for me, though I still don't know how to display that within the GUI.
EDIT2: BTW, the openweathermap bug reported before is also gone now. Openweathermap is working as it should. Datetime's sunset function is working, will test the one from Openweathermap later. Goodnight. Smile
 
Reply
#29
Try backing up /usr/local/lib/pilight/protocols/datetime.so and removing it. Worked for me, please test for you and report if working.
 
Reply
#30
Set the ID as number (removing the "") worked for me.
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)