-
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
IllegalMonitorStateException in ThreadPoolExecutor with Redisson Integration #403
Comments
thanks for reporting, will take a look. |
I could reproduce using this sample project: now, it seems that there are some BlockingOperationError exception that are happening but they are not logged.
then I can see a tons of exceptions like this:
there is a while trying to debug, I observed for example that RedisClient can schedule some FastThreadLocalRunnable tasks like in the following stacktrace:
so, it looks like some blocking codes are scheduled in some netty FastThreadLocalThreads, which are assumed to be non blocking. honestly, I'm not sure to understand everything here, but I cannot see any issues in BlockHound itself for the moment. |
I think I can skip blocking inside by |
I tried it like the following, but it does not seem to resolve the problem:
However, I tried this which works, but it's probably not a good idea to allow blocking calls from netty FastThreadLocalThread, maybe the following could be done with adding a flag in order to only allow blocking calls during the startup time ? The following allows all blocking calls from netty FastThreadLocalThread threads:
you can also do this, which allow blocking calls from any FastThreadLocalRunnable.run methods (but is it what should be done, I'm not sure):
you can check |
I've hit the same issue and managed to work around it like so:
|
It seems to the Redisson does not support Reactive completely, so maybe allow Redisson call blocking inside. |
if you don't mind, I will close this issue, because for the moment I don't see any issues to fix in BlockHound itself. |
When using BlockHound with a Spring Boot application, an IllegalMonitorStateException is encountered in a ThreadPoolExecutor thread.
Expected Behavior
The application should run without encountering IllegalMonitorStateException or other synchronization-related exceptions when BlockHound is enabled.
Actual Behavior
The application throws IllegalMonitorStateException with the following stack trace:
Steps to Reproduce
docker run -d -it -v %cd%/redis_data:/data -p 6379:6379 redis:7.2.4-alpine redis-server --requirepass "P@ssword123"
Environment
BlockHound Version: 1.0.8.RELEASE
Redisson Version: 3.27.2
Spring Boot Version: 3.2.1
Java Version: JDK 21
Operating System: Windows
Additional Information
The text was updated successfully, but these errors were encountered: