Page 1 of 1

vlm and segmentation fault

Posted: 16 May 2008 11:54
by contremaitre
Hi

When I try to load this vlm conf file I have a segmentation fault error.
new channel1 broadcast enabled
setup channel1 input rtsp://xxxxx
setup channel1 output file/avi:tmp1.avi

new channel2 broadcast enabled
setup channel2 input rtsp://xxxxx
setup channel2 output file/avi:tmp2.avi

control channel1 play
control channel2 play

(I replaced my url with xxxx)
I am using vlc 0.8.6.e
Maybe this vlm conf file is incorrect (let me know), but it shouldn't end with segfault...

THe output is :
VLC media player 0.8.6e Janus
[00000289] main interface: creating VLM
Segmentation fault

Re: vlm and segmentation fault

Posted: 16 May 2008 15:05
by contremaitre
here is more details :
this vlm file looks better :
new channel1 broadcast enabled
setup channel1 input "rtsp://xxxx"
setup channel1 output '#standard{access=file,mux=ts,dst=vlm.mpeg}'
console output is :
[00000302] [Media: channel1] main stream output debug: stream=`standard'
[00000303] [Media: channel1] main private debug: looking for sout stream module: 1 candidate
[00000303] [Media: channel1] main private debug: set sout option: sout-standard-access to file
[00000303] [Media: channel1] main private debug: set sout option: sout-standard-mux to ts
[00000303] [Media: channel1] main private debug: set sout option: sout-standard-dst to vlm.mpeg
[00000303] [Media: channel1] stream_out_standard private debug: creating `file/ts://vlm.mpeg'
[00000303] [Media: channel1] stream_out_standard private debug: extension is mpeg
[00000303] [Media: channel1] stream_out_standard private debug: extension -> mux=ps
[00000303] [Media: channel1] stream_out_standard private debug: using `file/ts://vlm.mpeg'
[00000305] [Media: channel1] main private debug: looking for sout access module: 1 candidate
[00000305] [Media: channel1] access_output_file private debug: file access output opened (`vlm.mpeg')
[00000305] [Media: channel1] main private debug: using sout access module "access_output_file"
[00000303] [Media: channel1] stream_out_standard private debug: access opened
[00000307] [Media: channel1] main private debug: looking for sout mux module: 1 candidate
[00000307] [Media: channel1] mux_ts private debug: shaping=200000 pcr=70000 dts_delay=400000
[00000307] [Media: channel1] main private debug: using sout mux module "mux_ts"
[00000302] [Media: channel1] main stream output debug: muxer support adding stream at any time
[00000302] [Media: channel1] main stream output debug: muxer prefers to wait for all ES before starting to mux
[00000303] [Media: channel1] stream_out_standard private debug: mux opened
[00000303] [Media: channel1] main private debug: using sout stream module "stream_out_standard"
[00000301] [Media: channel1] main input debug: `rtsp://xxxxxx' gives access `rtsp' demux `' path `xxxxx'
[00000301] [Media: channel1] main input debug: creating demux: access='rtsp' demux='' path='xxxxxx'
[00000308] [Media: channel1] main demuxer debug: looking for access_demux module: 1 candidate
[00000301] [Media: channel1] main input debug: thread 2993716112 (input) created at priority 0 (input/input.c:265)
Segmentation fault

Re: vlm and segmentation fault

Posted: 16 May 2008 19:34
by Jean-Baptiste Kempf
Do you have a backtrace ?

Re: vlm and segmentation fault

Posted: 19 May 2008 11:57
by contremaitre
No I don't...
And I don't know if I can get one

Edit : with gdb :
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb26ffb90 (LWP 6777)]
0xb7c3b310 in rawmemchr () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0 0xb7c3b310 in rawmemchr () from /lib/tls/i686/cmov/libc.so.6
#1 0xb7c300e6 in ?? () from /lib/tls/i686/cmov/libc.so.6
#2 0x00000000 in ?? ()

Re: vlm and segmentation fault

Posted: 19 May 2008 16:25
by contremaitre
I also tried to compile and run a small source using vlm :

Code: Select all

libvlc_vlm_add_broadcast (inst, "broad1", filename2, "#standard{access=file,mux=ts,dst=broad1.ts}", 0, NULL, 1, 0, &excp);
where filename2 is a rtsp url.
Compiling with -g option and running with gdb :
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7ac26c0 (LWP 6695)]
0xb7ceb246 in vfprintf () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0 0xb7ceb246 in vfprintf () from /lib/tls/i686/cmov/libc.so.6
#1 0xb7d0f8ec in vasprintf () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7e91c14 in ?? () from /usr/lib/libvlc.so.0
#3 0xbf140758 in ?? ()
#4 0xb7f6052c in ?? () from /usr/lib/libvlc.so.0
#5 0xbf1407a4 in ?? ()
#6 0xfbad8000 in ?? ()
#7 0x084b1b50 in ?? ()
#8 0x00000000 in ?? ()
Tell with if you need more information

Thank you

Re: vlm and segmentation fault

Posted: 20 May 2008 17:54
by contremaitre
Find out something :

I have this segfault when trying to play an invalid rtsp url

Invalid : I mean a random url which belong to no one.

So it is not a vlm bug, maybe a live555 bug ?
I am trying to find out more, tell me if you have informations about this

Re: vlm and segmentation fault

Posted: 20 May 2008 18:09
by Jean-Baptiste Kempf
live555 bug, it should.

Re: vlm and segmentation fault

Posted: 21 May 2008 09:40
by contremaitre
I am not sure....
I tried with live555 alone, and no segmentation fault

And it is not the only segfault issue with vlm.

For example, if I try an invalid mux output (nigtly build 05_15_08) :
[00000798] main demux error: object is not attached
[00000794] main access error: object is not attached
[00000799] main packetizer error: object is not attached
[00000788] main stream output error: object is not attached
ERROR: cannot delete object (787, (null)) with 4 children
ERROR: Remaining children object (id:788, type:stream output, name:(null))
Segmentation fault
but sometimes it ends better :
[00000798] main demux error: object is not attached
[00000795] main access error: object is not attached
[00000799] main packetizer error: object is not attached
[00000788] main stream output error: object is not attached
ERROR: cannot delete object (787, (null)) with 4 children
ERROR: Remaining children object (id:788, type:stream output, name:(null))
ERROR: Remaining children object (id:795, type:access, name:(null))
ERROR: Remaining children object (id:798, type:demux, name:(null))
ERROR: Remaining children object (id:799, type:packetizer, name:(null))
o 00000001 libvlc "vlc", refcount 1, 6 children
|-o 00000775 interaction (thread 3064507280), refcount 1, parent 1
|-o 00000776 playlist (thread 3039329168), refcount 2, 2 children, parent 1
| |-o 00000782 generic "preparser" (thread 3056114576), refcount 1, parent 776
| `-o 00000783 generic "fetcher" (thread 3047721872), refcount 1, parent 776
|-o 00000784 vlm daemon (thread 3030936464), refcount 1, parent 1
|-o 00000790 interface "hotkeys" (thread 3012557712), refcount 1, parent 1
|-o 00000793 interface "screensaver" (thread 3004165008), refcount 1, parent 1
`-o 00000796 interface "rc" (thread 2995772304), refcount 1, parent 1
Aborted

Re: vlm and segmentation fault

Posted: 04 Jun 2008 15:43
by contremaitre
I found the bug.

It is located in live555.cpp, line 831 (vlc 0.8.6f source) :

Code: Select all

const char *psz_tmp = strstr( psz_error, "RTSP" ); sscanf( psz_tmp, "RTSP/%*s%3u", &i_code );
In my case, when I try to play a rtsp adress wich doesn't exists :
psz_error = "connect() failed: No route to host"
so psz_tmp is null after strstr call
so sscanf segfault

Is it a known bug, or should I investigate it more and post a bug report ?

Edit : Actually, this bug is fixed in 0.9 version.