You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Tuomas Kiviaho (JIRA)" <ji...@apache.org> on 2012/11/21 10:21:58 UTC

[jira] [Created] (FELIX-3771) Regression fixed at FELIX-971 is reintroduced at FELIX-3082

Tuomas Kiviaho created FELIX-3771:
-------------------------------------

             Summary: Regression fixed at FELIX-971 is reintroduced at FELIX-3082
                 Key: FELIX-3771
                 URL: https://issues.apache.org/jira/browse/FELIX-3771
             Project: Felix
          Issue Type: Bug
          Components: Framework
    Affects Versions: framework-4.0.2
            Reporter: Tuomas Kiviaho
            Priority: Minor


I got similar stacktrace that was listed at FELIX-971 and checked the Fisheye for how it was fixed. I discovered that FELIX-3082 reverted the fix thus making ServiceTrackers fail again at removedService. 

This happens to me when framework is exited before bundles are closed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (FELIX-3771) Regression fixed at FELIX-971 is reintroduced at FELIX-3082

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507095#comment-13507095 ] 

Richard S. Hall commented on FELIX-3771:
----------------------------------------

I believe the fix for FELIX-971 was incorrect in the first place.

The important part is that we are invalidating the bundle context *after* the bundle activator is invoked. After returning from the activator stop() method, the bundle should be stopped and should not be performing additionally activity. If the bundle continues to perform activities (i.e., it didn't wait for all its threads to stop), then it is in error and should be fixed.

Regarding your last sentence, the framework should never exit before stopping all bundles, since stopping all bundles is part of the shutdown process. It seems doubtful that this is the case, but if you have some specific scenario you can show me that indicates this is the case, then I'll look.

My guess is, not all bundles are properly stopping after their stop() method is called.
                
> Regression fixed at FELIX-971 is reintroduced at FELIX-3082
> -----------------------------------------------------------
>
>                 Key: FELIX-3771
>                 URL: https://issues.apache.org/jira/browse/FELIX-3771
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.0.2
>            Reporter: Tuomas Kiviaho
>            Priority: Minor
>
> I got similar stacktrace that was listed at FELIX-971 and checked the Fisheye for how it was fixed. I discovered that FELIX-3082 reverted the fix thus making ServiceTrackers fail again at removedService. 
> This happens to me when framework is exited before bundles are closed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (FELIX-3771) Regression fixed at FELIX-971 is reintroduced at FELIX-3082

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507091#comment-13507091 ] 

Richard S. Hall commented on FELIX-3771:
----------------------------------------

I don't believe the fix for FELIX-971 was correct in the first place. The important point here is that we are invalidating the bundle context *after* calling into the activator for stop() and also in start() in case of an activator failure. In both cases, there should be no more activity from the bundle since its activator has returned and by definition it should be done (i.e., cleaned up all its threads).

If the bundle is still doing activity after its activator has been stopped, then the bundle is not correct and should be fixed.
                
> Regression fixed at FELIX-971 is reintroduced at FELIX-3082
> -----------------------------------------------------------
>
>                 Key: FELIX-3771
>                 URL: https://issues.apache.org/jira/browse/FELIX-3771
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.0.2
>            Reporter: Tuomas Kiviaho
>            Priority: Minor
>
> I got similar stacktrace that was listed at FELIX-971 and checked the Fisheye for how it was fixed. I discovered that FELIX-3082 reverted the fix thus making ServiceTrackers fail again at removedService. 
> This happens to me when framework is exited before bundles are closed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (FELIX-3771) Regression fixed at FELIX-971 is reintroduced at FELIX-3082

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall updated FELIX-3771:
-----------------------------------

    Comment: was deleted

(was: I don't believe the fix for FELIX-971 was correct in the first place. The important point here is that we are invalidating the bundle context *after* calling into the activator for stop() and also in start() in case of an activator failure. In both cases, there should be no more activity from the bundle since its activator has returned and by definition it should be done (i.e., cleaned up all its threads).

If the bundle is still doing activity after its activator has been stopped, then the bundle is not correct and should be fixed.)
    
> Regression fixed at FELIX-971 is reintroduced at FELIX-3082
> -----------------------------------------------------------
>
>                 Key: FELIX-3771
>                 URL: https://issues.apache.org/jira/browse/FELIX-3771
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.0.2
>            Reporter: Tuomas Kiviaho
>            Priority: Minor
>
> I got similar stacktrace that was listed at FELIX-971 and checked the Fisheye for how it was fixed. I discovered that FELIX-3082 reverted the fix thus making ServiceTrackers fail again at removedService. 
> This happens to me when framework is exited before bundles are closed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Closed] (FELIX-3771) Regression fixed at FELIX-971 is reintroduced at FELIX-3082

Posted by "Tuomas Kiviaho (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tuomas Kiviaho closed FELIX-3771.
---------------------------------

    Resolution: Won't Fix

Indeed if take care of stopping the the service tracker at activator stop then this won't happen, but when the stopping is left for Felix then the removedService will be fired after bundle context is already gone. 

All I was hoping for was a fallback mechanism for such malpractice, but Javadoc states clearly that -

If this bundle is not in the STARTING, ACTIVE, or STOPPING states or this bundle is a fragment bundle, then this bundle has no valid BundleContext. This method will return null if this bundle has no valid BundleContext. 

- so the problem seems to be with the ServiceTracker which doesn't catch the exception and return quietly. In it's current form I would have assumed ServiceTracker javadoc to state the following:

Throws: java.lang.IllegalStateException - If this BundleContext is no longer valid.


                
> Regression fixed at FELIX-971 is reintroduced at FELIX-3082
> -----------------------------------------------------------
>
>                 Key: FELIX-3771
>                 URL: https://issues.apache.org/jira/browse/FELIX-3771
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.0.2
>            Reporter: Tuomas Kiviaho
>            Priority: Minor
>
> I got similar stacktrace that was listed at FELIX-971 and checked the Fisheye for how it was fixed. I discovered that FELIX-3082 reverted the fix thus making ServiceTrackers fail again at removedService. 
> This happens to me when framework is exited before bundles are closed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira