How to start a program from satelite?

Arnaud de Bossoreille de Ribou bozo at via.ecp.fr
Wed Apr 3 19:56:02 CEST 2002


On Wed, Apr 03, 2002, Jean-Paul Saman wrote:
> This is a threading problem (two functions manipulating the same 
> counter) it manifast itself on a *very* fast machine,
> 
> The patch solves the problem adequately I think.(with the limiting 
> testing I did) Provided that the counters are correct at any one time.

Ok, the main problem was the concurrent write access to m_iSize.

Now the only bad (well no so bad) thing that can occur is a bad value
calculated in the if at the beggining of Push and Pop but it's not
really a problem since both tests should always be true because of 3
things:

  - the 2 semaphores used in C_SyncFifo;
  - the fact that in C_Fifo::Push(), the size calculated can only
    decrease due to a concurrent call to C_Fifo::Pop();
  - the fact that in C_Fifo::Pop(), m_iWhereToPush != m_iWhereToPop
    because of the first point.

So no lock is needed and it's a good news.

> > The ASSERT above say that
> > 
> >   - either a NULL packet has been pushed but there should have some
> >     other assertions before so I don't think this possible;
> 
> I think a NULL packet has been popped.

Yes but it has not been pushed, it must be the concurrent write access
to m_iSize which introduces a bad value.

> >   - or the Fifo has a bug which may be solved by my patch.
> 
> The patch seems to solve the problem in SyncFifo with m_iSize. You're 
> solution to this problem is cleaner, then mine ;-).

Thank you ;-) I'm going to commit it just before the release.

> The server is a dual Pentium Xeon 1,7 GHz with 2 Hauppage WinTV Nova for 
> DVB streaming from satelite. Running Linux 2.4.18 smp + preemptible + 
> lowlatency patches.

I think the _dual_ word was the detonator :)

-- 
Arnaud de Bossoreille de Ribou - http://www.via.ecp.fr/~bozo/

-- 
This is the vls-devel mailing-list, see http://www.videolan.org/vls-devel/
To unsubscribe, please read http://www.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vls-devel mailing list