libvlc Segfault after Upgrade

Forum for questions and support relating to the 1.28.x releases only.
Locked
kroki0815
Posts: 3
Joined: Thu Dec 11, 2014 8:23 am

libvlc Segfault after Upgrade

Post by kroki0815 »

Hi,
i have Zoneminder running with Zoneminder 1.27 Beta with libvlc camera without any Problems.
After upgrading to version 1.28 i got a segfault on every connection retry to my camera.

Here is the log fom zoneminder:

Code: Select all

 2014-12-11 09:30:04.033430	zmdc	28806	ERR	'zmc -m 1' exited abnormally, exit status 11	zmdc.pl	
2014-12-11 09:30:04.013121	zmc_m1	31199	INF	addr2line -e /usr/local/bin/zmc 0x486e59 0x321340f6d0 0x476d40 0x7f2529110656 0x7f25290ed943 0x7f2529353c6d 0x7f252935423a 0x321447d495 0x321447da4e 0x321443bcd8 0x3214448b66 0x3214449c1b 0x321444d236 0x3213407ee5 0x32130f4b8d	/home/zoneminder/ZoneMinder/src/zm_signal.cpp	106
2014-12-11 09:30:04.004821	zmc_m1	31199	INF	Backtrace complete, please execute the following command for more information	/home/zoneminder/ZoneMinder/src/zm_signal.cpp	105
2014-12-11 09:30:03.996535	zmc_m1	31199	ERR	Backtrace 14: /lib64/libc.so.6(clone+0x6d) [0x32130f4b8d]	/home/zoneminder/ZoneMinder/src/zm_signal.cpp	98
2014-12-11 09:30:03.988189	zmc_m1	31199	ERR	Backtrace 13: /lib64/libpthread.so.0() [0x3213407ee5]	/home/zoneminder/ZoneMinder/src/zm_signal.cpp	98
2014-12-11 09:30:03.979798	zmc_m1	31199	ERR	Backtrace 12: /lib64/libvlccore.so.7() [0x321444d236]	/home/zoneminder/ZoneMinder/src/zm_signal.cpp	98
2014-12-11 09:30:03.971493	zmc_m1	31199	ERR	Backtrace 11: /lib64/libvlccore.so.7() [0x3214449c1b]	/home/zoneminder/ZoneMinder/src/zm_signal.cpp	98
2014-12-11 09:30:03.963186	zmc_m1	31199	ERR	Backtrace 10: /lib64/libvlccore.so.7() [0x3214448b66]	/home/zoneminder/ZoneMinder/src/zm_signal.cpp	98
2014-12-11 09:30:03.954883	zmc_m1	31199	ERR	Backtrace 9: /lib64/libvlccore.so.7() [0x321443bcd8]	/home/zoneminder/ZoneMinder/src/zm_signal.cpp	98
2014-12-11 09:30:03.946501	zmc_m1	31199	ERR	Backtrace 8: /lib64/libvlccore.so.7(vlc_module_load+0x46e) [0x321447da4e]	/home/zoneminder/ZoneMinder/src/zm_signal.cpp	98
2014-12-11 09:30:03.938146	zmc_m1	31199	ERR	Backtrace 7: /lib64/libvlccore.so.7() [0x321447d495]	/home/zoneminder/ZoneMinder/src/zm_signal.cpp	98
2014-12-11 09:30:03.929780	zmc_m1	31199	ERR	Backtrace 6: /usr/lib64/vlc/plugins/access/liblive555_plugin.so(+0x723a) [0x7f252935423a]	/home/zoneminder/ZoneMinder/src/zm_signal.cpp	98
2014-12-11 09:30:03.921543	zmc_m1	31199	ERR	Backtrace 5: /usr/lib64/vlc/plugins/access/liblive555_plugin.so(+0x6c6d) [0x7f2529353c6d]	/home/zoneminder/ZoneMinder/src/zm_signal.cpp	98
2014-12-11 09:30:03.913149	zmc_m1	31199	ERR	Backtrace 4: /lib64/libliveMedia.so.17(_ZN10RTSPClient18sendOptionsCommandEPFvPS_iPcEP13Authenticator+0x23) [0x7f25290ed943]	/home/zoneminder/ZoneMinder/src/zm_signal.cpp	98
2014-12-11 09:30:03.904841	zmc_m1	31199	ERR	Backtrace 3: /lib64/libliveMedia.so.17(_ZN13AuthenticatoraSERKS_+0x16) [0x7f2529110656]	/home/zoneminder/ZoneMinder/src/zm_signal.cpp	98
2014-12-11 09:30:03.896559	zmc_m1	31199	ERR	Backtrace 2: /usr/local/bin/zmc(_ZN13Authenticator5resetEv+0x10) [0x476d40]	/home/zoneminder/ZoneMinder/src/zm_signal.cpp	98
2014-12-11 09:30:03.886933	zmc_m1	31199	ERR	Backtrace 1: /lib64/libpthread.so.0() [0x321340f6d0]	/home/zoneminder/ZoneMinder/src/zm_signal.cpp	98
2014-12-11 09:30:03.876649	zmc_m1	31199	ERR	Backtrace 0: /usr/local/bin/zmc(_Z14zm_die_handleriP9siginfo_tPv+0x59) [0x486e59]	/home/zoneminder/ZoneMinder/src/zm_signal.cpp	98
2014-12-11 09:30:03.863135	zmc_m1	31199	ERR	Signal address is 0xffffffffffffffe8, from 0x476d40	/home/zoneminder/ZoneMinder/src/zm_signal.cpp	77
2014-12-11 09:30:03.856603	zmc_m1	31199	ERR	Got signal 11 (Segmentation fault), crashing	/home/zoneminder/ZoneMinder/src/zm_signal.cpp	54
2014-12-11 09:30:03.813283	zmc_m1	31166	INF	Priming capture from rtsp://xx:xxxx@xxx.xx:65001/ch0_0.h264	/home/zoneminder/ZoneMinder/src/zm_libvlc_camera.cpp	145
2014-12-11 09:30:03.803072	zmc_m1	31166	INF	Starting Capture	/home/zoneminder/ZoneMinder/src/zmc.cpp	199
2014-12-11 09:30:03.628440	zmdc	31166	INF	'zmc -m 1' started at 14/12/11 09:30:03	zmdc.pl	
2014-12-11 09:30:03.628430	zmdc	28806	INF	'zmc -m 1' starting at 14/12/11 09:30:03, pid = 31166	zmdc.pl	
My system is a Fedora Core 20 with the latest patches.

