- the bundle not registering the service registered some other services.
- application context of that bundle is not registered as an OSGi service (it can be turned off but in our environment, it's on)
- it hangs in applicationContext.getBean where we are trying to get a prototype bean when a new configuration is available.
so what happened is when indexConfigMgr is being created, it acquired a lock to create bean and call Config Admin to get configuration which also requires acquiring a lock. Meanwhile, in another thead, the Config Admin is also trying to call the update method on indexConfigMgr which it will first acquired the lock to get configuration and inside the update method, we tried to create a new bean which tries to acquire the create bean lock. thus, a classic dead lock.
The solution is pretty straightforward, just start a new thread in the updateConfig so the bean creation will be executed in another thread.