Skip to content
This repository was archived by the owner on Apr 23, 2024. It is now read-only.
This repository was archived by the owner on Apr 23, 2024. It is now read-only.

sdk/agent: data race in test #422

@leighmcculloch

Description

@leighmcculloch

There's a data race in this concurrency test. This was seen in an CI run.

==================
WARNING: DATA RACE
Write at 0x00c0002693c3 by goroutine 13:
  testing.tRunner.func1()
      /opt/hostedtoolcache/go/1.17.2/x64/src/testing/testing.go:1246 +0x584
  testing.tRunner()
      /opt/hostedtoolcache/go/1.17.2/x64/src/testing/testing.go:1265 +0x268
  testing.(*T).Run·dwrap·21()
      /opt/hostedtoolcache/go/1.17.2/x64/src/testing/testing.go:1306 +0x47

Previous read at 0x00c0002693c3 by goroutine 15:
  testing.(*common).logDepth()
      /opt/hostedtoolcache/go/1.17.2/x64/src/testing/testing.go:768 +0xc4
  testing.(*common).log()
      /opt/hostedtoolcache/go/1.17.2/x64/src/testing/testing.go:761 +0x6e
  testing.(*common).Logf()
      /opt/hostedtoolcache/go/1.17.2/x64/src/testing/testing.go:807 +0x14
  github.com/stellar/starlight/sdk/agent.TestAgent_concurrency.func9()
      /home/runner/work/starlight/starlight/sdk/agent/agent_test.go:577 +0xc5

Goroutine 13 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.17.2/x64/src/testing/testing.go:1306 +0x726
  testing.runTests.func1()
      /opt/hostedtoolcache/go/1.17.2/x64/src/testing/testing.go:1598 +0x99
  testing.tRunner()
      /opt/hostedtoolcache/go/1.17.2/x64/src/testing/testing.go:1259 +0x22f
  testing.runTests()
      /opt/hostedtoolcache/go/1.17.2/x64/src/testing/testing.go:1596 +0x7ca
  testing.(*M).Run()
      /opt/hostedtoolcache/go/1.17.2/x64/src/testing/testing.go:1504 +0x9d1
  main.main()
      _testmain.go:45 +0x22b

Goroutine 15 (running) created at:
  github.com/stellar/starlight/sdk/agent.TestAgent_concurrency()
      /home/runner/work/starlight/starlight/sdk/agent/agent_test.go:574 +0x13e4
  testing.tRunner()
      /opt/hostedtoolcache/go/1.17.2/x64/src/testing/testing.go:1259 +0x22f
  testing.(*T).Run·dwrap·21()
      /opt/hostedtoolcache/go/1.17.2/x64/src/testing/testing.go:1306 +0x47
==================
=== CONT  
    testing.go:1152: race detected during execution of test
FAIL
FAIL	github.com/stellar/starlight/sdk/agent	0.374s

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