-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Application does not start with BlockHound and ReactorDebugAgent installed on java 8 #70
Comments
HI @robotmrv, Thanks for reporting! Just trying to understand whether it fails only if both are installed. |
Hi @bsideup, |
@robotmrv does it happen with BlockHound 1.0.0.RELEASE? |
@bsideup yes, the same with BlockHound 1.0.0.RELEASE |
@robotmrv thanks for verifying! 👍 on it... |
Hi @bsideup
and got similar result. So it is not Windows specific
|
Interesting... /cc @raphw |
Probably a bieffect of shading with the way attach works on Java 8 where tools.jar must be loaded into a new class loader. Byte Buddy checks if it already loaded tools.jar previously and reuses that attachment if possible but with the shading, I assume another, unshaded copy of Byte Buddy attempts the same what is impossible in Java 8 as the native code in tools.jar can only loaded once. What other tools you use load tools.jar? (Set a break point in The solutions:
|
@raphw thank you for the explanation! I just tried adding JNA but it still fails, this time with:
|
In this case you need to tell Byte Buddy explicitly to use attachment emulation rather then the built-in attachment. It will always prefer the latter if available and this exception occurs a bit too late in the process to fall back to something else, unfortunately. |
It seems that there is no easy fix we can do in BlockHound or reactor-tools and we're affected by raphw/byte-buddy#670, the same way as seen in Kotlin/kotlinx.coroutines#1060 As a workaround, I would suggest using Java 9+ for running the tests |
Also Mockk: |
@bsideup is it possible to add |
@robotmrv yeah, I think we could do that. Alternatively, JNA can be added to classpath to make BB emulate the attachment. |
BlockHound and ReactorDebugAgent cannot work together on java 8.
Application fails with error
If I try to start application using java 11 or just disable BlockHound or ReactorDebugAgent (in the code and spring-boot integration) everything works fine.
Expected Behavior
application starts
Actual Behavior
application start fails
Steps to Reproduce
try to start application on java 8
https://github.com/robotmrv/reactor-debug-error
Possible Solution
Your Environment
io.projectreactor:reactor-core:3.3.0.RELEASE
io.projectreactor:reactor-tools:3.3.0.RELEASE
io.projectreactor.tools:blockhound:1.0.1.RELEASE
netty
, ...):javar -version
):java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
uname -a
):Win 10
The text was updated successfully, but these errors were encountered: