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 holster/clock #147

Open
vtopc opened this issue Dec 19, 2022 · 1 comment
Open

DATA RACE in holster/clock #147

vtopc opened this issue Dec 19, 2022 · 1 comment
Labels

Comments

@vtopc
Copy link
Contributor

vtopc commented Dec 19, 2022

Version: v4.9.5

WARNING: DATA RACE
Write at 0x00c00006c0f8 by goroutine 16:
  github.com/mailgun/holster/v4/clock.(*frozenTime).unlockedStartTimer()
      github.com/mailgun/holster/v4/clock/frozen.go:151 +0x211
  github.com/mailgun/holster/v4/clock.(*frozenTime).startTimer()
      github.com/mailgun/holster/v4/clock/frozen.go:133 +0xa4
  github.com/mailgun/holster/v4/clock.(*frozenTime).AfterFunc()
      github.com/mailgun/holster/v4/clock/frozen.go:50 +0x1db
  github.com/mailgun/holster/v4/clock.(*frozenTime).NewTimer()
      github.com/mailgun/holster/v4/clock/frozen.go:[38](https://github.com/mailgun/holster/actions/runs/3740540806/jobs/6349033540#step:7:39) +0x38
  github.com/mailgun/holster/v4/clock.(*frozenTime).Sleep()
      github.com/mailgun/holster/v4/clock/frozen.go:30 +0x[39](https://github.com/mailgun/holster/actions/runs/3740540806/jobs/6349033540#step:7:40)
  github.com/mailgun/holster/v4/clock.Sleep()
      github.com/mailgun/holster/v4/clock/clock.go:76 +0x37
  github.com/mailgun/holster/v4/clock.(*FrozenSuite).TestSleep.func1()
      github.com/mailgun/holster/v4/clock/frozen_test.go:57 +0x3c
  github.com/mailgun/holster/v4/clock.(*FrozenSuite).TestSleep.func5()
      github.com/mailgun/holster/v4/clock/frozen_test.go:84 +0x47

Previous read at 0x00c00006c0f8 by goroutine 15:
  github.com/mailgun/holster/v4/clock.(*FrozenSuite).TestSleep()
      github.com/mailgun/holster/v4/clock/frozen_test.go:89 +0x63c
  runtime.call16()
      runtime/asm_amd64.s:724 +0x48
  reflect.Value.Call()
      reflect/value.go:368 +0xc7
  github.com/stretchr/testify/suite.Run.func1()
      github.com/stretchr/[email protected]/suite/suite.go:175 +0x6e6
  testing.tRunner()
      testing/testing.go:1[44](https://github.com/mailgun/holster/actions/runs/3740540806/jobs/6349033540#step:7:45)6 +0x216
  testing.(*T).Run.func1()
      testing/testing.go:1493 +0x47

Goroutine 16 (running) created at:
  github.com/mailgun/holster/v4/clock.(*FrozenSuite).TestSleep()
      github.com/mailgun/holster/v4/clock/frozen_test.go:84 +0x55d
  runtime.call16()
      runtime/asm_amd64.s:724 +0x48
  reflect.Value.Call()
      reflect/value.go:368 +0xc7
  github.com/stretchr/testify/suite.Run.func1()
      github.com/stretchr/[email protected]/suite/suite.go:175 +0x6e6
  testing.tRunner()
      testing/testing.go:14[46](https://github.com/mailgun/holster/actions/runs/3740540806/jobs/6349033540#step:7:47) +0x216
  testing.(*T).Run.func1()
      testing/testing.go:1493 +0x[47](https://github.com/mailgun/holster/actions/runs/3740540806/jobs/6349033540#step:7:48)

Goroutine 15 (running) created at:
  testing.(*T).Run()
      testing/testing.go:1[49](https://github.com/mailgun/holster/actions/runs/3740540806/jobs/6349033540#step:7:50)3 +0x75d
  github.com/stretchr/testify/suite.runTests()
      github.com/stretchr/[email protected]/suite/suite.go:220 +0x198
  github.com/stretchr/testify/suite.Run()
      github.com/stretchr/[email protected]/suite/suite.go:193 +0x9ae
  github.com/mailgun/holster/v4/clock.TestFrozenSuite()
      github.com/mailgun/holster/v4/clock/frozen_test.go:21 +0x44
  testing.tRunner()
      testing/testing.go:1446 +0x216
  testing.(*T).Run.func1()
      testing/testing.go:1493 +0x47
==================

https://github.com/mailgun/holster/actions/runs/3740540806/jobs/6349033540


one more proof

@vtopc
Copy link
Contributor Author

vtopc commented Dec 20, 2022

The -tags holster_test_mode didn't help.

@vtopc vtopc closed this as completed Dec 20, 2022
@vtopc vtopc reopened this Dec 20, 2022
@vtopc vtopc changed the title holster/clock has DATA RACE DATA RACE in holster/clock Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant