Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Race condition in Collector #5

@gbehrmann

Description

@gbehrmann

Collector has several background tasks that periodically scan cmap. The cmap itself is thread safe, however the ConnectionInfo objects stored in it are not. Thus the background task (timer task) will access ConnectionInfo concurrent with the request processing threads updating the ConnectionInfo objects (through the MonitorChannelHandler class).

Even though the background tasks only read the content of ConnectionInfo, the code is still racy: In the best case the data will simply be stale (see information about the Java memory model). In the worst case the background threads may get caught in infinite loops while attempting to traverse a hash map that is updated concurrently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions