Application does not start with BlockHound and ReactorDebugAgent installed on java 8
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.5k
- Forks
- 95
- Avg merge
- 1d 14m
- Merged PRs (30d)
- 6
Description
BlockHound and ReactorDebugAgent cannot work together on java 8.
Application fails with error
java.util.ServiceConfigurationError: com.sun.tools.attach.spi.AttachProvider: Provider sun.tools.attach.WindowsAttachProvider could not be instantiated
java.lang.ExceptionInInitializerError
Caused by: java.lang.IllegalStateException: Error during attachment using: reactor.tools.shaded.net.bytebuddy.agent.ByteBuddyAgent$AttachmentProvider$Compound@53aac487
at reactor.tools.shaded.net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:400)
at reactor.tools.shaded.net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:374)
at reactor.tools.shaded.net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:342)
at reactor.tools.shaded.net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:328)
at reactor.tools.agent.ReactorDebugAgent.init(ReactorDebugAgent.java:41)
at com.example.demo.ReactorDebugApplication.<clinit>(ReactorDebugApplication.java:27)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at reactor.tools.shaded.net.bytebuddy.agent.Attacher.install(Attacher.java:99)
at reactor.tools.shaded.net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:395)
... 5 more
Caused by: com.sun.tools.attach.AttachNotSupportedException: no providers installed
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:203)
... 11 more
Exception in thread "main"
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
- Reactor version(s) used:
io.projectreactor:reactor-core:3.3.0.RELEASE
io.projectreactor:reactor-tools:3.3.0.RELEASE
io.projectreactor.tools:blockhound:1.0.1.RELEASE - Other relevant libraries versions (eg.
netty, ...): - JVM version (
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) - OS and version (eg
uname -a):
Win 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure from the linked robotmrv/reactor-debug-error example on Windows with Java 8, BlockHound, and ReactorDebugAgent enabled, then compare it with Java 11 and with either agent disabled. Start at ReactorDebugAgent.init and the ByteBuddyAgent.install stack frames; done means the application starts successfully on Java 8 with both agents enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100