Skip to content

Reading poses in parallel multithreaded may cause errors #177

Description

Activity

  1. AmitMY commented on Jul 23, 2026

    @AmitMY
    CollaboratorAuthor

    Fixed in #239: the root cause was PoseHeaderCache being updated non-atomically — concurrent Pose.read calls on files with different headers could crash ("buffer is too small for requested array") or silently return a pose parsed with another file's header. All cache access now goes through a lock, and check_cache returns the header and end offset from the same critical section. The test this issue asked for exists as test_concurrent_read_of_different_files_is_safe (fails in under a second on the old code; an external repro went from 122 exceptions + 153 wrong headers to 0 across 4,800 concurrent reads).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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