• 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?
#11
Can you recompile but now with excluding pollin.
 
Reply
#12
I do not think it is pollin. That must be something different.
I have similar problems, typically it happens whenever the GUI is not terminated properly:
Code:
[Mar 04 01:11:21:470494] pilight-daemon: -- STACKTRACE (5 FRAMES) --
[Mar 04 01:11:21:473182] pilight-daemon: __default_sa_restorer_v2       ip = 0x76cf1180, sp = 0x70afeac8
[Mar 04 01:11:21:475085] pilight-daemon: broadcast                      ip =    0x210f8, sp = 0x70afedb8
[Mar 04 01:11:21:477152] pilight-daemon: start_thread                   ip = 0x76ed5e90, sp = 0x70afee60
[Mar 04 01:11:21:479136] pilight-daemon: clone                          ip = 0x76d93598, sp = 0x70afefa0

In my opinion it would be useful to have linker maps available for debugging purposes (options -Wl -map).
It looks like memory freed up and a pointer writes into previously unallocated memory, or memory allocated in an interrupt routine and the garbage collecter moved the code around ?
 
Reply
#13
Except that all three bugs @creamers reports involves pollin. The cause for your bug is know and fixed in the rewrite code.
 
Reply
#14
I also had the same bug with "fasttop", pilight always crashed at least once per day, sometimes within one hour. By restarting the service, nothing worked, only if I run pilight-daemon from the command-line, it continued until the next crash. Or after a reboot, the service started again.

The only week, when it was really running, was when we were in holiday. My pilight only needs to receive temperature-signals and signals from motion detectors or window sensors.

After about 20 clean install of raspbian (meanwhile my first Raspi gave up), trying everything like nightly, manual install and only choosing the protocols I really use, I found an error message with something like "locale".

The locale of raspbian is one of the first thing i change and remove the default en_us locale.

So after this message, i selected the en_us locale and set it to default in raspi-config. Since then, my pilight-service is running since almost two days, which is far more than everything before - I will have an eye on it.

Hope that helps you for find and fix the bug.
 
Reply
#15
Code:
pi@pilight:~ $ sudo raspi-config
Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.
pi@pilight:~ $

Will try it out.

I do regularly (every half hour) check (urllib2.urlopen(theStatusurl)) the gui state, maybe there is a connection also.

I use pollin because my motion detection uses this protocol for my alarm system.
 
Reply
#16
so far so good. Havent had a crash since "en_US.UTF-8" on 9-3
 
Reply
#17
I jinxed it )-: but this is a new error ?

