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 2
Plugin Development
TVMosaic Provider for MP2
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="Brownard" data-source="post: 1289596" data-attributes="member: 48291"><p>Manual scheduling using TVMosaic was broken, I think I've fixed it.</p><p></p><p>And I've hopefully pushed a fix for this, this was a deeper issue with the Plugin Manager which I created a JIRA for <a href="https://issues.team-mediaportal.com/browse/MP2-897" target="_blank">here</a>.</p><p></p><p>[USER=48495]@morpheus_xx[/USER] the Plugin Manager was occasionally deadlocking, leading to the the creation of the TVMosaicProvider service failing with a timeout. The issue was that because the TVMosaic plugin registers plugin items for 2 different dependencies (it registers the service with the ServiceRegistration and player mime type with the VideoPlayer plugin) it was being activated from 2 different threads concurrently when they each requested their plugin items. The 1st thread locks the plugin's state by obtaining an ugradeable read lock for the plugin <a href="https://github.com/MediaPortal/MediaPortal-2/blob/0fc1b50739739dcfc72f976883f846cd70caca02/MediaPortal/Source/Core/MediaPortal.Common/Services/PluginManager/PluginManager.cs#L961" target="_blank">here</a>, the next thread then attempts to obtain the same lock, and is blocked until the 1st thread releases it. However, whilst waiting to obtain the plugin lock it is also holding the Plugin Manager's internal lock <a href="https://github.com/MediaPortal/MediaPortal-2/blob/0fc1b50739739dcfc72f976883f846cd70caca02/MediaPortal/Source/Core/MediaPortal.Common/Services/PluginManager/PluginManager.cs#L723" target="_blank">here</a>, this causes the 1st thread to deadlock when it attempts to obtain the same lock <a href="https://github.com/MediaPortal/MediaPortal-2/blob/0fc1b50739739dcfc72f976883f846cd70caca02/MediaPortal/Source/Core/MediaPortal.Common/Services/PluginManager/PluginManager.cs#L971" target="_blank">here</a>, causing the plugin lock to never be released until the 2nd thread times out. I reworked the state locking to not hold the internal lock and also checked for the case when a thread has activated the plugin whilst another thread is waiting to activate it.</p></blockquote><p></p>
[QUOTE="Brownard, post: 1289596, member: 48291"] Manual scheduling using TVMosaic was broken, I think I've fixed it. And I've hopefully pushed a fix for this, this was a deeper issue with the Plugin Manager which I created a JIRA for [URL='https://issues.team-mediaportal.com/browse/MP2-897']here[/URL]. [USER=48495]@morpheus_xx[/USER] the Plugin Manager was occasionally deadlocking, leading to the the creation of the TVMosaicProvider service failing with a timeout. The issue was that because the TVMosaic plugin registers plugin items for 2 different dependencies (it registers the service with the ServiceRegistration and player mime type with the VideoPlayer plugin) it was being activated from 2 different threads concurrently when they each requested their plugin items. The 1st thread locks the plugin's state by obtaining an ugradeable read lock for the plugin [URL='https://github.com/MediaPortal/MediaPortal-2/blob/0fc1b50739739dcfc72f976883f846cd70caca02/MediaPortal/Source/Core/MediaPortal.Common/Services/PluginManager/PluginManager.cs#L961']here[/URL], the next thread then attempts to obtain the same lock, and is blocked until the 1st thread releases it. However, whilst waiting to obtain the plugin lock it is also holding the Plugin Manager's internal lock [URL='https://github.com/MediaPortal/MediaPortal-2/blob/0fc1b50739739dcfc72f976883f846cd70caca02/MediaPortal/Source/Core/MediaPortal.Common/Services/PluginManager/PluginManager.cs#L723']here[/URL], this causes the 1st thread to deadlock when it attempts to obtain the same lock [URL='https://github.com/MediaPortal/MediaPortal-2/blob/0fc1b50739739dcfc72f976883f846cd70caca02/MediaPortal/Source/Core/MediaPortal.Common/Services/PluginManager/PluginManager.cs#L971']here[/URL], causing the plugin lock to never be released until the 2nd thread times out. I reworked the state locking to not hold the internal lock and also checked for the case when a thread has activated the plugin whilst another thread is waiting to activate it. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
TVMosaic Provider for MP2
Contact us
RSS
Top
Bottom