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

Mark Spieth mark at dclabs.com.au
Fri Sep 10 01:39:11 EDT 2004


I knew my fix was not the end of it.
I think dougs mod to mythcontext to provide waitconditions is the best
solution as there is no max 1 second lag then.
the priv req will then happen virtually immediately.
the last step is to pass the threadid as well as the thread ptr so that the
thread itself can be queried for aliveness before the sched happens.
even a wait condition for return is not enough unless the sched req and wait
for done happens as the first thing inside the thread, and not outside the
thread as it is currently being done in StartPlaying.
that way the thread cant exit before the sched is done.
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