You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Rob Walker (JIRA)" <ji...@apache.org> on 2007/09/11 12:31:32 UTC

[jira] Created: (FELIX-363) Forceable termination of Felix instance leaves global EventDispatcher in non-restartable state

Forceable termination of Felix instance leaves global EventDispatcher in non-restartable state
----------------------------------------------------------------------------------------------

                 Key: FELIX-363
                 URL: https://issues.apache.org/jira/browse/FELIX-363
             Project: Felix
          Issue Type: Bug
          Components: Framework
            Reporter: Rob Walker
            Assignee: Rob Walker


FELIX-314 fixed an issue where internal shutdown of the global EventDispatcher thread left Felx in a state where new instances could not be started within the same VM at a later time.

It seems in an Applet VM environment using JRE 1.6 and IE7 there is a variation on this case where the Applet VM is forcibly killing VM threads not cleanly terminated by the application itself e.g. a sloppily written Applet  (like ours!) which launched a Felix instance in the start() but didn't shut it down in the stop().

Such a forceable termination is not tracked or detected, and hence leads to a similar inability to start additional Felix instances as was being seen in FELIX-314



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


[jira] Resolved: (FELIX-363) Forceable termination of Felix instance leaves global EventDispatcher in non-restartable state

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

Rob Walker resolved FELIX-363.
------------------------------

    Resolution: Fixed

Committed a fix which should ensure:

- m_thread is nulled out whenever run() exits regardless of reason

- also checks whether m_thread.isAlive() to handle cases where thread is killed but not detected internally, and m_thread doesn't get nulled out.

> Forceable termination of Felix instance leaves global EventDispatcher in non-restartable state
> ----------------------------------------------------------------------------------------------
>
>                 Key: FELIX-363
>                 URL: https://issues.apache.org/jira/browse/FELIX-363
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>            Reporter: Rob Walker
>            Assignee: Rob Walker
>
> FELIX-314 fixed an issue where internal shutdown of the global EventDispatcher thread left Felx in a state where new instances could not be started within the same VM at a later time.
> It seems in an Applet VM environment using JRE 1.6 and IE7 there is a variation on this case where the Applet VM is forcibly killing VM threads not cleanly terminated by the application itself e.g. a sloppily written Applet  (like ours!) which launched a Felix instance in the start() but didn't shut it down in the stop().
> Such a forceable termination is not tracked or detected, and hence leads to a similar inability to start additional Felix instances as was being seen in FELIX-314

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


[jira] Commented: (FELIX-363) Forceable termination of Felix instance leaves global EventDispatcher in non-restartable state

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

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

The patch makes it so that the calling thread of EventDispatcher.shutdown() no longer waits for the dispatcher thread to shutdown. This changes the behavior a little bit, but I am not sure if anyone cares about this.

I could imagine, given the situation of the dispatcher thread being killed, that you could get into some condition where the calling thread is waiting for the dispatcher thread forever since there is likely a race condition between the caller waiting and the dispatcher getting killed.

> Forceable termination of Felix instance leaves global EventDispatcher in non-restartable state
> ----------------------------------------------------------------------------------------------
>
>                 Key: FELIX-363
>                 URL: https://issues.apache.org/jira/browse/FELIX-363
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>            Reporter: Rob Walker
>            Assignee: Rob Walker
>
> FELIX-314 fixed an issue where internal shutdown of the global EventDispatcher thread left Felx in a state where new instances could not be started within the same VM at a later time.
> It seems in an Applet VM environment using JRE 1.6 and IE7 there is a variation on this case where the Applet VM is forcibly killing VM threads not cleanly terminated by the application itself e.g. a sloppily written Applet  (like ours!) which launched a Felix instance in the start() but didn't shut it down in the stop().
> Such a forceable termination is not tracked or detected, and hence leads to a similar inability to start additional Felix instances as was being seen in FELIX-314

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


[jira] Commented: (FELIX-363) Forceable termination of Felix instance leaves global EventDispatcher in non-restartable state

Posted by "Rob Walker (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12526518 ] 

Rob Walker commented on FELIX-363:
----------------------------------

Good spot - thanks for commenting Richard

We had a minor issue with this seeming like a lock-up case, although it's very boundary. So not an issue to put the "wait on shutdown" code back in if others need it / prefer it.

Could also make waiting it an optional/default case selectable by property if it's something that only a few use-cases need.

> Forceable termination of Felix instance leaves global EventDispatcher in non-restartable state
> ----------------------------------------------------------------------------------------------
>
>                 Key: FELIX-363
>                 URL: https://issues.apache.org/jira/browse/FELIX-363
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>            Reporter: Rob Walker
>            Assignee: Rob Walker
>
> FELIX-314 fixed an issue where internal shutdown of the global EventDispatcher thread left Felx in a state where new instances could not be started within the same VM at a later time.
> It seems in an Applet VM environment using JRE 1.6 and IE7 there is a variation on this case where the Applet VM is forcibly killing VM threads not cleanly terminated by the application itself e.g. a sloppily written Applet  (like ours!) which launched a Felix instance in the start() but didn't shut it down in the stop().
> Such a forceable termination is not tracked or detected, and hence leads to a similar inability to start additional Felix instances as was being seen in FELIX-314

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


[jira] Work started: (FELIX-363) Forceable termination of Felix instance leaves global EventDispatcher in non-restartable state

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

Work on FELIX-363 started by Rob Walker.

> Forceable termination of Felix instance leaves global EventDispatcher in non-restartable state
> ----------------------------------------------------------------------------------------------
>
>                 Key: FELIX-363
>                 URL: https://issues.apache.org/jira/browse/FELIX-363
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>            Reporter: Rob Walker
>            Assignee: Rob Walker
>
> FELIX-314 fixed an issue where internal shutdown of the global EventDispatcher thread left Felx in a state where new instances could not be started within the same VM at a later time.
> It seems in an Applet VM environment using JRE 1.6 and IE7 there is a variation on this case where the Applet VM is forcibly killing VM threads not cleanly terminated by the application itself e.g. a sloppily written Applet  (like ours!) which launched a Felix instance in the start() but didn't shut it down in the stop().
> Such a forceable termination is not tracked or detected, and hence leads to a similar inability to start additional Felix instances as was being seen in FELIX-314

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