enonic / xp

Enonic XP
https://enonic.com
GNU General Public License v3.0
202 stars 34 forks source link

ClusterManager deadlock #7800

Closed rymsha closed 4 years ago

rymsha commented 4 years ago

Way to reproduce:

  1. Start XP in standalone mode
  2. Without restart change cluster.enabled to true

SnapshotService not get registered and after 5 seconds of hanging skips SnapshotResource activation.

This happens because ClusterManagerImpl service tries to synchronously (but in a separate thread) register Elasticsearch client in activate method which in turn tries to activate SnapshotResource jaxrs service which in turn tries to activate SnapshotServiceImpl which depends on ClusterManager service causing deadlock. After 5 seconds Felix lock timesout and deadlock unwinds but without activated SnapshotResource.

rymsha commented 4 years ago

Basically it is same as #6411 but now affects fewer services.