Linux XBMC from git crashing randomly on files it sometimes plays fine
#1
Here is the behavior: Run any video file. Sometimes it opens, plays, and runs just fine. But sometimes it crashes with VDPAU (close) and no additional information. I see the xwindows "X" cursor in the middle of the screen and a few moments later the menu comes back up. It doesn't appear to be any specific file or type of file/container/codec that is causing this. In fact, the same file will crash twice and then play perfectly after two crashes. Or play just fine all the way through and then crash on a second play. Confused

I am running a very newly compiled copy of XBMC:

Code:
09:28:49 T:3077941616  NOTICE: Starting XBMC (13.0-ALPHA4 Git:20130518-0da9a79), Platform: Linux (Ubuntu 11.10 - XBMCbuntu, 3.0.0-32-generic i686). Built on May 18 2013

on what was originally an XBMC-Live install from the CD ISO image:

Code:
xbmc@xbmc:~/.xbmc/temp# uname -a
Linux xbmc 3.0.0-32-generic #51-Ubuntu SMP Thu Mar 21 15:51:26 UTC 2013 i686 i686 i386 GNU/Linux

Hardware is an Acer Aspire Revo R3610 (Atom N330, ION chipset) with 2GB ram (2x1GB)

I have the x-swat repo installed:

Code:
xbmc@xbmc:~/.xbmc/temp# cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86 Kernel Module  304.84  Wed Feb 27 05:03:32 PST 2013
GCC version:  gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)

When compiling I used:

Code:
xbmc@xbmc:~/.xbmc/temp# ./configure --prefix=/usr --enable-vdpau --disable-pulse --disable-crystalhd
xbmc@xbmc:~/.xbmc/temp# make install prefix=/usr

And this is a pastebin of a complete session from boot to crash, with debugging enabled.

http://pastebin.com/5F2a2RUA

The offending bits are towards the bottom, but I reproduce them here:

Code:
09:29:47 T:3077941616   DEBUG: OnPlayMedia smb://xbmc:[email protected]/C/downloads/Nurse Jackie/Nurse Jackie Season 2/Nurse Jackie 2x03 - Candyland.avi
09:29:47 T:3077941616   DEBUG: CAnnouncementManager - Announcement: OnClear from xbmc
09:29:47 T:3077941616   DEBUG: GOT ANNOUNCEMENT, type: 2, from xbmc, message OnClear
09:29:47 T:3077941616   DEBUG: GetMovieId (smb://xbmc:[email protected]/C/downloads/Nurse Jackie/Nurse Jackie Season 2/Nurse Jackie 2x03 - Candyland.avi), query = select idMovie from movie where idFile=3752
09:29:47 T:3077941616   DEBUG: GetEpisodeId (smb://xbmc:[email protected]/C/downloads/Nurse Jackie/Nurse Jackie Season 2/Nurse Jackie 2x03 - Candyland.avi), query = select idEpisode from episode where idFile=3752
09:29:47 T:3077941616   DEBUG: GetMusicVideoId (smb://xbmc:[email protected]/C/downloads/Nurse Jackie/Nurse Jackie Season 2/Nurse Jackie 2x03 - Candyland.avi), query = select idMVideo from musicvideo where idFile=3752
09:29:47 T:3077941616   DEBUG: CAnnouncementManager - Announcement: OnAdd from xbmc
09:29:47 T:3077941616   DEBUG: GOT ANNOUNCEMENT, type: 2, from xbmc, message OnAdd
09:29:47 T:3077941616   DEBUG: CPlayerCoreFactory::GetPlayers(smb://xbmc:[email protected]/C/downloads/Nurse Jackie/Nurse Jackie Season 2/Nurse Jackie 2x03 - Candyland.avi)
09:29:47 T:3077941616   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: system rules
09:29:47 T:3077941616   DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: system rules
09:29:47 T:3077941616   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtv
09:29:47 T:3077941616   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: hdhomerun/myth/mms/udp
09:29:47 T:3077941616   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: lastfm/shout
09:29:47 T:3077941616   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtmp
09:29:47 T:3077941616   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtsp
09:29:47 T:3077941616   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: streams
09:29:47 T:3077941616   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvd
09:29:47 T:3077941616   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvdimage
09:29:47 T:3077941616   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: sdp/asf
09:29:47 T:3077941616   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: nsv
09:29:47 T:3077941616   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: radio
09:29:47 T:3077941616   DEBUG: CPlayerCoreFactory::GetPlayers: matched 0 rules with players
09:29:47 T:3077941616   DEBUG: CPlayerCoreFactory::GetPlayers: adding videodefaultplayer (1)
09:29:47 T:3077941616   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=0
09:29:47 T:3077941616   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=1
09:29:47 T:3077941616   DEBUG: CPlayerCoreFactory::GetPlayers: adding player: DVDPlayer (1)
09:29:47 T:3077941616   DEBUG: CPlayerCoreFactory::GetPlayers: added 1 players
09:29:47 T:3077941616  NOTICE: DVDPlayer: Opening: smb://xbmc:[email protected]/C/downloads/Nurse Jackie/Nurse Jackie Season 2/Nurse Jackie 2x03 - Candyland.avi
09:29:47 T:3077941616 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
09:29:47 T:3077941616   DEBUG: CRenderManager::UpdateDisplayLatency - Latency set to 0 msec
09:29:47 T:3077941616   DEBUG: LinuxRendererGL: Cleaning up GL resources
09:29:47 T:3077941616   DEBUG: CLinuxRendererGL::PreInit - precision of luminance 16 is 16
09:29:47 T:3011263344  NOTICE: Thread DVDPlayer start, auto delete: false
09:29:47 T:3011263344  NOTICE: Creating InputStream
09:29:47 T:3011263344   DEBUG: CSmbFile::Open - opened C/downloads/Nurse Jackie/Nurse Jackie Season 2/Nurse Jackie 2x03 - Candyland.avi, fd=10000
09:29:47 T:3011263344   DEBUG: ScanForExternalSubtitles: Searching for subtitles...
09:29:47 T:3011263344   DEBUG: OpenDir - Using authentication url smb://xbmc:[email protected]/C/downloads/Nurse%20Jackie/Nurse%20Jackie%20Season%202
09:29:47 T:3011263344   DEBUG: ScanForExternalSubtitles: END (total time: 28 ms)
09:29:47 T:3011263344  NOTICE: Creating Demuxer
09:29:47 T:3011263344   DEBUG: Open - probing detected format [avi]
09:29:47 T:3077941616   DEBUG: ------ Window Init (DialogBusy.xml) ------
09:29:47 T:3077941616   DEBUG: Window DialogBusy.xml was already loaded
09:29:47 T:3077941616   DEBUG: Alloc resources: 0.10m
09:29:49 T:3011263344   DEBUG: Open - avformat_find_stream_info starting
09:29:49 T:3011263344   DEBUG: Open - av_find_stream_info finished
09:29:49 T:3011263344    INFO: ffmpeg[B37C3B70]: Input #0, avi, from 'smb://xbmc:[email protected]/C/downloads/Nurse Jackie/Nurse Jackie Season 2/Nurse Jackie 2x03 - Candyland.avi':
09:29:49 T:3011263344    INFO: ffmpeg[B37C3B70]:   Metadata:
09:29:49 T:3011263344    INFO: ffmpeg[B37C3B70]:     encoder         : transcode-1.0.2
09:29:49 T:3011263344    INFO: ffmpeg[B37C3B70]:   Duration: 00:25:35.21, start: 0.000000, bitrate: 1275 kb/s
09:29:49 T:3011263344    INFO: ffmpeg[B37C3B70]:     Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 624x352 [SAR 1:1 DAR 39:22], 23.98 tbr, 23.98 tbn, 23.98 tbc
09:29:49 T:3011263344    INFO: ffmpeg[B37C3B70]:     Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 128 kb/s
09:29:49 T:3011263344   DEBUG: CDVDDemuxFFmpeg::AddStream(0, ...) -> 0
09:29:49 T:3011263344   DEBUG: CDVDDemuxFFmpeg::AddStream(1, ...) -> 1
09:29:49 T:3011263344  NOTICE: Opening video stream: 0 source: 256
09:29:49 T:3011263344  NOTICE: Creating video codec with codec id: 13
09:29:49 T:3011263344   DEBUG: CDVDFactoryCodec: compiled in hardware support: CrystalHD:no AMCodec:no OpenMax:no VDPAU:yes VAAPI:yes
09:29:49 T:3011263344   DEBUG: FactoryCodec - Video:  - Opening
09:29:49 T:3011263344  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-4 part 2
09:29:49 T:3011263344  NOTICE: CDVDVideoCodecFFmpeg::GetFormat - Creating VDPAU(624x352)
09:29:49 T:3011263344  NOTICE:  (VDPAU) Close

Any help appreciated, TIA!
Reply
#2
Looks like the same behaviour I reported in this ticket:

http://trac.xbmc.org/ticket/14325
Reply
#3
Does look like a similar output. Is there a way that I can roll back git and recompile to a version prior to 9cd2bc0acd5eed8586fe1765cc879c9cce196415 ?
Reply
#4
git checkout commitHash
Reply
#5
has this been corrected in the nightlies? I want to upgrade a new frodo install...
Reply
#6
Will give this a try, I too am getting the random VDPAU crash with libgl.. its only happening since i went to 12.2 but I cant roll back to test since I did a dist-upgrade prior :\ , I was only getting crashes when I went into "TV Shows" and would crash every time when I tried to play S01E01 of Invader Zim, how ever if i tried to play it via direct path it would play fine.... weird.... I will attempt fix above and let you know..
Reply
#7
Sadly this is confirmed...

First tried latest git... segfault...

Tried commit hash 9cd2bc0acd5eed8586fe1765cc879c9cce196415 segfault...

Tried 9cd2bc0's parent hash 6d75d56ee5312a9a178a3c7fdd9bce1c57b7a0db ... this worked..
Reply
#8
Should be fixed by https://github.com/xbmc/xbmc/pull/2815
If you put keywords like vdpau in the title of the thread, it would have grabbed my attention earlier.
Reply
#9
(2013-06-02, 15:46)FernetMenta Wrote: Should be fixed by https://github.com/xbmc/xbmc/pull/2815
If you put keywords like vdpau in the title of the thread, it would have grabbed my attention earlier.

Hey thanks for the fast response, Github not currently loading, but soon as it does will test patch out and let you know, cheers
Reply
#10
Apologies - didn't realize it was a VDPAU-related problem when I originally posted.
Reply
#11
(2013-06-02, 16:32)blm14 Wrote: Apologies - didn't realize it was a VDPAU-related problem when I originally posted.

No need to apologize, you didn't do anything wrong. Thank you guys for bringing this to my attention.
Reply
#12
(2013-06-02, 15:46)FernetMenta Wrote: Should be fixed by https://github.com/xbmc/xbmc/pull/2815
If you put keywords like vdpau in the title of the thread, it would have grabbed my attention earlier.

Looks good on my test build. Thanks!
Reply
#13
Confirmed... latest git checkout causes no segfaults, Thanks FernetMenta Smile
Reply
#14
Sorry for replying to a two-month old thread, but I'm experiencing this exact same behaviour using VAAPI accel on HD4000. Can it be a coincidence?

Most MKVs play perfectly fine (even when trying to force a segfault by repeatedly restarting, and also has no issues viewing a complete movie all the way through), whereas others trigger it semi-regularly.

Debug log: http://pastebin.com/ZvAZmSF6
Reply
#15
In case anyone is interested I can confirm that this is indeed VAAPI related. I've replayed the problematic video >10 times with VAAPI acceleration off, and it works perfectly. Beforehand I also tested almost my entire MKV library (consisting of the same resolution/VC-1 codec as the culprit, along with newer AVC encodes), and none of these show any tendency to segfault xbmc–despite exhaustive attempts.

Other files with FLAC 5.1 in a MKV container also work flawlessly, and XBMC does not show any problems when viewing files (many of which have been watched to the end)
Since two of my new rips also worked perfectly I re-ripped the problematic disc (out of curiosity), and as expected the same error was reproduced.

@FernetMenta–should I open a new bugreport for this issue, or can it be included into the existing one? (assuming the same type of uninitialized member check can be put into the VAAPI code as for VDPAU)?

Despite this curious snag XBMC is working pretty flawlessly on this HD4000 box. At least it can be worked around by disabling VAAPI. However, the CPU usage jumps from 15-20% to 60% with it disabled.
Reply

Logout Mark Read Team Forum Stats Members Help
XBMC from git crashing randomly on files it sometimes plays fine0