I hope someone can help to analyse the problem ....

Kind regards
Kroki
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: libvlc Segfault after Upgrade

Post by knight-of-ni »

This is a known issue with the libvlc source type that has existed since it was first implemented. It happens on some systems but works fine on others. So far, no one has been able to figure out what causes the issue much less how to fix it.

For now you will have to use the ffmpeg method instead.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
kroki0815
Posts: 3
Joined: Thu Dec 11, 2014 8:23 am

Re: libvlc Segfault after Upgrade

Post by kroki0815 »

That's not good ... for me :-(

With ffmpeg the camera will not work.

I compiled zoneminder now with debug-options and i get a backtrace with gdb:

Code: Select all


GNU gdb (GDB) Fedora 7.7.1-21.fc20
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/bin/zmc...(no debugging symbols found)...done.
(gdb) run -m1
Starting program: /usr/local/bin/zmc -m1
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff655c700 (LWP 15698)]
[Thread 0x7ffff655c700 (LWP 15698) exited]
[New Thread 0x7ffff655c700 (LWP 15701)]
[New Thread 0x7ffff4c23700 (LWP 15702)]
[New Thread 0x7ffff4b22700 (LWP 15703)]
[New Thread 0x7ffff42d3700 (LWP 15704)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff42d3700 (LWP 15704)]
0x0000000000476d30 in Authenticator::reset() ()
(gdb) backtrace
#0  0x0000000000476d30 in Authenticator::reset() ()
#1  0x00007fffdb204656 in Authenticator::operator= (this=this@entry=0x7fffcc004340, rightSide=...) at DigestAuthentication.cpp:43
#2  0x00007fffdb1e1943 in RTSPClient::sendOptionsCommand (this=0x7fffcc004300, responseHandler=0x7fffdb444310 <continueAfterOPTIONS(RTSPClient*, int, char*)>,
    authenticator=<optimized out>) at RTSPClient.cpp:45
#3  0x00007fffdb447c6d in Connect (p_demux=p_demux@entry=0x7fffcc000e58) at live555.cpp:618
#4  0x00007fffdb44823a in Open (p_this=0x7fffcc000e58) at live555.cpp:385
#5  0x000000321447d495 in module_load (obj=obj@entry=0x7fffcc000e58, m=m@entry=0x5c36d20, init=init@entry=0x321447d3e0 <generic_start>, args=args@entry=0x7ffff42d28a8)
    at modules/modules.c:185
#6  0x000000321447da4e in vlc_module_load (obj=obj@entry=0x7fffcc000e58, capability=capability@entry=0x32144b5152 "access_demux", name=0x7fffcc000da4 "", strict=strict@entry=true,
    probe=probe@entry=0x321447d3e0 <generic_start>) at modules/modules.c:277
#7  0x000000321447df64 in module_need (obj=obj@entry=0x7fffcc000e58, cap=cap@entry=0x32144b5152 "access_demux", name=<optimized out>, strict=strict@entry=true) at modules/modules.c:366
#8  0x000000321443bcd8 in demux_New (p_obj=p_obj@entry=0x5c8a248, p_parent_input=p_parent_input@entry=0x5c8a248, psz_access=0x7fffcc000d50 "rtsp", psz_demux=0x32144cad95 "",
    psz_location=<optimized out>, s=s@entry=0x0, out=0x7fffcc000aa0, b_quick=b_quick@entry=false) at input/demux.c:194
#9  0x0000003214448b66 in InputSourceInit (p_input=p_input@entry=0x5c8a248, in=0x5c9f6b0, psz_mrl=0x5c96100 "rtsp://xx:xxxxxxxxxxxx@xx.xxxxxx.xx:65001/ch0_0.h264",
    psz_forced_demux=psz_forced_demux@entry=0x0, b_in_can_fail=b_in_can_fail@entry=false) at input/input.c:2360
#10 0x0000003214449c1b in Init (p_input=p_input@entry=0x5c8a248) at input/input.c:1225
#11 0x000000321444d236 in Run (obj=0x5c8a248) at input/input.c:521
#12 0x0000003213407ee5 in start_thread (arg=0x7ffff42d3700) at pthread_create.c:309
#13 0x00000032130f4b8d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

It will be great, if a developer can look at this. If additional output from gdb is needed, please ask me.


Best
Kroki
bbunge
Posts: 2956
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: libvlc Segfault after Upgrade

Post by bbunge »

What cameras are you using? Often there is more than one way to "skin the cat..."
kroki0815
Posts: 3
Joined: Thu Dec 11, 2014 8:23 am

Re: libvlc Segfault after Upgrade

Post by kroki0815 »

HI,
i'm using a huacam hvc712
0_0
Posts: 4
Joined: Sat Nov 01, 2014 11:30 am

Same here

Post by 0_0 »

Hello,

I wanted to say that this happens to me as well.

This is probably a long shot but could this be related to perl using ithreads?

1.27 vlc option does work.

1.28 introduces another field of options to ffmpeg and vlc. There must be a subtle change somewhere that triggers this. On the same system I can use the camera stream with vlc alone fine but when zoneminder uses it gets all those ugly segfaults.

cheers.
Locked