You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Julian Sedding (JIRA)" <ji...@apache.org> on 2018/12/20 13:19:00 UTC

[jira] [Commented] (SLING-8187) Deadlock in SlingMainServlet after SLING-8051

    [ https://issues.apache.org/jira/browse/SLING-8187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16725828#comment-16725828 ] 

Julian Sedding commented on SLING-8187:
---------------------------------------

I created a PR. While I am confident that it improves the status-quo, I am not 100% happy due to the following draw-back:

 
 * SlingServletResolver has a mandatory reference to SlingServletContext, thus deferring registration of SlingServletContext causes registration of SlingServletResolver
 * SlingRequestProcessor (via SlingMainServlet) has a dynamic optional reference to SlingServletResolver, but throws an exception causing a 503 response while no SlingServletResolver is bound

--> thus the time-window for this 503 response increases with this fix - with the fix applied, I see it frequently if there are requests to my system during startup; without the fix I could not observe any.

 

 

> Deadlock in SlingMainServlet after SLING-8051
> ---------------------------------------------
>
>                 Key: SLING-8187
>                 URL: https://issues.apache.org/jira/browse/SLING-8187
>             Project: Sling
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: Engine 2.6.16
>            Reporter: Julian Sedding
>            Assignee: Julian Sedding
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The fix for SLING-8051 moved registration of the {{SlingServletContext}} instance from {{SlingMainServlet#activate()}} to {{SlingMainServlet#init()}}. It turns out that this can cause a deadlock due to Felix' global lock and a synchronized block in Felix HTTP WhiteboardManager implementation.
> This issue is about finding a way to fix the issue originally described in SLING-8051 without trisking a deadlock.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)