-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Deadlock on JPA EntityListener instantiation #22997
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Thank you for the report. As I was indicated in the related issue, can you please turn that code in text into an actual project we can run? |
Could this be related to spring-projects/spring-framework#25111? |
This comment has been minimized.
This comment has been minimized.
Have this problem on |
@dc-up42 this issue is closed. If you believe you found a bug in Spring Boot, please create a separate issue. Before doing so, we'll need a small sample that reproduces the problem. You can do that by attaching a zip to the issue or sharing a link to a GitHub repository. Thank you. |
I've tried to build a minimal reproduction of the deadlock issue I mentioned in #16230, this is what I've come up with so far.
Using spring-boot-parent 2.3.3, spring-boot-starter-jpa and h2 this reliably deadlocks on startup on my machine:
Suspending the thread with a break point (ie in
AbstractEntityManagerFactoryBean.buildNativeEntityManager()
) until the main thread is waiting on the Future should always produce it.In my actual Service I have an EntityListener with an injected dependency as well. Wrapping the dependency in an ObjectFactory seems to remove the Deadlock there as well.
Thread Dump:
The text was updated successfully, but these errors were encountered: