Some services fail to properly clean up their resources
Description
Several services that reserve resources concurrently may fail to clean up these resources in failure cases.
Affected classes and methods
Following classes and methods were identified:
-
EventSinkImpl
- Potentially in
subscribe()
-
unsubscribe()
: if unsubscribe Job fails to run, subscriptions are never removed and memory gets leaked. Jobs may fail to run, for example, when a lot of Providers get disconnected and unsubscribe request time out, taking a long time to process this large number of unsubscriptions.
- Potentially in
-
SdcRemoteDevicesConnectorImpl
- Potentially in
connect()
-
disconnect()
: if lots of Providers are disconnected at the same time, posted jobs may fail to run and the correspondingSdcRemoteDevice
service is not stopped.
- Potentially in