An XBMC crash, why did it happen?
#1
Hi guys,

First some sysinfo:

2.6.39-ck, Archlinux x86_64, XBMC 10.1, NVIDIA 275.19.1, X server 1.30.1, alsa-lib 1.0.24, alsa-utils 1.0.24.2
edit: Hardware is NVIDIA Ion + Atom

Here's the pastebin: http://pastebin.com/8Dp5gx1X

Any idea why it crashed and how I can prevent it? It happens a few times a week (I use it daily) but I never looked in the log files before today.

Here's a snippet:

Code:
17:16:54 T:139860404995840 M:2550530048  NOTICE: Creating audio device with codec id: 86020, channels: 2, sample rate: 48000, no pass-through
17:16:54 T:139860056540928 M:2550530048  NOTICE: running thread: video_thread
17:16:54 T:139860056540928 M:2549587968  NOTICE:  (VDPAU) screenWidth:1280 vidWidth:1280
17:16:54 T:139860056540928 M:2549587968  NOTICE:  (VDPAU) screenHeight:720 vidHeight:720
17:16:55 T:139860404995840 M:2538668032   ERROR: PulseAudio: Waited for the Context but it failed
17:16:55 T:139860404995840 M:2538668032   ERROR: PulseAudio: Failed to create context
17:16:55 T:139860056540928 M:2529161216  NOTICE:  (VDPAU) Total Output Surfaces Available: 4 of a max (tmp: 4 const: 4)
17:16:55 T:139860056540928 M:2526175232  NOTICE:  (VDPAU) Creating the video mixer
17:16:55 T:139860056540928 M:2517028864  NOTICE:  fps: 25.000000, pwidth: 1280, pheight: 720, dwidth: 1280, dheight: 720
17:16:55 T:139860056540928 M:2517028864  NOTICE: Display resolution ADJUST : default: 1920x1080 @ 50.00Hz (15)
17:16:55 T:139860404995840 M:2517028864   ERROR: GetDelay - snd_pcm_delay, alsa error: -32 - Broken pipe
17:16:55 T:139860056540928 M:2547376128   ERROR: VDPAU Device Preempted - attempting recovery
17:16:55 T:139860056540928 M:2547376128   ERROR:  (VDPAU) Error: The display was pre-empted, or a fatal error occurred.(2) at VDPAU.cpp:1008
17:16:55 T:139860056540928 M:2547376128   ERROR: CVDPAU::FFGetBuffer - No Video surface available could be created
17:16:55 T:139860056540928 M:2547376128   ERROR: Decode - avcodec_decode_video returned failure
17:16:55 T:139860056540928 M:2547376128  NOTICE: Attempting recovery
17:16:55 T:139860056540928 M:2547376128  NOTICE:  (VDPAU) FiniVDPAUOutput
17:16:55 T:139860782622784 M:2548101120   ERROR: GLX: Same window as before, refreshing context
17:16:55 T:139860056540928 M:2547392512  NOTICE: vdp_device = 0x00000001 vdp_st = 0x00000000

Thanks,
Reply
#2
fackamato Wrote:Hi guys,

First some sysinfo:

2.6.39-ck, Archlinux x86_64, XBMC 10.1, NVIDIA 275.19.1, X server 1.30.1, alsa-lib 1.0.24, alsa-utils 1.0.24.2
edit: Hardware is NVIDIA Ion + Atom

Here's the pastebin: http://pastebin.com/8Dp5gx1X

Any idea why it crashed and how I can prevent it? It happens a few times a week (I use it daily) but I never looked in the log files before today.

Here's a snippet:

Code:
17:16:54 T:139860404995840 M:2550530048  NOTICE: Creating audio device with codec id: 86020, channels: 2, sample rate: 48000, no pass-through
17:16:54 T:139860056540928 M:2550530048  NOTICE: running thread: video_thread
17:16:54 T:139860056540928 M:2549587968  NOTICE:  (VDPAU) screenWidth:1280 vidWidth:1280
17:16:54 T:139860056540928 M:2549587968  NOTICE:  (VDPAU) screenHeight:720 vidHeight:720
17:16:55 T:139860404995840 M:2538668032   ERROR: PulseAudio: Waited for the Context but it failed
17:16:55 T:139860404995840 M:2538668032   ERROR: PulseAudio: Failed to create context
17:16:55 T:139860056540928 M:2529161216  NOTICE:  (VDPAU) Total Output Surfaces Available: 4 of a max (tmp: 4 const: 4)
17:16:55 T:139860056540928 M:2526175232  NOTICE:  (VDPAU) Creating the video mixer
17:16:55 T:139860056540928 M:2517028864  NOTICE:  fps: 25.000000, pwidth: 1280, pheight: 720, dwidth: 1280, dheight: 720
17:16:55 T:139860056540928 M:2517028864  NOTICE: Display resolution ADJUST : default: 1920x1080 @ 50.00Hz (15)
17:16:55 T:139860404995840 M:2517028864   ERROR: GetDelay - snd_pcm_delay, alsa error: -32 - Broken pipe
17:16:55 T:139860056540928 M:2547376128   ERROR: VDPAU Device Preempted - attempting recovery
17:16:55 T:139860056540928 M:2547376128   ERROR:  (VDPAU) Error: The display was pre-empted, or a fatal error occurred.(2) at VDPAU.cpp:1008
17:16:55 T:139860056540928 M:2547376128   ERROR: CVDPAU::FFGetBuffer - No Video surface available could be created
17:16:55 T:139860056540928 M:2547376128   ERROR: Decode - avcodec_decode_video returned failure
17:16:55 T:139860056540928 M:2547376128  NOTICE: Attempting recovery
17:16:55 T:139860056540928 M:2547376128  NOTICE:  (VDPAU) FiniVDPAUOutput
17:16:55 T:139860782622784 M:2548101120   ERROR: GLX: Same window as before, refreshing context
17:16:55 T:139860056540928 M:2547392512  NOTICE: vdp_device = 0x00000001 vdp_st = 0x00000000

Thanks,
Probably because it tried to switch refresh rate. It's a known and very persistent bug. It should have gotten better with >=270 though.. Search trac for the bug.
Reply
#3
LB06 Wrote:Probably because it tried to switch refresh rate. It's a known and very persistent bug. It should have gotten better with >=270 though.. Search trac for the bug.

Oh, I never thought of that. I'll search for trac. Otherwise I guess I have to skip that perfect smoothness if I want stableness?

edit: http://trac.xbmc.org/ticket/10658
Reply
#4
Yes that's it. I have no clue why or how it happens and nor do the XBMC devs. It's probably driver related, as the situation seems to improve with every update.

If you have a lot of 50Hz PAL stuff you could consider switching the GUI to 50Hz instead of 60Hz. This way you'll have to switch much less and get less frequent crashes.

Most people including myself have found that since 270 or maybe 275 it rarely crashes anymore.
Reply
#5
Quote:(VDPAU) Error: The display was pre-empted, or a fatal error occurred

This is the root cause of the crash. The display gets preempted when the refresh rate changes. It's like taking the ground off under your feet. The application and the driver have to go through error handling. This might improve from version to version but will ever be a critical point.
The problem is identified and work on a solution has started.
Reply
#6
FernetMenta Wrote:This is the root cause of the crash. The display gets preempted when the refresh rate changes. It's like taking the ground off under your feet. The application and the driver have to go through error handling. This might improve from version to version but will ever be a critical point.
The problem is identified and work on a solution has started.

Okay, that's a start at least. I'm ready to try out some patches Wink
Reply
#7
Ah interesting. I more or less thought it was out of your hands, so to speak. So the problem is not nvidia driver related? Or is it a combination?
Reply
#8
It depends on from what perspective you look at this problem. VDPAU originially was not designed to interop with OpenGL. It's some tricky part in the code in order to make this work. Of course, a driver should never crash but here we deal with a not very common scenario. On the one hand this problem could be fixed in the nvidia drivers when looking into both parts, vdpau and opengl. On the other hand it might be a faster solution to work around this issue by clearing down vdpau resources, wait for change of refresh rate to be completed, and reconfigure.
Reply
#9
the nvidia driver your using is a few revisions back (stable is 275.25 now), and probably is the vdpau version your using. Alsa your just on the money.

Fermenta does have a XBMC GIT fork with a much better vdpau implementation, however the xbmc rev used is a little behind current mainline.

I guess what Im saying is that it would benefit you greatly to have a newer XBMC, (stable is fine but its so darn old now and so many improvements have been made thats it alone will moot your issue)

Ideally we would have the niggling issues with playback all sorted as well and fermentas work pulled into mainline.

You could create a backup of your system and try compiling your own xbmc either mainline or fermentas stuff and try seeing if it helps.

@ Fermenta how is the work going nothing been going on much in terms of discussions on git.
Reply
#10
Quote:Fermenta how is the work going nothing been going on much in terms of discussions on git.

There has been a lot of valuable comments on git and I am currently doing a redesign of some parts which includes a solution for the crash mentioned. I have something running but not very stable yet.
Reply

Logout Mark Read Team Forum Stats Members Help
An XBMC crash, why did it happen?0