Remote shell bundle can prevent felix shutdown
----------------------------------------------

                 Key: FELIX-734
                 URL: https://issues.apache.org/jira/browse/FELIX-734
             Project: Felix
          Issue Type: Bug
          Components: Remote Shell
    Affects Versions: shell.remote-1.0.2
         Environment: felix 1.2.0, shell-remote 1.0.2
            Reporter: Patrick Forhan


One one of our PCs, issuing a shutdown command to felix remote shell would hang 
indefinitely.  We could go to the console window and still type in commands to 
the local shell, and a 'ps' showed that bundle 0 and the remote-shell bundle 
were in "stopping" states.

The problem was in remote.shell's Listener.java.  The deactivate method seemed 
to be expecting the m_ServerSocket.close() call on line 70 to cause an 
exception in the waiting thread at line 104, the  m_ServerSocket.accept() call.

For most of our machines, this seems to work as expected.  But the one that did 
waited forever for the thread join to happen, and could never shutdown.

To address this, we set the serverSocket's SOTimeout field, so that it it will 
timeout, go through the do/while loop, and reevaluate the m_stop variable.  The 
timeout is configurable via the bundle context property 
"osgi.shell.telnet.SocketTimeout" and defaults to 0, the current behavior.

Patch will be attached shortly.

-- 
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