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

Multiple race conditions #8

Closed
tomkukral opened this issue Jan 2, 2023 · 0 comments · Fixed by #9
Closed

Multiple race conditions #8

tomkukral opened this issue Jan 2, 2023 · 0 comments · Fixed by #9

Comments

@tomkukral
Copy link
Contributor

There are multiple race conditions

WARNING: DATA RACE
Write at 0x00c00011e3e0 by goroutine 7:
  github.com/zenthangplus/goccm.(*concurrencyManager).Close()
      /home/tom/src/tomkukral/goccm/goccm.go:109 +0x18d
  github.com/zenthangplus/goccm.(*concurrencyManager).WaitAllDone()
      /home/tom/src/tomkukral/goccm/goccm.go:115 +0x181
  github.com/zenthangplus/goccm.TestExample()
      /home/tom/src/tomkukral/goccm/goccm_test.go:19 +0x180
  testing.tRunner()
      /opt/golang/1.19.3/src/testing/testing.go:1446 +0x216
  testing.(*T).Run.func1()
      /opt/golang/1.19.3/src/testing/testing.go:1493 +0x47

Previous read at 0x00c00011e3e0 by goroutine 8:
  github.com/zenthangplus/goccm.(*concurrencyManager).controller()
      /home/tom/src/tomkukral/goccm/goccm.go:78 +0x88
  github.com/zenthangplus/goccm.New.func1()
      /home/tom/src/tomkukral/goccm/goccm.go:61 +0x39

Goroutine 7 (running) created at:
  testing.(*T).Run()
      /opt/golang/1.19.3/src/testing/testing.go:1493 +0x75d
  testing.runTests.func1()
      /opt/golang/1.19.3/src/testing/testing.go:1846 +0x99
  testing.tRunner()
      /opt/golang/1.19.3/src/testing/testing.go:1446 +0x216
  testing.runTests()
      /opt/golang/1.19.3/src/testing/testing.go:1844 +0x7ec
  testing.(*M).Run()
      /opt/golang/1.19.3/src/testing/testing.go:1726 +0xa84
  main.main()
      _testmain.go:51 +0x2e9

Goroutine 8 (running) created at:
  github.com/zenthangplus/goccm.New()
      /home/tom/src/tomkukral/goccm/goccm.go:61 +0x1d6
  github.com/zenthangplus/goccm.TestExample()
      /home/tom/src/tomkukral/goccm/goccm_test.go:10 +0x2e
  testing.tRunner()
      /opt/golang/1.19.3/src/testing/testing.go:1446 +0x216
  testing.(*T).Run.func1()
      /opt/golang/1.19.3/src/testing/testing.go:1493 +0x47
tomkukral added a commit to tomkukral/goccm that referenced this issue Jan 2, 2023
fix test races

closes zenthangplus#8
@tomkukral tomkukral mentioned this issue Jan 2, 2023
tomkukral added a commit to tomkukral/goccm that referenced this issue Jan 10, 2023
fix test races

closes zenthangplus#8
tomkukral added a commit to tomkukral/goccm that referenced this issue Jan 17, 2023
fix test races

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

Successfully merging a pull request may close this issue.

1 participant