JDK-8038940 : c.s.j.r.i.ClientNotifForwarder$LinearExecutor prone to data races
  • Type: Bug
  • Component: core-svc
  • Sub-Component: javax.management
  • Affected Version: 6,7,8
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-04-01
  • Updated: 2014-07-29
  • Resolved: 2014-04-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u20 b09Fixed 9Fixed
Description
LinearExecutor uses an instance variable "command" to enqueue a command to be executed. It starts a new thread to read this variable and perform the command. A subsequent call to the "execute()" method without the processor thread being fully started will lead to an IAE.

ILW = HLM
I = H: It will crash the application with IAE
L = L: One needs to call the "execute()" methods in very rapid succession
W = M: One can provide his own implementation of the ClientNotifForwarder executor (via the "jmx.remote.x.fetch.notifications.executor" key in the provided env map) 

Comments
When ClientNotifForwarder starts, its first communication with ServerNotifForwarder is to get clientSequenceNumber, then starts LinearExecutor to execute the fetching job. If reconnection happens during this communication, a new thread will be started to do fetching job too, that's why the test got "java.lang.IllegalArgumentException: More than one command " It is difficult to have a new test to reproduce surely this bug, it is all related to an internal function.
01-04-2014

deferral justification: 1) this might be a JMX implementation issue in the class ClientNotifForwarder, the class ClientNotifForwarder is very complicated with a state machine, so it is very risky to do modification for 8 2) the bug happen when the reconnection happens, a reconnection happens usually when connection between a server and a client is bad, so it should not arrive very often. 3) even a reconnection happens, the bug does not happen always because it might be related to a synchronization issue within ClientNotifForwarder. 4) need more investigation to understand exactly the problem and to find a right solution.
01-04-2014