Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 260242 - <media-video/vlc-0.9.9_rc2 crashes when streaming while transcoding and downmixing audio
Summary: <media-video/vlc-0.9.9_rc2 crashes when streaming while transcoding and downm...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-25 11:38 UTC by Costa Tsaousis
Modified: 2009-04-04 13:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
log of vlc-0.9.8a crashing (vlc-0.9.8a-crashing.txt,53.15 KB, text/plain)
2009-02-25 11:39 UTC, Costa Tsaousis
Details
log of vlc-0.8.6. streaming (vlc-0.8.6-streaming.txt,28.02 KB, text/plain)
2009-02-25 11:49 UTC, Costa Tsaousis
Details
patch to try (0001-Backport-fixes-for-audio-resampling-or-downmixing-fr.patch,12.46 KB, patch)
2009-02-27 11:59 UTC, Alexis Ballier
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Costa Tsaousis 2009-02-25 11:38:31 UTC
I have a library of divx and x264 video files which I used to stream to MPEG2 with vlc 0.8.6.

vlc 0.9.8a crashes while trying to accomplish the same.

Reproducible: Always

Steps to Reproduce:
1. Run:

vlc -vv --intf rc "/data/media/myfile.avi" --sout "#transcode{vcodec=mp2v,vb=4096,venc=ffmpeg,acodec=mpga,ab=384,channels=2}:standard{access=http,mux=ps,dst=0.0.0.0:20005}"

where /data/media/myfile.avi is any non-mpeg2 file.

Actual Results:  
vlc-0.9.8a crashes with a memory corruption error.


Expected Results:  
vlc-0.8.6 streams the file while transcoding it.


I will attach two files:

1. output of vlc-0.9.8a with the crash.
2. output of vlc-0.8.6 (from an un-updated gentoo box) which streams while transcoding the same file, with the same options.
Comment 1 Costa Tsaousis 2009-02-25 11:39:27 UTC
Created attachment 183129 [details]
log of vlc-0.9.8a crashing
Comment 2 Costa Tsaousis 2009-02-25 11:49:02 UTC
Created attachment 183130 [details]
log of vlc-0.8.6. streaming
Comment 3 Costa Tsaousis 2009-02-25 11:58:45 UTC
All the files I try are 720x576 DIVX or X264 AVIs at 24 or 25fps, with MP3, AC-3 or DTS audio and have been created with mencoder on gentoo.

vlc-0.9.8a (and all other players I tried) are playing back on screen the files perfectly. vlc crashes only when streaming and transcoding.

Comment 4 nobody 2009-02-26 09:27:16 UTC
why don't you provide emerge --info ? it seems important imo, you're having trouble with glibc, and i'm sure video herd would love to get it (witch i'm not in, i'm just a gentoo user).
for example are you still using glibc-2.6.1 ? It seems (still to me, a user) strange you're using glibc-2.6.1 an old libc lib version with a recent vlc version (strange, not impossible, you can still mask higher versions or use some kind of hardened profile...)


Comment 5 Alexis Ballier gentoo-dev 2009-02-27 11:24:19 UTC
I can reproduce it with any 0.9 version (0.9.8a, 0.9.9rc or 0.9-bugfix branch) (but not with 1.0.0 versions (vlc-9999 ebuild)), but only with some files, it seems the common parameter with these files is that they are 5.1 and vlc crashes when downmixing, does all your files that crash vlc have >2 channels?
Comment 6 Costa Tsaousis 2009-02-27 11:52:48 UTC
A quick test, shows you are right. It crashes only with AC3 and DTS audio. It does not crash with MP3 and AAC 2-channel files.

If you need it, I can do a full test (on all my files) and report back tomorrow.

Sorry, for the stupid question: How can I install vlc-9999? I don't see an ebuild for it in portage.
Comment 7 Alexis Ballier gentoo-dev 2009-02-27 11:59:14 UTC
Created attachment 183357 [details, diff]
patch to try

could you please try if this patch fixes your problems?
Comment 8 Alexis Ballier gentoo-dev 2009-02-27 12:02:17 UTC
(In reply to comment #6)
> Sorry, for the stupid question: How can I install vlc-9999? I don't see an
> ebuild for it in portage.


I've added it this morning so you'll have to sync again your portage tree :)
then you need to put "media-video/vlc-9999 **" in package.keywords in order to install it (and add media-video/vlc to package.unmask because I also added an "older" rc version masked). But please try this patch which is a backport from master so that I can send it upstream and it will hopefuly be merged before 0.9.9.
Comment 9 Costa Tsaousis 2009-02-27 12:03:38 UTC
My emerge --info


