[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xine-devel
Subject:    Re: [xine-devel] xine lockups with ntpl
From:       Ewald Snel <ewald () rambo ! its ! tudelft ! nl>
Date:       2003-03-06 18:24:34
[Download RAW message or body]

Hi Bastien,

[...]

> Heya guys,
>
> As I don't know the xine engine enough to be able to fix that. This is
> one of the first lockups one would get with xine-ui trying to play an
> ogg file.
>
> NTPL shows quite a lot of bugs in programs not using threads and locks
> carefully enough, apparently.
>
> Anybody has an idea ?

I have noticed this too after installing the latest Red Hat beta (Phoebe-3). 
This seems to be caused by a bug in NPTL, where a condition broadcast is 
lost. You can use the attached patch to be able to use (and improve :)) xine. 
This should avoid at least the most common lockup in the xine library.

> Cheers

bye,

ewald

["xine-1.0.0-nptl.patch" (text/x-diff)]

--- xine-lib/src/xine-engine/demux.c.orig	2003-03-03 08:05:25.000000000 +0100
+++ xine-lib/src/xine-engine/demux.c	2003-03-03 08:00:09.000000000 +0100
@@ -123,10 +123,17 @@
 
   while ((stream->header_count_audio<header_count_audio) || 
 	 (stream->header_count_video<header_count_video)) {
+
+    struct timeval tv;
+    struct timespec ts;
+
 #ifdef LOG
     printf ("xine: waiting for headers.\n");
 #endif
-    pthread_cond_wait (&stream->counter_changed, &stream->counter_lock);
+    gettimeofday(&tv, NULL);
+    ts.tv_sec  = tv.tv_sec + 1;
+    ts.tv_nsec = tv.tv_usec * 1000;
+    pthread_cond_timedwait (&stream->counter_changed, &stream->counter_lock, &ts);
   }
 #ifdef LOG
   printf ("xine: headers processed.\n");

-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
xine-devel mailing list
xine-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic