https://issues.apache.org/ooo/show_bug.cgi?id=96152
Jason Powers <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #5 from Jason Powers <[email protected]> 2012-02-29 18:57:14 UTC --- I've run into this as well, and our load tester seems to be able to reproduce it fairly easily. Will update more details on that once I have them. For my code we're using the 'client' inside of a server process. This makes restarting the client a bit less desirable. It seems to happen when attempting to open a new connection or an instance of OpenOffice that has locked up or is otherwise in a bad state. It seems to just sit on a wait hoping to be notified by another thread. It just never happens. I've updated a copy of writeRequest to look like this: // @see IProtocol#writeRequest public boolean writeRequest( String oid, TypeDescription type, String function, ThreadId tid, Object[] arguments) throws IOException { if (oid.equals(PROPERTIES_OID)) { throw new IllegalArgumentException("illegal OID " + oid); } synchronized (monitor) { while (!initialized && state != STATE_TERMINATED) { try { monitor.wait(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new RuntimeException(e.toString()); } } if (state == STATE_TERMINATED) { throw new DisposedException(); } return writeRequest(false, oid, type, function, tid, arguments); } } Adding in the state != TERMINATED. This appears to have fixed the problem so far, but I think it still needs a timeout on the monitor.wait() call so it doesn't sit there indefinitely waiting. When I detect a stuck instance my code kills the OpenOffice Instance, and also calls close on the bridge object associated with this. That code flips the state to STATE_TERMINATED and notifies on monitor. I'm not sure if that will work for all users, so a timeout would probably be needed here as well. -- Configure bugmail: https://issues.apache.org/ooo/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
