• 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
Crash in 8.1.3 stable on Pi 3
#11
To rule out libluajit as a factor, you can install liblua5.1-0-dev, liblua5.1-0, and liblua5.1-0-dbg.

Then do:
Code:
mv /usr/lib/x86_64-linux-gnu/libluajit-5.1.so /usr/lib/x86_64-linux-gnu/libluajit-5.1.so.bak
ln -s /usr/lib/x86_64-linux-gnu/liblua5.1.so /usr/lib/x86_64-linux-gnu/libluajit-5.1.so

Of course, change the path names to match those of your RPi.
 
Reply
#12
(10-30-2018, 09:36 AM)curlymo Wrote: To rule out libluajit as a factor, you can install liblua5.1-0-dev, liblua5.1-0, and liblua5.1-0-dbg.

Then do:
Code:
mv /usr/lib/x86_64-linux-gnu/libluajit-5.1.so /usr/lib/x86_64-linux-gnu/libluajit-5.1.so.bak
ln -s /usr/lib/x86_64-linux-gnu/liblua5.1.so /usr/lib/x86_64-linux-gnu/libluajit-5.1.so

Of course, change the path names to match those of your RPi.

I'm trying this as a first step since last night. Will update when and if it crashes.
 
Reply
#13
Had another crash but not in liblua this time.

Code:
Thread 1 "pilight-daemon" received signal SIGSEGV, Segmentation fault.
0x7681c3d8 in poll_cb (req=0x54040, status=0, events=1) at /home/pilight/source/daemon-dev/libs/pilight/hardware/433nano.c:353
353     /home/pilight/source/daemon-dev/libs/pilight/hardware/433nano.c: No such file or directory.
(gdb) backtrace
#0  0x7681c3d8 in poll_cb (req=0x54040, status=0, events=1) at /home/pilight/source/daemon-dev/libs/pilight/hardware/433nano.c:353
#1  0x7677610c in uv__poll_io (loop=0x76fa7018 <default_loop_struct>, w=0x54074, events=1) at /home/pilight/source/daemon-dev/libs/libuv/unix/poll.c:64
#2  0x7676f8e0 in uv__io_poll (loop=0x76fa7018 <default_loop_struct>, timeout=420) at /home/pilight/source/daemon-dev/libs/libuv/unix/linux-core.c:400
#3  0x76765824 in uv_run (loop=0x76fa7018 <default_loop_struct>, mode=UV_RUN_DEFAULT) at /home/pilight/source/daemon-dev/libs/libuv/unix/core.c:362
#4  0x00014cc0 in main (argc=2, argv=0x7efff6a4) at /home/pilight/source/daemon-dev/daemon.c:3471
 
Reply
#14
Can you start from pilight 8.1.3, check if that crashes, and slowly work up until the currently nightly until i crashes. That helps me to see what changed before the issue started occuring.

You can also try running in valgrind. It is probably some buffer overflow, but where?
 
Reply
#15
This is on 8.1.3. It seems to point to line 353 in 433nano.c which is

Code:
pulses[nrpulses++] = atoi(&data.buffer[s]);

Got some variables printed below.

Code:
Thread 1 "pilight-daemon" received signal SIGSEGV, Segmentation fault.
0x7681c3d8 in poll_cb (req=0x54040, status=0, events=1) at /home/pilight/source/daemon-dev/libs/pilight/hardware/433nano.c:353
353     /home/pilight/source/daemon-dev/libs/pilight/hardware/433nano.c: No such file or directory.
(gdb) backtrace
#0  0x7681c3d8 in poll_cb (req=0x54040, status=0, events=1) at /home/pilight/source/daemon-dev/libs/pilight/hardware/433nano.c:353
#1  0x7677610c in uv__poll_io (loop=0x76fa7018 <default_loop_struct>, w=0x54074, events=1) at /home/pilight/source/daemon-dev/libs/libuv/unix/poll.c:64
#2  0x7676f8e0 in uv__io_poll (loop=0x76fa7018 <default_loop_struct>, timeout=420) at /home/pilight/source/daemon-dev/libs/libuv/unix/linux-core.c:400
#3  0x76765824 in uv_run (loop=0x76fa7018 <default_loop_struct>, mode=UV_RUN_DEFAULT) at /home/pilight/source/daemon-dev/libs/libuv/unix/core.c:362
#4  0x00014cc0 in main (argc=2, argv=0x7efff6a4) at /home/pilight/source/daemon-dev/daemon.c:3471
(gdb) frame 0
#0  0x7681c3d8 in poll_cb (req=0x54040, status=0, events=1) at /home/pilight/source/daemon-dev/libs/pilight/hardware/433nano.c:353
353     in /home/pilight/source/daemon-dev/libs/pilight/hardware/433nano.c
(gdb) print nrpulses
$1 = 15371
(gdb) print pulses
$2 = {1350, 350, 3460, 1090, 510, 2050, 750, 1660, 3710, 4410}
(gdb) print x
$3 = 1780
(gdb) print s
$4 = 129
 
Reply
#16
Interesting. Defenitly something i can work with. Maybe this was the cause of the other errors.

Please check the latest nightly.
 
Reply
#17
I will try it but I have a question regarding the changes you made. Won't the check for nrpulses > 10 after it has been used allow it to be == 10 thus still overflowing the pulses buffer?
 
Reply
#18
Damn, you're right Crying
 
Reply
#19
Just noticed there's another write to the pulses buffer inside the 'if(error == 0)' that should to be taken into account, right?
 
Reply
#20
Not true. When the nrpulses are greater than 9, it should error. However, 9 is a valid value. nrpulses will be increased to 10 after the variable setting, not before.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  pilight -> Home Assistant crash jmvermeulen 6 2,158 12-11-2017, 09:39 PM
Last Post: curlymo
  Config issues from development to stable 8.0 terrar 5 2,129 10-28-2017, 09:56 AM
Last Post: curlymo
  elro_300_switch - crash andiwand 6 2,737 09-14-2016, 08:35 PM
Last Post: orpheus
Sad pilight 6.0 Stacktrace crash TiefDruckGebiet 7 3,986 04-17-2015, 08:03 PM
Last Post: koos147
Photo Protocols in stable branch SideInfo 8 3,643 12-10-2014, 03:21 PM
Last Post: SideInfo

Forum Jump:


Browsing: 2 Guest(s)