Skip to content

flaky test: TestInstrumentedIndexBehavior/ConcurrentOperations fails intermittently #358

@yankay

Description

@yankay

The test TestInstrumentedIndexBehavior/ConcurrentOperations is flaky and often fails on CI. Example failure log:

=== RUN   TestInstrumentedIndexBehavior/ConcurrentOperations
    index_test.go:248: 
        Error Trace:	/home/runner/work/llm-d-kv-cache/llm-d-kv-cache/pkg/kvcache/kvblock/index_test.go:248
        		/opt/hostedtoolcache/go/1.24.1/x64/src/runtime/asm_amd64.s:1700
        Error:      	[]kvblock.PodEntry{kvblock.PodEntry{PodIdentifier:"pod-50-9", DeviceTier:"gpu"}, kvblock.PodEntry{PodIdentifier:"pod-20-6", DeviceTier:"gpu"}, kvblock.PodEntry{PodIdentifier:"pod-70-6", DeviceTier:"gpu"}, kvblock.PodEntry{PodIdentifier:"pod-30-9", DeviceTier:"gpu"}, kvblock.PodEntry{PodIdentifier:"pod-80-6", DeviceTier:"gpu"}, kvblock.PodEntry{PodIdentifier:"pod-40-9", DeviceTier:"gpu"}, kvblock.PodEntry{PodIdentifier:"pod-90-9", DeviceTier:"gpu"}} does not contain kvblock.PodEntry{PodIdentifier:"pod-0-0", DeviceTier:"gpu"}
        Test:       	TestInstrumentedIndexBehavior/ConcurrentOperations
--- FAIL: TestInstrumentedIndexBehavior (0.04s)
    --- PASS: TestInstrumentedIndexBehavior/BasicAddAndLookup (0.00s)
    --- PASS: TestInstrumentedIndexBehavior/DuplicatePodHandling (0.00s)
    --- PASS: TestInstrumentedIndexBehavior/FilteredLookup (0.00s)
    --- PASS: TestInstrumentedIndexBehavior/EvictBasic (0.00s)
    --- FAIL: TestInstrumentedIndexBehavior/ConcurrentOperations (0.03s)

Reference CI failure: https://github.com/llm-d/llm-d-kv-cache/actions/runs/21009734880/job/60401398582?pr=255

Please investigate the cause of flakiness and fix the concurrency issues in this test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions