Skip to content

Threading issues causing apparent deadlock [SPR-11418] #16045

Closed
@spring-projects-issues

Description

@spring-projects-issues

chip stettler opened SPR-11418 and commented

I have two beans that implement @Async methods. I have an async method in bean #1 calling an async method in bean #2. I create A ThreadPoolExecutor with 5 core threads, 10 max threads and 25 queue length.

I created a test that creates 5 parallel calls to bean#1 async method. The threads appear to deadlock and a timeout occurs on the Future.get(). If I increase the core threads to 6 the test executes with no problem.

If I remove an @Async from either bean so that there is no nesting of async calls then everything works fine.

Seems like a bug as it sort of works if there are enough threads but the queuing aspect of the thread pool seems to break when nested.


Affects: 3.2.4

Attachments:

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)status: bulk-closedAn outdated, unresolved issue that's closed in bulk as part of a cleaning process

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions