Skip to content

[Bug]: TestManyRangeLockInManyGoroutines data race in lockservice #25735

Closed

Description

@matrix-meow

Problem

TestManyRangeLockInManyGoroutines/local in pkg/lockservice fails with a data race:

testing.go:1712: race detected during execution of test

The test exercises range lock operations across multiple goroutines. The Go race detector found concurrent unsynchronized access in the lockservice code path.

Recent Occurrences

Date PR/Run Job
2026-07-15 PR #25728 UT Test on Ubuntu/x86

Root Cause

Data race in lockservice range lock operations under concurrent goroutine access. The race is intermittent and depends on goroutine scheduling.

Suggested Fix

  1. Run the test locally with -race flag to get the full race report and identify the exact shared variable
  2. Add proper synchronization (mutex/atomic) to the racing code path
  3. Or fix the test if the race is in test setup rather than production code

Activity

  1. self-assigned this
    on Jul 15, 2026
  2. added a commit that references this issue on Jul 17, 2026
  3. daviszhen commented on Jul 17, 2026

    @daviszhen
    Contributor

    fixed

  4. ghost closed this as completedon Jul 22, 2026
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