home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Area 51 - Testing Area
TSWriter deadlock potential fix.
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="mm1352000" data-source="post: 994222" data-attributes="member: 82144"><p>@<a href="https://forum.team-mediaportal.com/members/djblu.54957/" target="_blank">DJBlu</a></p><p>Looks like you've made some excellent progress with this issue.</p><p>Having said that, personally I don't understand how your changes are solving the problem.</p><p>Are you able to explain a little?</p><p> </p><p>My perspective is this...</p><p>The deadlock at GetNewSubChannel() (which is calling CMpTs::AddChannel()) is obviously blocking on the m_Lock declared in CMpTs.</p><p>We can see who/what is holding the lock by reading/comparing logs very carefully. I've attached such a sample with the epg.log, tv.log and TsWriter.log stitched together. Compare the output of the last successful EPG grab (for "ANTENA 3"):</p><p> </p><p></p><p> </p><p>...with the failure:</p><p> </p><p></p><p> </p><p>Note that thread 18 in the second section is locking in CMpTsFilter:<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite5" alt=":confused:" title="Confused :confused:" loading="lazy" data-shortname=":confused:" />top(). There is no "Pausegraph" entry.</p><p>This is telling me that for some reason the filter is refusing to stop.</p><p> </p><p>Here's the corresponding function:</p><p>[code]STDMETHODIMP CMpTsFilter::Stop()</p><p>{</p><p> CAutoLock cObjectLock(m_pLock);</p><p> LogDebug("CMpTsFilter::Stop()");</p><p> return CBaseFilter::Stop();</p><p>}[/code]</p><p> </p><p>Quite simple really.</p><p>We can tell that m_pLock is the same lock as is used for CMpTs::AddChannel() by examining the constructor of CMpTs, the constructor of CMpTsFilter and the declaration of CBaseFilter in amfilter.h:</p><p></p><p></p><p></p><p> </p><p> </p><p>What I don't understand is why CBaseFilter:<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite5" alt=":confused:" title="Confused :confused:" loading="lazy" data-shortname=":confused:" />top() is blocking.</p><p> </p><p>Note that the example above is about as single-threaded as TV Server can get. Sequential tunes, over and over again... then we get this.</p><p> </p><p>mm</p></blockquote><p></p>
[QUOTE="mm1352000, post: 994222, member: 82144"] @[URL='https://forum.team-mediaportal.com/members/djblu.54957/']DJBlu[/URL] Looks like you've made some excellent progress with this issue. Having said that, personally I don't understand how your changes are solving the problem. Are you able to explain a little? My perspective is this... The deadlock at GetNewSubChannel() (which is calling CMpTs::AddChannel()) is obviously blocking on the m_Lock declared in CMpTs. We can see who/what is holding the lock by reading/comparing logs very carefully. I've attached such a sample with the epg.log, tv.log and TsWriter.log stitched together. Compare the output of the last successful EPG grab (for "ANTENA 3"): ...with the failure: Note that thread 18 in the second section is locking in CMpTsFilter::Stop(). There is no "Pausegraph" entry. This is telling me that for some reason the filter is refusing to stop. Here's the corresponding function: [code]STDMETHODIMP CMpTsFilter::Stop() { CAutoLock cObjectLock(m_pLock); LogDebug("CMpTsFilter::Stop()"); return CBaseFilter::Stop(); }[/code] Quite simple really. We can tell that m_pLock is the same lock as is used for CMpTs::AddChannel() by examining the constructor of CMpTs, the constructor of CMpTsFilter and the declaration of CBaseFilter in amfilter.h: What I don't understand is why CBaseFilter::Stop() is blocking. Note that the example above is about as single-threaded as TV Server can get. Sequential tunes, over and over again... then we get this. mm [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Area 51 - Testing Area
TSWriter deadlock potential fix.
Contact us
RSS
Top
Bottom