Portage 2.1.6.7 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.27-gentoo-r8 i686)
=================================================================
System uname: Linux-2.6.27-gentoo-r8-i686-Intel-R-_Xeon-TM-_CPU_3.40GHz-with-glibc2.0
Timestamp of tree: Fri, 27 Feb 2009 00:45:01 +0000
distcc 3.0 i686-pc-linux-gnu [disabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.6-r1
dev-lang/python:     2.5.2-r7
dev-util/cmake:      2.4.8
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/openfire/resources/security/ /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://files.gentoo.gr"
LANG="C"
LC_ALL=""
LDFLAGS="-Wl,-O1"
LINGUAS="en el"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/local/portage"
SYNC="rsync://rsync.gentoo.gr/gentoo-portage"
USE="7zip X Xaw3d a52 aac aalib acl acpi agent alsa amuled ao apache2 arts artworkextra asf asterisk async audiofile authdaemond avahi avi bash-completion bashlogger bcmath bdf berkdb bitmap-fonts bluetooth bogofilter bonobo browserplugin bzip2 bzlib cairo cdda cddb cdio cdparanoia cdr cdrom cgi cli corba cpudetection cracklib crypt css ctrlmenu ctype cups curl cvs daap dbus dc1394 device-mapper dga doc dri dts dv dvb dvd dvdnav dvdr dvdread dxr3 edl enca encode esd evo exif expat fam fame fat fax fb ffmpeg firefox flac flash font-server fontconfig fortran fpx freetype frontend ftp fuse gd gdbm ggi gif gimp gimpprint glitz gmp gnome gnutls gphoto2 gpm graphviz gs gstreamer gtk gtk2 gtkhtml guile hal hddtemp hfs httpd iconv icq id3tag idn ieee1394 imagemagick imap imlib innodb ipv6 isdnlog jabber java javascript jbig jfs jikes jpeg jpeg2k kde kerberos krb4 lame lcms ldap ldirectord libass libcaca libclamav libnotify lirc live lm_sensors logrotate lzo mad maildir managesieve matroska md5sum mdnsresponder-compat midi mikmod mime mjpeg mmap mmx mmx2 mmxext mng mod monkey mono motif mp2 mp3 mpeg mpi mplayer mudflap multiuser musepack musicbrainz mysql mysqli nagios-dns nagios-ntp nagios-ping nagios-ssh nas nautilus ncurses network nfs nls nntp nptl nptlonly nsplugin ntfs objc odbc ogg oggvorbis ole openal openexr opengl openmp pam pam_timestamp pango pcre pdf pdflib perl php pic plotutils png pnm pop3d postgres ppds pppd pri pvr python qt qt3 qt4 quicktime radio rar rdesktop readline reflection reiser4 reiserfs remoteosd rtc rtsp samba scanner screen sdl sdl-image sendfile server session shout sieve skins slang smp sms sndfile snmp soap sockets sox speex spell spl sql sqlite sqlite3 srt sse sse2 ssl stream subtitles subversion suid svg svga swat sysfs syslog sysvipc t1lib taglib tcl tcltk tcpd tetex theora threads tidy tiff tivo tk truetype truetype-fonts twolame type1-fonts udev unicode upnp ups urandom usb v4l v4l2 vcd vdr vhosts vim-pager vim-with-x vlm vorbis wavpack webdav widescreen wifi win32codecs winbind wmf wxwindows x264 x86 xanim xfs xine xml xml2 xmlreader xmlrpc xmlwriter xorg xosd xpm xscreensaver xsl xv xvid xvmc yv12 zaptel zip zlib" ALSA_CARDS="ca0106" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en el" USERLAND="GNU" VIDEO_CARDS="mach64 radeon vesa fbdev v4l"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Yes, I am running glibc 2.6.1. I did a full re-compilation of all packages before submitting this, just in case something weird was left over. However, glibc has not been upgraded in the process.

Even if I try to re-install glibc, it still pulls 2.6.1. Am I missing something?

# emerge -pv glibc

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] sys-libs/glibc-2.6.1  USE="gd nls -debug -glibc-omitfp (-hardened) (-multilib) -profile (-selinux) -vanilla" 0 kB

This is my make.profile
 # ls -l /etc/make.profile
