minisatip crashing now & then

Support forum for minisatip
cguenther
Posts: 15
Joined: Wed Jan 11, 2017 7:17 am

minisatip crashing now & then

Post by cguenther »

Hi,

i am using minisatip 0.7.15 on ubuntu 16.4 LTS and unfortunately its crashing now & then.

its started as a daemon using
DAEMON_OPTS="-n enp1s0.4:1 -i -20 -H 1:5 -b 20000000:77004800 -B 10000 -o 192.168.1.95:9001 -g -I general,netceiver -e 0-5 -w 192.168.1.95:8080 -R /home/xxx/minisatip/html/ -F /var/log/minisatip.log"

minisatip.log when crashing:
*** stack smashing detected ***: /usr/bin/minisatip terminated
print_trace bei /home/xxx/minisatip-master/src/utils.c:475
posix_signal_handler bei /home/xxx/minisatip-master/src/utils.c:513
?? ??:0
?? ??:0
?? ??:0
?? ??:0
print_trace bei /home/xxx/minisatip-master/src/utils.c:475
posix_signal_handler bei /home/xxx/minisatip-master/src/utils.c:513
?? ??:0
?? ??:0
RECEIVED SIGNAL 6 - SP=0 IP=0
RECEIVED SIGNAL 11 - SP=0 IP=0
Obtained 10 stack frames.
0x41c5e2 : 0x41c6d1 : 0x7f23c28c6390 : 0x7f23be95ae27 : 0x7f23be95c9d8 : 0x7f23c1b50b4f : 0x41c5e2 : 0x41c6d1 : 0x7f23c28c6390 : 0x7f23c1a70428 :

any idea?

thanks!

best regards
Carsten
cata
Site Admin
Posts: 768
Joined: Tue May 12, 2015 1:01 am

Re: minisatip crashing now & then

Post by cata »

Hi,

There are some small crashes that I will fix soon. You can keep me posted if it does not work in.

Run:
make clean;make EXTRA_CFLAGS=''-fsanitize=address -fno-omit-frame-pointer -fsanitize=leak -fsanitize=null ''

Then run minisatip again and get me the output
cguenther
Posts: 15
Joined: Wed Jan 11, 2017 7:17 am

Re: minisatip crashing now & then

Post by cguenther »

=================================================================
==3174==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffedb3cb3bf at pc 0x0000004506a3 bp 0x7ffedb3cb250 sp 0x7ffedb3cb240
WRITE of size 1 at 0x7ffedb3cb3bf thread T0
#0 0x4506a2 in get_json_state /home/cguenther/minisatip-master/src/utils.c:964
#1 0x409e77 in read_http /home/cguenther/minisatip-master/src/minisatip.c:1355
#2 0x417540 in select_and_execute /home/cguenther/minisatip-master/src/socketworks.c:823
#3 0x40cf01 in main /home/cguenther/minisatip-master/src/minisatip.c:1708
#4 0x7faffe43b82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
#5 0x4038a8 in _start (/home/cguenther/minisatip-master/minisatip+0x4038a8)

Address 0x7ffedb3cb3bf is located in stack of thread T0 at offset 159 in frame
#0 0x44ea5a in get_json_state /home/cguenther/minisatip-master/src/utils.c:863

This frame has 3 object(s):
[32, 36) 'storage'
[96, 104) 'storage'
[160, 360) 'escape' <== Memory access at offset 159 underflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
(longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow /home/cguenther/minisatip-master/src/utils.c:964 get_json_state
Shadow bytes around the buggy address:
0x10005b671620: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10005b671630: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10005b671640: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10005b671650: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10005b671660: 00 00 00 00 f1 f1 f1 f1 04 f4 f4 f4 f2 f2 f2 f2
=>0x10005b671670: 00 f4 f4 f4 f2 f2 f2[f2]00 00 00 00 00 00 00 00
0x10005b671680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10005b671690: 00 f4 f4 f4 f3 f3 f3 f3 00 00 00 00 00 00 00 00
0x10005b6716a0: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04 f4 f4 f4
0x10005b6716b0: f2 f2 f2 f2 00 00 00 00 00 00 00 00 00 00 00 00
0x10005b6716c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
==3174==ABORTING
cata
Site Admin
Posts: 768
Joined: Tue May 12, 2015 1:01 am

Re: minisatip crashing now & then

Post by cata »

Hi,

I will fix this in the next commit.

Thanks
cguenther
Posts: 15
Joined: Wed Jan 11, 2017 7:17 am

Re: minisatip crashing now & then

Post by cguenther »

... highly appreciated :-) thanks! Please let me know if i can do some more testing for you.

best regards
Carsten
cata
Site Admin
Posts: 768
Joined: Tue May 12, 2015 1:01 am

Re: minisatip crashing now & then

Post by cata »

I saw this issue before. Just do not use the web page too much to not trigger the crash until I fix it.
cguenther
Posts: 15
Joined: Wed Jan 11, 2017 7:17 am

Re: minisatip crashing now & then

Post by cguenther »

Hi cata,
ok, will do. (did not even know that this might be related to/causing the crashing :-) )
however, trying to manouver around the instability i collected some (weird?) parameters:
"-n enp1s0.4:1 -i -20 -H 1:5 -b 20000000:77004800 -B 10000 -o 192.168.1.95:9001 -g -I general,netceiver -e 0-5 -w 192.168.1.95:8080 -R /home/xxx/minisatip/html/ -F /var/log/minisatip.log"

any comments or hints on this? looks at least weird to me, but it seems to work...

best regards
Carsten
cata
Site Admin
Posts: 768
Joined: Tue May 12, 2015 1:01 am

Re: minisatip crashing now & then

Post by cata »

Just a question, are you using minisatip over WAN?
cguenther
Posts: 15
Joined: Wed Jan 11, 2017 7:17 am

Re: minisatip crashing now & then

Post by cguenther »

Hi,

no, it is a 3-dualtuner-netceiver setup from old reel-multimedia VDR-system, going via seperate VLAN/switch directly to ubuntu 16.4.2 based linux-box with minisatip.

best regards
Carsten
cguenther
Posts: 15
Joined: Wed Jan 11, 2017 7:17 am

Re: minisatip crashing now & then

Post by cguenther »

Hi cata,

are you wirking on some fixes? would be happy to test, but i dont see any actual commits on github.

best regards
Carsten
Post Reply