jakartaee / jakartaee/jaxb-api

Blocking call while performing ContextFinder.find when using OpenJDK 11+

Open
#271 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
79
Forks
48
Avg merge
7h 12m
Merged PRs (30d)
2

Description

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](https://issues.redhat.com/secure/attachment/12967550/12967550_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](https://www.oracle.com/java/technologies/javase/11-relnote-issues.html#JDK-8190378), its trying to utilise javax.xml.bind's contextFinder and blocking call detected in [this line](https://github.com/jakartaee/jaxb-api/blob/fd06b2b050cf612695ec7f0c372815e3910de154/jaxb-api/src/main/java/javax/xml/bind/ContextFinder.java#L306)
Issue identified in 2.3.3 and 3.0.1 version as well

Contributor guide

Open the contributing guide

Research direction

Start with ContextFinder.find at jaxb-api/src/main/java/javax/xml/bind/ContextFinder.java line 306 and the attached BlockHound stack trace; compare behavior on OpenJDK 11 and 17 and JAXB versions 2.3.3 and 3.0.1. Done means establishing the affected path and resolving or documenting the blocking call while preserving AbstractJAXBProvider request-body behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.