lrwxrwxrwx 1 root root 49 2008-10-11 19:47 /etc/make.profile -> ..//usr/portage/profiles/default/linux/x86/2008.0
Comment 10 Alexis Ballier gentoo-dev 2009-02-27 12:07:20 UTC
(In reply to comment #9)
> Yes, I am running glibc 2.6.1. I did a full re-compilation of all packages
> before submitting this, just in case something weird was left over. However,
> glibc has not been upgraded in the process.
> 
> Even if I try to re-install glibc, it still pulls 2.6.1. Am I missing
> something?

glibc version doesn't seem to matter; and anyway 2.6.1 is correct since that's the stable version.
Comment 11 Costa Tsaousis 2009-02-27 12:13:34 UTC
Alexis, I guess the patch is for 0.9.8a.
Again a stupid question: How do I try it?
Comment 12 Costa Tsaousis 2009-02-27 12:20:17 UTC
While attempting to install vlc-9999.

I added in /etc/portage/package.keywords, this line:

media-video/vlc-9999 **

Now emerge -puDNv world, gives:

--- Invalid atom in /etc/portage/package.keywords: media-video/vlc-9999

and does not pull vlc-9999.

Comment 13 Costa Tsaousis 2009-02-27 12:23:25 UTC
ok. I got it. It needs

=media-video/vlc-9999 **

Comment 14 Alexis Ballier gentoo-dev 2009-02-27 12:24:14 UTC
(In reply to comment #11)
> Alexis, I guess the patch is for 0.9.8a.
> Again a stupid question: How do I try it?


copy it in the vlc ebuilds files directory (/usr/portage/media-video/vlc/files), that dir will very likely not exist so you'll have to create it; then add 'epatch "${FILESDIR}/name_of_the_patch.patch"' at the end of src_unpack in 0.9.8a ebuild, run repoman manifest and re-emerge vlc-0.9.8a.



(In reply to comment #12)
> While attempting to install vlc-9999.
> 
> I added in /etc/portage/package.keywords, this line:
> 
> media-video/vlc-9999 **

doh! that should have been '=media-video/vlc-9999 **' :/
Comment 15 Costa Tsaousis 2009-02-28 03:08:15 UTC
The patch for 0.9.8a works. I have tested dozens of files without crashes.
Thank you very much for your effort.

I have found another bug though: the logo cannot be changed while streaming.
When sending via rc the command:

@logo logo-file newlogo.png

It responds with:
Variable doesn't exist or isn't a command.

I tried to compile vlc-9999 but it failed. It stops with:

...
ts.c: In function ‘GetPMT’:
ts.c:2464: error: implicit declaration of function ‘dvbpsi_SDTServiceAddDescriptor’
make[6]: *** [libmux_ts_plugin_la-ts.lo] Error 1
make[6]: *** Waiting for unfinished jobs....
mv -f .deps/libmux_ts_plugin_la-csa.Tpo .deps/libmux_ts_plugin_la-csa.Plo
mv -f .deps/libmux_ps_plugin_la-pes.Tpo .deps/libmux_ps_plugin_la-pes.Plo
mv -f .deps/libmux_ts_plugin_la-pes.Tpo .deps/libmux_ts_plugin_la-pes.Plo
mv -f .deps/libmux_ps_plugin_la-ps.Tpo .deps/libmux_ps_plugin_la-ps.Plo
make[6]: Leaving directory `/var/tmp/portage/media-video/vlc-9999/work/vlc-9999/modules/mux/mpeg'
make[5]: *** [all] Error 2
make[5]: Leaving directory `/var/tmp/portage/media-video/vlc-9999/work/vlc-9999/modules/mux/mpeg'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/var/tmp/portage/media-video/vlc-9999/work/vlc-9999/modules/mux'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/var/tmp/portage/media-video/vlc-9999/work/vlc-9999/modules/mux'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-video/vlc-9999/work/vlc-9999/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-video/vlc-9999/work/vlc-9999'
make: *** [all] Error 2

Apparently this is the only existence of ‘dvbpsi_SDTServiceAddDescriptor’, and does not appear in dvbpsi header files.

I tried removing the dvb USE flag, without any difference. Finally I commented out the offending function call in ts.c to make it go through.

As you mentioned, 1.0.0-git does not crash on these media files.
The issue with the logo however, exists in 1.0.0-git also.

The crash issue while streaming seems solved.
Shall I open another bug for the logo?

Thanks

Costa
Comment 16 Alexis Ballier gentoo-dev 2009-03-03 22:09:54 UTC
(In reply to comment #15)
> The patch for 0.9.8a works. I have tested dozens of files without crashes.
> Thank you very much for your effort.

good news, its been merged upstream and will be fixed in 0.9.9

> Apparently this is the only existence of ‘dvbpsi_SDTServiceAddDescriptor’,
> and does not appear in dvbpsi header files.
> 
> I tried removing the dvb USE flag, without any difference. Finally I commented
> out the offending function call in ts.c to make it go through.

well, the least I could say is that its expected with -9999 and don't try it unless you're willing to help developping vlc :)


> Shall I open another bug for the logo?

yes please, though i'm still unsure if its a bug or a feature.
Comment 17 Alexis Ballier gentoo-dev 2009-04-04 13:39:13 UTC
fixed in 0.9.9