Skip to content

SharedTimer race condition #2084

@mmimica

Description

@mmimica

Driver version

12.2.0.jre11

Problem description

There is a race-condition in SharedTimer class.

The class holds a singleton instance of a ScheduledThreadPoolExecutor and keeps a reference count. It disposes the executor instance when reference count reaches 0. Because of ineffective use of double-lock check pattern in SharedTimer#getTimer the reference counter is prone to race-conditions.

The problem escalates with dawn of "Connection Resiliency" feature which is enabled by default. It can be mitigated by setting connectRetryCount connection property to 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions