Skip to content
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

Blockhound doesn't detect the blocking call in my environment (Java 13 on windows) #1

Closed
theonlyguills opened this issue Jan 14, 2020 · 4 comments

Comments

@theonlyguills
Copy link

Running the blockingInNonBlockingThreadsShouldNotBeAllowed test on my system does not detect the blocking call. I also confirmed this by changing the code to

    @Test
    void blockingInNonBlockingThreadsShouldNotBeAllowed() {
        StepVerifier
        .create(underTest.blockingIsNotAllowed())
        .expectNext(1)
        .expectComplete()
        .verify();
    }

and this test passes. I confirmed that BlockHound.install() is getting called by the listener.

What else can I check ?

@bsideup
Copy link

bsideup commented Jan 14, 2020

Java 13? See reactor/BlockHound#33

@theonlyguills
Copy link
Author

theonlyguills commented Jan 14, 2020

That was fast. I get the same behavior described in that bug on windows and oracle jdk 13.0.1.

Without the flag nothing happens. I added the flag and it seems to work as described.

Something to note though, it gives this warning:
Java HotSpot(TM) 64-Bit Server VM warning: Option AllowRedefinitionToAddDeleteMethods was deprecated in version 13.0 and will likely be removed in a future release.

We might need to find another workaround soon.

@bsideup
Copy link

bsideup commented Jan 14, 2020

Ha! I didn't notice that you just submitted the issue 😅

Yes, we're aware of the deprecation and are thinking about possible solutions to workaround it. Unfortunately there was a behaviour change in OpenJDK and it broke the way BlockHound works, so we will need to find another one.
Consider subscribing to the issue to stay updated about the progress.

@dsibilio
Copy link
Owner

Thank you @theonlyguills for the precious feedback and @bsideup for providing the workaround in record time 😄

I'm closing this issue as this demo project was written for Java 8 and should be run with the same version, further progress towards potential different solutions for this issue can be found at reactor/BlockHound#33, as mentioned by @bsideup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants