-
Quality Risk
-
Resolution: Done
-
Major
-
4.7.6.Final, 6.2.1.Final
-
None
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 : blocking_call_log.txt
On analysing the blocking call trace and the OpenJDK changes, the blocking call is happening while,
- The ResteasyJackson2Provider trying to write the request body which internally tries whitelist the classes for deserialisation via WhiteListPolymorphicTypeValidatorBuilder class.
- This class tried to load the baseType and subType properties from Configuration object(ConfigurationFactory.getInstance()) loaded via ServiceLoader.
- The ServiceLoader prior to OpenJDK 9, uses ServiceLoader.LazyIterator to iterate and load the providers
- After OpenJDK 9, the above step is done via ServiceLoader.LazyClassPathLookupIterator which is the main flow for causing the blocking call
Reproduced the blocking call with a test case (MonoTest.testMonoMap()) in rest-easy under this repo : https://github.com/anthochristen/resteasy/tree/blocking-write-issue