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

Bertrand Delacretaz commented on SLING-1040:
--------------------------------------------

Right - I guess the problematic section is

  protected void activate(ComponentContext ctx) throws Exception {
        this.context = ctx;
        synchronized ( this.registeredJobs ) {
            this.init();
            for( Object[] arr : this.registeredJobs ) {
                try {
                    this.register((String)arr[0], (ServiceReference)arr[1]);

The lock should be released before calling this.register(...)

That code was written by Carsten, so I'll let him have a look instead of 
messing with it ;-)


> Too much synchronization in QuartzScheduler?
> --------------------------------------------
>
>                 Key: SLING-1040
>                 URL: https://issues.apache.org/jira/browse/SLING-1040
>             Project: Sling
>          Issue Type: Bug
>    Affects Versions: Commons Scheduler 2.0.4
>            Reporter: Bertrand Delacretaz
>            Priority: Minor
>         Attachments: deadlock-trace.txt
>
>
> In one of my jcrinstall tests I got a deadlock when jcrinstall tried to stop 
> the org.apache.sling.commons.scheduler bundle while it was being started by 
> the Felix ComponentActorThread.
> I'll attach the deadlock stack trace - wondering if some of the synchronized 
> sections in QuartzScheduler could be removed, to avoid such issues.
> That might be a jcrinstall/Felix problem as well: stopping a bundle while it 
> is being activated doesn't sound right, but I'm not sure how to prevent this, 
> as the ComponentActorThread actions run asynchronously.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to