openmicroscopy/openmicroscopy — pull request #2537 by joshmoore (2014-05-22 09:17:30+00:00)
Title: 8266 no processor (rebased onto dev_4_4)

This is the same as gh-2528 but rebased onto dev_4_4.

----

See: https://trac.openmicroscopy.org.uk/ome/ticket/8266#comment:39

This PR provides a workaround for the annoying "No processor available" bug that we've seen for some time. The "test_inputs.py" test helped to track down the issue since the usermode_processor that it created was failing to be reached periodically. (Roughly 1% of the time). The cause was that the proxy name created by Glacier2 was formed in such a way that when turned into a string and sent to the server it could not be turned back into a proxy. The server saw only a "ObjectNotExistException" even though the processor itself was still listening.

The workaround checks for proxy categories ending with "\" (but not "\\\\" since that's an escaped slash which happens more frequently). A proxy category "\\\" is *also* possible, but is not currently being handled. [A thread](http://www.zeroc.com/forums/bug-reports/6262-periodic-objectnotexistexception-glacier2-categories-post27018.html#post27018) has been opened on the ZeroC forums, perhaps there's a better solution.

To test, we need to make sure that the `test_inputs.py` test continues to pass regularly. Further, all clients (Java, C++, Python) should behave normally, though a warning string may be printed if this condition arises. E.g. running `test_inputs.py` many times produces:
```
test/integration/scriptstest/test_inputs.py:99: TestInputs.testInputs[76] PASSED
test/integration/scriptstest/test_inputs.py:99: TestInputs.testInputs[77] PASSED
test/integration/scriptstest/test_inputs.py:99: TestInputs.testInputs[78] PASSED
test/integration/scriptstest/test_inputs.py:99: TestInputs.testInputs[79] PASSED
test/integration/scriptstest/test_inputs.py:99: TestInputs.testInputs[80] PASSED
test/integration/scriptstest/test_inputs.py:99: TestInputs.testInputs[81] PASSED
test/integration/scriptstest/test_inputs.py:99: TestInputs.testInputs[82] WARNING:omero.client:bad category: "`v[1NQGf*,>erBG9\O\
WARNING:omero.client:None - createSession retry: 1
WARNING:omero.client:bad category: (V_rCT*8`9?"r:'_r;j\
WARNING:omero.client:None - createSession retry: 1
PASSED
test/integration/scriptstest/test_inputs.py:99: TestInputs.testInputs[83] PASSED
test/integration/scriptstest/test_inputs.py:99: TestInputs.testInputs[84] PASSED
test/integration/scriptstest/test_inputs.py:99: TestInputs.testInputs[85] PASSED
test/integration/scriptstest/test_inputs.py:99: TestInputs.testInputs[86] PASSED
test/integration/scriptstest/test_inputs.py:99: TestInputs.testInputs[87] PASSED
test/integration/scriptstest/test_inputs.py:99: TestInputs.testInputs[88] PASSED
test/integration/scriptstest/test_inputs.py:99: TestInputs.testInputs[89] PASSED
test/integration/scriptstest/test_inputs.py:99: TestInputs.testInputs[90] WARNING:omero.client:bad category: -OS|3?#}D=?|D"Ct'K.\
WARNING:omero.client:None - createSession retry: 1
```

*Note: this problem may have affected other callback services in OMERO, including chgrp, delete, and regular script execution.*