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

Deadlock happens in scenario where a read through also making a call to a cluster-singleton service #11249

Open
hongchen2000 opened this issue Feb 18, 2024 · 0 comments
Assignees

Comments

@hongchen2000
Copy link

hongchen2000 commented Feb 18, 2024

Multiple clients using thin client connections to request the same data simultaneously.
The cache has read-through enabled and the data is to be loaded by a custom class that extends CacheStoreAdapter<>.

The following conditions results in a dead lock:

  1. Number of clients simultaneously request the same data is more than the number of system threads. This results in all system threads are blocked and waiting for the first thread to finish loading the data
  2. In the load() method, there is a call to a cluster-singleton service.

The load() method will wait for the service call to come back (blocked at the GridFutureAdapter.get0(), which is called by the GridServiceProxy.invokeMethod()).

However, it seems that the callback will require the availability of a system thread. However, since all system threads are wait for the callback, a dead lock happens.

Could you confirm why the service call back need a System thread be available? and what is the recommended way to get around this?

From this document, https://ignite.apache.org/docs/latest/perf-and-troubleshooting/thread-pools-tuning , It seems service call should use the Service Pool. But when I check the JMX when this deadlock happened, the service pool has available thread in both caller and callee node.

@hongchen2000 hongchen2000 changed the title All system threads stucks All system threads stuck Feb 18, 2024
@hongchen2000 hongchen2000 changed the title All system threads stuck Dead lock happens in scenario where a read through also making a call to a cluster-singleton service Feb 25, 2024
@hongchen2000 hongchen2000 changed the title Dead lock happens in scenario where a read through also making a call to a cluster-singleton service Deadlock happens in scenario where a read through also making a call to a cluster-singleton service Feb 25, 2024
@sk0x50 sk0x50 self-assigned this Apr 19, 2024
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

2 participants