You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2010/09/03 19:06:33 UTC
[jira] Created: (SLING-1728) ServiceCache is prone to deadlocks
ServiceCache is prone to deadlocks
----------------------------------
Key: SLING-1728
URL: https://issues.apache.org/jira/browse/SLING-1728
Project: Sling
Issue Type: Bug
Components: Scripting
Affects Versions: Scripting Core 2.0.12
Reporter: Felix Meschberger
Assignee: Felix Meschberger
Fix For: Scripting Core 2.0.12
The ServiceCache introduce with SLING-1478 is prone to deadlocks with the Framework.
The serviceChanged method is called from the framework and tries to synchronize on the cache. The getService method on the other hand synchronizes on the cache and while holding the lock calls into the framework.
The fix is to not hold a lock while calling into the framework.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SLING-1728) ServiceCache is prone to deadlocks
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-1728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger resolved SLING-1728.
--------------------------------------
Resolution: Fixed
Applied the second version of the patch in Rev. 992946.
> ServiceCache is prone to deadlocks
> ----------------------------------
>
> Key: SLING-1728
> URL: https://issues.apache.org/jira/browse/SLING-1728
> Project: Sling
> Issue Type: Bug
> Components: Scripting
> Affects Versions: Scripting Core 2.0.12
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Priority: Critical
> Fix For: Scripting Core 2.0.12
>
> Attachments: SLING-1728-v1.patch, SLING-1728-v2.patch
>
>
> The ServiceCache introduce with SLING-1478 is prone to deadlocks with the Framework.
> The serviceChanged method is called from the framework and tries to synchronize on the cache. The getService method on the other hand synchronizes on the cache and while holding the lock calls into the framework.
> The fix is to not hold a lock while calling into the framework.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-1728) ServiceCache is prone to deadlocks
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-1728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12906333#action_12906333 ]
Carsten Ziegeler commented on SLING-1728:
-----------------------------------------
Yes I think version 2 is the better option
> ServiceCache is prone to deadlocks
> ----------------------------------
>
> Key: SLING-1728
> URL: https://issues.apache.org/jira/browse/SLING-1728
> Project: Sling
> Issue Type: Bug
> Components: Scripting
> Affects Versions: Scripting Core 2.0.12
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Priority: Critical
> Fix For: Scripting Core 2.0.12
>
> Attachments: SLING-1728-v1.patch, SLING-1728-v2.patch
>
>
> The ServiceCache introduce with SLING-1478 is prone to deadlocks with the Framework.
> The serviceChanged method is called from the framework and tries to synchronize on the cache. The getService method on the other hand synchronizes on the cache and while holding the lock calls into the framework.
> The fix is to not hold a lock while calling into the framework.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SLING-1728) ServiceCache is prone to deadlocks
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-1728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger updated SLING-1728:
-------------------------------------
Attachment: SLING-1728-v1.patch
SLING-1728-v2.patch
Attaching two patch variants:
v1 works along the initial idea to not get at the service registry if not absolutely required.
v2 changes this assumption and goes to the service registry eagerly. In the (probably rare) case of more than one thread fetching the same service at the same time, the extra services are returned again.
I like the second patch more, because it is simpler and easier to understand while the first version goes a long way with synchronization and notification. Also the gain (reducing load on the service registry) is IMHO not worth the pain (more complex code).
Opinions ?
> ServiceCache is prone to deadlocks
> ----------------------------------
>
> Key: SLING-1728
> URL: https://issues.apache.org/jira/browse/SLING-1728
> Project: Sling
> Issue Type: Bug
> Components: Scripting
> Affects Versions: Scripting Core 2.0.12
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: Scripting Core 2.0.12
>
> Attachments: SLING-1728-v1.patch, SLING-1728-v2.patch
>
>
> The ServiceCache introduce with SLING-1478 is prone to deadlocks with the Framework.
> The serviceChanged method is called from the framework and tries to synchronize on the cache. The getService method on the other hand synchronizes on the cache and while holding the lock calls into the framework.
> The fix is to not hold a lock while calling into the framework.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SLING-1728) ServiceCache is prone to deadlocks
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-1728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger updated SLING-1728:
-------------------------------------
Priority: Critical (was: Major)
> ServiceCache is prone to deadlocks
> ----------------------------------
>
> Key: SLING-1728
> URL: https://issues.apache.org/jira/browse/SLING-1728
> Project: Sling
> Issue Type: Bug
> Components: Scripting
> Affects Versions: Scripting Core 2.0.12
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Priority: Critical
> Fix For: Scripting Core 2.0.12
>
> Attachments: SLING-1728-v1.patch, SLING-1728-v2.patch
>
>
> The ServiceCache introduce with SLING-1478 is prone to deadlocks with the Framework.
> The serviceChanged method is called from the framework and tries to synchronize on the cache. The getService method on the other hand synchronizes on the cache and while holding the lock calls into the framework.
> The fix is to not hold a lock while calling into the framework.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (SLING-1728) ServiceCache is prone to deadlocks
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-1728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler closed SLING-1728.
-----------------------------------
> ServiceCache is prone to deadlocks
> ----------------------------------
>
> Key: SLING-1728
> URL: https://issues.apache.org/jira/browse/SLING-1728
> Project: Sling
> Issue Type: Bug
> Components: Scripting
> Affects Versions: Scripting Core 2.0.14
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Priority: Critical
> Fix For: Scripting Core 2.0.14
>
> Attachments: SLING-1728-v1.patch, SLING-1728-v2.patch
>
>
> The ServiceCache introduce with SLING-1478 is prone to deadlocks with the Framework.
> The serviceChanged method is called from the framework and tries to synchronize on the cache. The getService method on the other hand synchronizes on the cache and while holding the lock calls into the framework.
> The fix is to not hold a lock while calling into the framework.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.