Code:
[Mar 19 10:00:41:511994] pilight-daemon: DEBUG: rule #4 ResetSoundAlarmState was parsed in 0.577020 seconds
[Mar 19 10:00:41:512978] pilight-daemon: INFO: stopped "switch" action for device "SoundAlarm"
[Mar 19 10:00:41:513297] pilight-daemon: DEBUG: rule #9 SoundAlarm was parsed in 0.000260 seconds
[Thread 0x6bacc460 (LWP 18090) exited]
[New Thread 0x6c2cc460 (LWP 18091)]
[ Mar 19 10:00:42:90785] pilight-daemon: INFO: executed rule: PIR-changeLabel
[ Mar 19 10:00:42:90763] pilight-daemon: INFO: started "label" action for device "PIRlabel"
[ Mar 19 10:00:42:90938] pilight-daemon: DEBUG: rule #10 PIR-changeLabel was parsed in 0.577392 seconds
*** Error in `/root/pilight/build/pilight-daemon': corrupted double-linked list: 0x75807400 ***

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x702ff460 (LWP 710)]
0x76b33f70 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) backtrace
#0  0x76b33f70 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x76b35324 in __GI_abort () at abort.c:89
#2  0x76b6f954 in __libc_message (do_abort=<optimized out>,
    fmt=0x76c256e8 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/posix/libc_fatal.c:175
#3  0x76b75b80 in malloc_printerr (action=1,
    str=0x76c2572c "corrupted double-linked list", ptr=<optimized out>)
    at malloc.c:4996
#4  0x76b75f14 in malloc_consolidate (av=av@entry=0x75800010) at malloc.c:4157
#5  0x76b77aa0 in _int_malloc (av=av@entry=0x75800010, bytes=bytes@entry=649)
    at malloc.c:3423
#6  0x76b790bc in _int_realloc (av=av@entry=0x75800010,
    oldp=oldp@entry=0x75807ef8, oldsize=oldsize@entry=152, nb=nb@entry=656)
    at malloc.c:4286
#7  0x76b7a6f4 in __GI___libc_realloc (oldmem=0x75807f00, bytes=652)
    at malloc.c:3029
#8  0x0004513c in socket_read (sockfd=9, message=0x8ab494 <recvBuff>,
    timeout=1) at /root/pilight/libs/pilight/core/socket.c:471
#9  0x00064624 in events_clientize (param=0x0)
    at /root/pilight/libs/pilight/events/events.c:1936
#10 0x76f0ae90 in start_thread (arg=0x702ff460) at pthread_create.c:311
#11 0x76bd7598 in ?? ()
---Type <return> to continue, or q <return> to quit---
    at ../ports/sysdeps/unix/sysv/linux/arm/nptl/../clone.S:92
   from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Frames
Code:
(gdb) frame 11
#11 0x76bd7598 in ?? ()
    at ../ports/sysdeps/unix/sysv/linux/arm/nptl/../clone.S:92
   from /lib/arm-linux-gnueabihf/libc.so.6
92      ../ports/sysdeps/unix/sysv/linux/arm/nptl/../clone.S: No such file or directory.
(gdb) frame 10
#10 0x76f0ae90 in start_thread (arg=0x702ff460) at pthread_create.c:311
311     pthread_create.c: No such file or directory.
(gdb) frame 9
#9  0x00064624 in events_clientize (param=0x0)
    at /root/pilight/libs/pilight/events/events.c:1936
1936                            int z = socket_read(sockfd, &recvBuff, 1);
(gdb) frame 8
#8  0x0004513c in socket_read (sockfd=9, message=0x8ab494 <recvBuff>,
    timeout=1) at /root/pilight/libs/pilight/core/socket.c:471
471                                             if((*message = REALLOC(*message, (size_t)ptr+1)) == NULL) {
(gdb) frame 7
#7  0x76b7a6f4 in __GI___libc_realloc (oldmem=0x75807f00, bytes=652)
    at malloc.c:3029
3029    malloc.c: No such file or directory.
(gdb) frame 6
#6  0x76b790bc in _int_realloc (av=av@entry=0x75800010,
    oldp=oldp@entry=0x75807ef8, oldsize=oldsize@entry=152, nb=nb@entry=656)
    at malloc.c:4286
4286    in malloc.c
(gdb) frame 5
#5  0x76b77aa0 in _int_malloc (av=av@entry=0x75800010, bytes=bytes@entry=649)
    at malloc.c:3423
3423    in malloc.c
(gdb) frame 4
#4  0x76b75f14 in malloc_consolidate (av=av@entry=0x75800010) at malloc.c:4157
4157    in malloc.c
(gdb) frame 3
#3  0x76b75b80 in malloc_printerr (action=1,
    str=0x76c2572c "corrupted double-linked list", ptr=<optimized out>)
    at malloc.c:4996
4996    in malloc.c
(gdb) frame 2
#2  0x76b6f954 in __libc_message (do_abort=<optimized out>,
    fmt=0x76c256e8 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/posix/libc_fatal.c:175
175     ../sysdeps/posix/libc_fatal.c: No such file or directory.
(gdb) frame 1
#1  0x76b35324 in __GI_abort () at abort.c:89
89      abort.c: No such file or directory.
(gdb) frame 0
#0  0x76b33f70 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
 
Reply
#18
Looks indeed like a buffer overflow. Let's hope i got this fixed in the rewrite branch Smile
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)