[mythtv] [PATCH] mythfrontend segfault due to NULL thread privrequest

Mark Spieth mark at dclabs.com.au
Fri Sep 10 01:45:36 EDT 2004


even easier fix.
make sure that outputvideo thread is alive for > 1 sec
at end of output_video just before return
usleep(1500000);    // 1.5 secs
and then the sched is guaranteed to have happened while the thread is alive.
also addPrivRequest at top of thread not in StartPlaying. should fix it
permanently with the 1 sec sleep in the priv req thread
mark

----- Original Message ----- 
From: "Isaac Richards" <ijr at po.cwru.edu>
To: "Development of mythtv" <mythtv-dev at mythtv.org>
Sent: Friday, September 10, 2004 2:53 PM
Subject: Re: [mythtv] [PATCH] mythfrontend segfault due to NULL thread
privrequest


> On Friday 10 September 2004 12:21 am, Isaac Richards wrote:
> > On Thursday 09 September 2004 11:48 pm, Frank Riley wrote:
> > > This bug is not fixed. The problem is there is no synchronization
between
> > > the video thread and the thread that handles the priv requests. The
video
> > > thread that gets placed on the priv request queue is created on the
stack
> > > in NuppelVideoPlayer::StartPlaying(). If StartPlaying() finishs (i.e.
the
> > > video is done playing) before the priv request thread gets around to
> > > handling the request on the queue, pthread_setschedparam blows up
because
> > > the thread pointer it has is now pointing into la-la land. This is
easily
> > > reproducible (at least on my box) by going to the delete recordings
> > > screen and quickly scrolling through the recordings until it blows up
(as
> > > long as the preview window is turned on). I'm guessing there is a
> > > separate thread to change the priority only because we only want to
have
> > > to set
> > > mythfrontend as setuid. Is that correct?
> >
> > Yup, and your assessment of the issue is also 100% correct.  I'm
probably
> > going to end up disabling the priority thread temporarily for the
release,
> > then fix it afterwards..
>
> Ah, nevermind - got an easy workaround in place.
>
> Isaac
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>



More information about the mythtv-dev mailing list