Skip to content

tsan: LF Mode Publisher's MoQForwarder can be read and destroyed on the Relay thread #570

Description

@afrind

The current structure of LF mode leaves the publisher's forwarder with shared ownership with the publisher's session (bound to an io thread) but has a strong shared_ptr in the Relay's registry.

Having the shared_ptr in the relay thread is also a tsan hazard -- the publisher is writing to it (eg largest object, subscribers_.size()) and the relay shouldn't be allowed to read it.

My fix is to make a helper class that abstracts the reference to the forwarder that makes it impossible to touch it in the wrong thread in LF mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions