jaxb-api
jaxb-api copied to clipboard
Blocking call while performing ContextFinder.find when using OpenJDK 11+
We have identified a blocking call with the help of Blockhound while trying to perform HTTP operations with reactor-netty.
We have tested this scenario enabling Blockhound and identified the blocking call with OpenJDK 11 and 17.
Attached the stack trace of the blocking call exception here : Stacktrace_blockhound.rtf
On analysing the blocking call trace and the OpenJDK changes, the blocking call is happening while,
AbstractJAXBProvider trying to write the request body which internally calls cached context to check the context exists in cache. For 1st time, its trying to create new context for cache using find method of contextFinder.java from jdk 8 jaxb module. But jaxb module has been removed from jdk 9 as mentioned here, its trying to utilise javax.xml.bind's contextFinder and blocking call detected in this line Issue identified in 2.3.3 and 3.0.1 version as well
Fixed since https://github.com/jakartaee/jaxb-api/commit/2fc2446980711533cf11c31ca535f3f677c389b6