• 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
elro_300_switch - crash
#1
hi!

i just compiled pilight development branch to test my own module. after some random time it craches and this are the logs i was able to get:

Code:
[Feb 22 14:19:18:499967] pilight-daemon: DEBUG: possible elro_300_switch protocol
[Feb 22 14:19:18:500184] pilight-daemon: DEBUG: recevied pulse length of 299
[Feb 22 14:19:18:500368] pilight-daemon: DEBUG: caught minimum # of repeats 1 of elro_300_switch
[Feb 22 14:19:18:500567] pilight-daemon: DEBUG: called elro_300_switch parseRaw()
*** stack smashing detected ***: /usr/local/sbin/pilight-daemon terminated

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x72dff460 (LWP 7190)]
__libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47
47      ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S: No such file or directory.
(gdb) backtrace
#0  __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47
#1  0x76d9161e in __GI_raise (sig=sig@entry=6)
    at ../sysdeps/unix/sysv/linux/raise.c:55
#2  0x76d92312 in __GI_abort () at abort.c:89
#3  0x76dba10a in __libc_message (do_abort=do_abort@entry=1,
    fmt=0x76e3e4f0 "*** %s ***: %s terminated\n")
    at ../sysdeps/posix/libc_fatal.c:175
#4  0x76e0c2ee in __GI___fortify_fail (
    msg=0x76e3e4d0 "stack smashing detected") at fortify_fail.c:38
#5  0x76e0c2b2 in __stack_chk_fail () at stack_chk_fail.c:28
#6  0x0007542e in parseCode ()
    at /usr/src/pilight/libs/pilight/protocols/433.92/elro_300_switch.c:116
#7  0x00000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)

did i missed something while compilation or is this a bug in current development and i should just disable this protocol?

thanks in advance!
 
Reply
#2
There is a known bug in that protocol, a fix is under investigation. If you do not need that protocol, please disable it until the bug fix is available.
 
Reply
#3
thanks for your reply!

same happens with rsl366:

Code:
[Feb 28 15:37:55:296476] pilight-daemon: DEBUG: possible rsl366 protocol
[Feb 28 15:37:55:296591] pilight-daemon: DEBUG: recevied pulse length of 388
[Feb 28 15:37:55:296684] pilight-daemon: DEBUG: caught minimum # of repeats 1 of rsl366
[Feb 28 15:37:55:296796] pilight-daemon: DEBUG: called rsl366 parseRaw()
*** stack smashing detected ***: /usr/local/sbin/pilight-daemon terminated

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x72dff460 (LWP 14533)]
__libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47
47      ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S: No such file or directory.
(gdb) backtrace
#0  __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47
#1  0x76d9161e in __GI_raise (sig=sig@entry=6)
    at ../sysdeps/unix/sysv/linux/raise.c:55
#2  0x76d92312 in __GI_abort () at abort.c:89
#3  0x76dba10a in __libc_message (do_abort=do_abort@entry=1,
    fmt=0x76e3e4f0 "*** %s ***: %s terminated\n")
    at ../sysdeps/posix/libc_fatal.c:175
#4  0x76e0c2ee in __GI___fortify_fail (
    msg=0x76e3e4d0 "stack smashing detected") at fortify_fail.c:38
#5  0x76e0c2b2 in __stack_chk_fail () at stack_chk_fail.c:28
#6  0x0006f7a0 in parseCode ()
    at /usr/src/pilight/libs/pilight/protocols/433.92/rsl366.c:106
#7  0x000210e4 in receive_parse_code (param=0x0)
    at /usr/src/pilight/daemon.c:623
#8  0x76f1c4ac in start_thread (arg=0x0) at pthread_create.c:335
#9  0x76e00b5c in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:89
   from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)

i will disable both for now.
 
Reply
#4
it was a bit hard for me to disable elro stuff. finally i read the CMakeExclude.txt file in protocols/433.92.

for me this is a bit confusing: protocols/433.92/CMakeExclude.txt#L73
Code:
if(${PROTOCOL_ELRO_SWITCH} MATCHES "OFF" AND ${PROTOCOL_BRENNENSTUHL_SWITCH} MATCHES "OFF")
    list(REMOVE_ITEM ${PROJECT_NAME}_sources "${PROJECT_SOURCE_DIR}/elro_300_switch.c")
    list(REMOVE_ITEM ${PROJECT_NAME}_sources "${PROJECT_SOURCE_DIR}/elro_400_switch.c")
    list(REMOVE_ITEM ${PROJECT_NAME}_sources "${PROJECT_SOURCE_DIR}/elro_800_switch.c")
    list(REMOVE_ITEM ${PROJECT_NAME}_headers "${PROJECT_SOURCE_DIR}/elro_300_switch.h")
    list(REMOVE_ITEM ${PROJECT_NAME}_headers "${PROJECT_SOURCE_DIR}/elro_400_switch.h")
    list(REMOVE_ITEM ${PROJECT_NAME}_headers "${PROJECT_SOURCE_DIR}/elro_800_switch.h")
endif()

i switched off PROTOCOL_ELRO_SWITCH but didn't know that PROTOCOL_BRENNENSTUHL_SWITCH should be off as well.
shouldn't this be one option? or maybe using an or instead?
 
Reply
#5
The Brennenstuhl protocol is an alias for the elro_800_switch protocol, so you should disable both.

I recommended using the setup.sh script to disable individual protocols, it includes a console-menu for doing this.
 
Reply
#6
sure, i used the setup, but i did not know that these protocols are the same. only after searching in the CMakeExclude.txt i noticed that these are the same.
i just think that this is irritating if you don't know this.
 
Reply
#7
I'm curious if there is already a fix for that bug in the elro_* protocols. I myself struggle with these stack smashing issues, at some point the daemon is terminated.
I have a few Brennenstuhl switches so simply disabling the protocol is not an option for me... 
Should I wait for a possible bugfix or should I go for some different switches that use another protocol?

Thanks a lot in advance,

Niels
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  Crash in 8.1.3 stable on Pi 3 kylex 25 3,987 11-16-2018, 02:05 PM
Last Post: kylex
  pilight -> Home Assistant crash jmvermeulen 6 2,158 12-11-2017, 09:39 PM
Last Post: curlymo
Sad pilight 6.0 Stacktrace crash TiefDruckGebiet 7 3,987 04-17-2015, 08:03 PM
Last Post: koos147

Forum Jump:


Browsing: 1 Guest(s)