DVD VIDEO_TS playback hangs
#1
Hi,

I'm finding that whenever I playback a ripped DVD (in VIDEO_TS format), it plays perfectly for about 10 minutes, after which time the video freezes, the audio ends a few seconds later, and xbmc becomes completely unresponsive. This has happened with all of the DVDs that I've tried (3 or 4 at this point), though I haven't had this setup for long so I've not exhaustively tried every video in my collection.

I'm running an Apple TV2 with software version 4.3 (2557) and iOS version 4.3 (8F455). I'm running the September 10 nightly (Git:20110910-34a8ccb), which I got from http://mirrors.xbmc.org/nightlies/darwin...r-atv2.deb. I also noticed this same behavior on earlier nightly builds as well.

I'm sharing the videos over NFS via a wired network connection. Does anyone have any suggestions or workarounds?

xbmc.log
http://pastebin.com/B2FMifNM

Mediainfo details:
http://pastebin.com/DfpnCEWp

Thanks!
Reply
#2
Haven't really looked at your issue yet (will do so in a moment here) but it's just awesome to not only see a proper bug report like this, but to see one from a first time poster! Thank you for taking the time to include these details. They will help both you and those helping you.
Reply
#3
xbmcarl Wrote:Hi,

I'm finding that whenever I playback a ripped DVD (in VIDEO_TS format), it plays perfectly for about 10 minutes, after which time the video freezes, the audio ends a few seconds later, and xbmc becomes completely unresponsive. This has happened with all of the DVDs that I've tried (3 or 4 at this point), though I haven't had this setup for long so I've not exhaustively tried every video in my collection.

I'm running an Apple TV2 with software version 4.3 (2557) and iOS version 4.3 (8F455). I'm running the September 10 nightly (Git:20110910-34a8ccb), which I got from http://mirrors.xbmc.org/nightlies/darwin...r-atv2.deb. I also noticed this same behavior on earlier nightly builds as well.

I'm sharing the videos over NFS via a wired network connection. Does anyone have any suggestions or workarounds?

xbmc.log
http://pastebin.com/B2FMifNM

Mediainfo details:
http://pastebin.com/DfpnCEWp

Thanks!

great report! ... not quiet sure but it seems that thumbnail extraction is turned on ... this should be deactivated ( somewhere in system->video-> playback or so)
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#4
Thanks for the kind feedback Ned Scott and Memphiz. I went ahead and turned off thumbnail extraction, but unfortunately it had no impact on the freezing issue.
Reply
#5
I've looked a little further into this and have possibly narrowed the problem a bit. It seems that if I play the VOBs directly, they play fine from beginning to end. The problem comes if I either play the VIDEO_TS.IFO, or if I play the DVD through the "movies" tab. I assume that these these last two equate to more or less the same thing. At any rate, if I play the VIDEO_TS.IFO, I get the problem described above.

Any thoughts?
Reply
#6
Something similar reported a while back:

http://forum.xbmc.org/showthread.php?tid=101073
Reply
#7
Thanks for the pointer jacaru. That seems similar to what I'm seeing; however, the main difference (from my perspective) is that I'm not really seeing a performance problem. That is, my movie doesn't drop to 3 FPS and start stuttering. Instead, it just stops. If it allow xbmc to sit for awhile, it doesn't appear to advance even a single frame.

I tried attaching gdb to the AppleTV process in the hopes that I could see one of the threads segfault or some other behavior. That doesn't seem to happen, and it's not clear to me which of those threads are xbmc anyway.. I have no experience with iOS programming, but could the problem be related to thread synchronization? I say this because I see a bunch of threads sitting in semaphore-related tasks after video playback stops.
Reply
#8
Have you tried pausing playback and then playing again to see if it sorts it out? That kinda helped me back then.
Reply
#9
Unfortunately, xbmc is entirely unresponsive to the remote control when this happens. The box isn't locked up entirely though, as I can still ssh into the atv2 and have a look at what's going on. Below, I've reproduced a summary of the current thread state when xbmc playback freezes. I've also included the backtrace of most threads (evidently the full backtrace is too long for the forum). To my naive view, it looks like threads 23, 22, 21, and 17 (at least) are xbmc-related. And each of them is stuck in some form of __semwait_signal () or semaphore_wait_signal_trap ().

http://pastebin.com/vaxJ7n2G
Reply
#10
http://www.pastebin.com works well for pasting lengthy items.

since you are attaching gdb, do you know about the bone ? It's a bone for the atv2 watchdog, hang in gdb too long and the dog get's you Smile

Apple-TV:~ root# apt-cache search bone
cz.brainrain.bone - Bone for watchdog. Enables debugging of AppleTV.app

threads run and sleep waiting for a signal, that's __semwait_signal. Does not always mean they are stick.

Thread 17 looks odd. That the main xbmc thread. It handles when to render and I'm surprised that you caught it right in the middle of the nfs keep alive semaphore_wait_signal. Almost like nfs is stalled.
Reply
#11
davilla Wrote:Thread 17 looks odd. That the main xbmc thread. It handles when to render and I'm surprised that you caught it right in the middle of the nfs keep alive semaphore_wait_signal. Almost like nfs is stalled.

Having a quick look at the source code it looks like the order of gaining locks is not consistent and results in deadlock.

Thread 21 is blocked attempting to gain the keepAliveLock while holding the connection lock. Thread 17 is blocked attempting to gain the connections lock while holding the keepAliveLock.
Reply
#12
yep ... deadlock between 17 and 21 ... i think this one is mine when i get home ...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#13
Very good catch. Playing a DVD seems to hold open more then the current playing VOB file (all VOBs of the dvd - for smooth change between them?). So after 4 mins the keepalive kicks in for the other opened files (because they didn't get refreshed because they wheren't read for 4 mins) and then it deadlocked.

Fixed in https://github.com/xbmc/xbmc/commit/044f...ccd287daba
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#14
This is fantastic! I'll check it out after the next nightly snapshot and report back my experience. Thanks to everyone for all of your help.
Reply
#15
I'm happy to report that I was able to watch the problematic video from start to finish with the Sep. 13 nightly (http://mirrors.xbmc.org/nightlies/darwin...r-atv2.deb). Thanks again to everyone for all of your help.
Reply

Logout Mark Read Team Forum Stats Members Help
DVD VIDEO_TS playback hangs0