-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
Sending an event as part of the EMF lock triggers a deadlock #25930
Comments
I suppose the affected listener bean (in the second stacktrace) has not been initialized yet, otherwise we wouldn't go into the full singleton lock there. If that's the case, it's expected and unavoidable in the current EMF bootstrap arrangement; the only solution is to enforce pre-initialization of all affected listener beans before the EMF bean (e.g. through |
Thanks for the hint Juergen. Adding a dependency to the event listener seems to do the trick thus far. I am now looking a bit deeper to see if such link won't trigger another regression. |
It did so I guess what we miss is a hook point where we could be notified that something is ready (but not injected as a dependency yet) and can be further tuned without having to declare depends on programmatically (a bit convoluted when we don't really know what's going to happen at runtime). |
This issue has run its course. On the Spring Boot side of things, we've started to refactor the code to avoid the event in the first place. |
Follow-up of #25799. With that fix in place, we still get a deadlock unfortunately.
With the following state for
task1
, the thread that was created to initialise the JPA infrastructure, and the DB:There is a sample that reproduces the problem in spring-projects/spring-boot#23735
The text was updated successfully, but these errors were encountered: