Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data race in TestIntervalChunks_Blocking #2507

Closed
acud opened this issue Sep 15, 2021 · 2 comments · Fixed by #2503
Closed

data race in TestIntervalChunks_Blocking #2507

acud opened this issue Sep 15, 2021 · 2 comments · Fixed by #2503

Comments

@acud
Copy link
Member

acud commented Sep 15, 2021

⚠️ Requests for support in an issue-format will be closed immediately. For support questions, we welcome you to our Discord.

Task

this is showing up consistently with go 1.17 and is reproducible locally, data race is being detected in TestIntervalChunks_Blocking.

=== RUN   TestIntervalChunks_Blocking
==================
WARNING: DATA RACE
Write at 0x00c00009a570 by goroutine 43:
  github.com/ethersphere/bee/pkg/pullsync/pullstorage.(*PullStorer).IntervalChunks()
      /Users/runner/work/bee/bee/pkg/pullsync/pullstorage/pullstorage.go:139 +0x610
  github.com/ethersphere/bee/pkg/pullsync/pullstorage_test.TestIntervalChunks_Blocking()
      /Users/runner/work/bee/bee/pkg/pullsync/pullstorage/pullstorage_test.go:145 +0x201
  testing.tRunner()
      /Users/runner/hostedtoolcache/go/1.17.0/x64/src/testing/testing.go:1259 +0x22f
  testing.(*T).Run·dwrap·21()
      /Users/runner/hostedtoolcache/go/1.17.0/x64/src/testing/testing.go:1306 +0x47

Previous write at 0x00c00009a570 by goroutine 45:
  github.com/ethersphere/bee/pkg/pullsync/pullstorage.(*PullStorer).IntervalChunks.func1()
      /Users/runner/work/bee/bee/pkg/pullsync/pullstorage/pullstorage.go:97 +0x4c4
  resenje.org/singleflight.(*Group).Do.func1()
      /Users/runner/go/pkg/mod/resenje.org/singleflight@v0.2.0/singleflight.go:59 +0x59

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

Goroutine 45 (running) created at:
  resenje.org/singleflight.(*Group).Do()
      /Users/runner/go/pkg/mod/resenje.org/singleflight@v0.2.0/singleflight.go:58 +0x413
  github.com/ethersphere/bee/pkg/pullsync/pullstorage.(*PullStorer).IntervalChunks()
      /Users/runner/work/bee/bee/pkg/pullsync/pullstorage/pullstorage.go:70 +0x47c
  github.com/ethersphere/bee/pkg/pullsync/pullstorage_test.TestIntervalChunks_Blocking()
      /Users/runner/work/bee/bee/pkg/pullsync/pullstorage/pullstorage_test.go:145 +0x201
  testing.tRunner()
      /Users/runner/hostedtoolcache/go/1.17.0/x64/src/testing/testing.go:1259 +0x22f
  testing.(*T).Run·dwrap·21()
      /Users/runner/hostedtoolcache/go/1.17.0/x64/src/testing/testing.go:1306 +0x47
==================
==================
WARNING: DATA RACE
Write at 0x00c0003c0218 by goroutine 43:
  github.com/ethersphere/bee/pkg/pullsync/pullstorage.(*PullStorer).IntervalChunks()
      /Users/runner/work/bee/bee/pkg/pullsync/pullstorage/pullstorage.go:139 +0x644
  github.com/ethersphere/bee/pkg/pullsync/pullstorage_test.TestIntervalChunks_Blocking()
      /Users/runner/work/bee/bee/pkg/pullsync/pullstorage/pullstorage_test.go:145 +0x201
  testing.tRunner()
      /Users/runner/hostedtoolcache/go/1.17.0/x64/src/testing/testing.go:1259 +0x22f
  testing.(*T).Run·dwrap·21()
      /Users/runner/hostedtoolcache/go/1.17.0/x64/src/testing/testing.go:1306 +0x47

Previous write at 0x00c0003c0218 by goroutine 45:
  github.com/ethersphere/bee/pkg/pullsync/pullstorage.(*PullStorer).IntervalChunks.func1()
      /Users/runner/work/bee/bee/pkg/pullsync/pullstorage/pullstorage.go:99 +0x529
  resenje.org/singleflight.(*Group).Do.func1()
      /Users/runner/go/pkg/mod/resenje.org/singleflight@v0.2.0/singleflight.go:59 +0x59

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

Goroutine 45 (running) created at:
  resenje.org/singleflight.(*Group).Do()
      /Users/runner/go/pkg/mod/resenje.org/singleflight@v0.2.0/singleflight.go:58 +0x413
  github.com/ethersphere/bee/pkg/pullsync/pullstorage.(*PullStorer).IntervalChunks()
      /Users/runner/work/bee/bee/pkg/pullsync/pullstorage/pullstorage.go:70 +0x47c
  github.com/ethersphere/bee/pkg/pullsync/pullstorage_test.TestIntervalChunks_Blocking()
      /Users/runner/work/bee/bee/pkg/pullsync/pullstorage/pullstorage_test.go:145 +0x201
  testing.tRunner()
      /Users/runner/hostedtoolcache/go/1.17.0/x64/src/testing/testing.go:1259 +0x22f
  testing.(*T).Run·dwrap·21()
      /Users/runner/hostedtoolcache/go/1.17.0/x64/src/testing/testing.go:1306 +0x47
==================
    testing.go:1152: race detected during execution of test
--- FAIL: TestIntervalChunks_Blocking (0.13s)
=== CONT  
    testing.go:1152: race detected during execution of test
FAIL
FAIL	github.com/ethersphere/bee/pkg/pullsync/pullstorage	0.642s

Acceptance criterea

@bee-runner bee-runner bot added the issue label Sep 15, 2021
@acud
Copy link
Member Author

acud commented Sep 15, 2021

@janos the line numbers in the stack traces don't make much sense. do you have any idea what might be happening here?

@janos
Copy link
Member

janos commented Sep 16, 2021

@acud the fix for this issue has been committed to #2503.

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

Successfully merging a pull request may close this issue.

2 participants