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 TestRtxTimer #131

Closed
at-wat opened this issue Jul 6, 2020 · 1 comment
Closed

Data race in TestRtxTimer #131

at-wat opened this issue Jul 6, 2020 · 1 comment

Comments

@at-wat
Copy link
Member

at-wat commented Jul 6, 2020

https://travis-ci.org/github/pion/sctp/jobs/703902333

=== RUN   TestRtxTimer
=== RUN   TestRtxTimer/callback_interval
==================
WARNING: DATA RACE
Read at 0x00c000023d80 by goroutine 59:
  github.com/pion/sctp.TestRtxTimer.func1()
      /home/travis/gopath/src/github.com/pion/sctp/rtx_timer_test.go:129 +0x498
  testing.tRunner()
      /home/travis/.gimme/versions/go1.13.linux.amd64/src/testing/testing.go:909 +0x199

Previous write at 0x00c000023d80 by goroutine 44:
  github.com/pion/sctp.TestRtxTimer.func1.1()
      /home/travis/gopath/src/github.com/pion/sctp/rtx_timer_test.go:108 +0x89
  github.com/pion/sctp.(*testTimerObserver).onRetransmissionTimeout()
      /home/travis/gopath/src/github.com/pion/sctp/rtx_timer_test.go:95 +0x5a
  github.com/pion/sctp.(*rtxTimer).start.func1()
      /home/travis/gopath/src/github.com/pion/sctp/rtx_timer.go:155 +0x30d

Goroutine 59 (running) created at:
  testing.(*T).Run()
      /home/travis/.gimme/versions/go1.13.linux.amd64/src/testing/testing.go:960 +0x651
  github.com/pion/sctp.TestRtxTimer()
      /home/travis/gopath/src/github.com/pion/sctp/rtx_timer_test.go:103 +0x5d
  testing.tRunner()
      /home/travis/.gimme/versions/go1.13.linux.amd64/src/testing/testing.go:909 +0x199

Goroutine 44 (running) created at:
  github.com/pion/sctp.(*rtxTimer).start()
      /home/travis/gopath/src/github.com/pion/sctp/rtx_timer.go:144 +0x1da
  github.com/pion/sctp.TestRtxTimer.func1()
      /home/travis/gopath/src/github.com/pion/sctp/rtx_timer_test.go:121 +0x306
  testing.tRunner()
      /home/travis/.gimme/versions/go1.13.linux.amd64/src/testing/testing.go:909 +0x199
==================
=== RUN   TestRtxTimer/last_start_wins
==================
WARNING: DATA RACE
Read at 0x00c000023e50 by goroutine 33:
  github.com/pion/sctp.TestRtxTimer.func2()
      /home/travis/gopath/src/github.com/pion/sctp/rtx_timer_test.go:156 +0x4a5
  testing.tRunner()
      /home/travis/.gimme/versions/go1.13.linux.amd64/src/testing/testing.go:909 +0x199

Previous write at 0x00c000023e50 by goroutine 73:
  github.com/pion/sctp.TestRtxTimer.func2.1()
      /home/travis/gopath/src/github.com/pion/sctp/rtx_timer_test.go:138 +0x89
  github.com/pion/sctp.(*testTimerObserver).onRetransmissionTimeout()
      /home/travis/gopath/src/github.com/pion/sctp/rtx_timer_test.go:95 +0x5a
  github.com/pion/sctp.(*rtxTimer).start.func1()
      /home/travis/gopath/src/github.com/pion/sctp/rtx_timer.go:155 +0x30d

Goroutine 33 (running) created at:
  testing.(*T).Run()
      /home/travis/.gimme/versions/go1.13.linux.amd64/src/testing/testing.go:960 +0x651
  github.com/pion/sctp.TestRtxTimer()
      /home/travis/gopath/src/github.com/pion/sctp/rtx_timer_test.go:132 +0x8c
  testing.tRunner()
      /home/travis/.gimme/versions/go1.13.linux.amd64/src/testing/testing.go:909 +0x199

Goroutine 73 (running) created at:
  github.com/pion/sctp.(*rtxTimer).start()
      /home/travis/gopath/src/github.com/pion/sctp/rtx_timer.go:144 +0x1da
  github.com/pion/sctp.TestRtxTimer.func2()
      /home/travis/gopath/src/github.com/pion/sctp/rtx_timer_test.go:145 +0x27b
  testing.tRunner()
      /home/travis/.gimme/versions/go1.13.linux.amd64/src/testing/testing.go:909 +0x199
==================
=== RUN   TestRtxTimer/stop_right_afeter_start
=== RUN   TestRtxTimer/start,_stop_then_start
==================
WARNING: DATA RACE
Read at 0x00c000023f10 by goroutine 79:
  github.com/pion/sctp.TestRtxTimer.func4()
      /home/travis/gopath/src/github.com/pion/sctp/rtx_timer_test.go:206 +0x521
  testing.tRunner()
      /home/travis/.gimme/versions/go1.13.linux.amd64/src/testing/testing.go:909 +0x199

Previous write at 0x00c000023f10 by goroutine 78:
  github.com/pion/sctp.TestRtxTimer.func4.1()
      /home/travis/gopath/src/github.com/pion/sctp/rtx_timer_test.go:188 +0x89
  github.com/pion/sctp.(*testTimerObserver).onRetransmissionTimeout()
      /home/travis/gopath/src/github.com/pion/sctp/rtx_timer_test.go:95 +0x5a
  github.com/pion/sctp.(*rtxTimer).start.func1()
      /home/travis/gopath/src/github.com/pion/sctp/rtx_timer.go:155 +0x30d

Goroutine 79 (running) created at:
  testing.(*T).Run()
      /home/travis/.gimme/versions/go1.13.linux.amd64/src/testing/testing.go:960 +0x651
  github.com/pion/sctp.TestRtxTimer()
      /home/travis/gopath/src/github.com/pion/sctp/rtx_timer_test.go:183 +0xea
  testing.tRunner()
      /home/travis/.gimme/versions/go1.13.linux.amd64/src/testing/testing.go:909 +0x199

Goroutine 78 (running) created at:
  github.com/pion/sctp.(*rtxTimer).start()
      /home/travis/gopath/src/github.com/pion/sctp/rtx_timer.go:144 +0x1da
  github.com/pion/sctp.TestRtxTimer.func4()
      /home/travis/gopath/src/github.com/pion/sctp/rtx_timer_test.go:199 +0x38f
  testing.tRunner()
      /home/travis/.gimme/versions/go1.13.linux.amd64/src/testing/testing.go:909 +0x199
==================
=== RUN   TestRtxTimer/start_and_stop_in_a_tight_loop
=== RUN   TestRtxTimer/timer_should_stop_after_rtx_failure
=== RUN   TestRtxTimer/timer_should_not_stop_if_maxRetrans_is_0
=== RUN   TestRtxTimer/stop_timer_that_is_not_running_is_noop
=== RUN   TestRtxTimer/closed_timer_won't_start
--- FAIL: TestRtxTimer (2.25s)
    --- FAIL: TestRtxTimer/callback_interval (0.65s)
        testing.go:853: race detected during execution of test
    --- FAIL: TestRtxTimer/last_start_wins (0.05s)
        testing.go:853: race detected during execution of test
    --- PASS: TestRtxTimer/stop_right_afeter_start (0.05s)
    --- FAIL: TestRtxTimer/start,_stop_then_start (0.05s)
        testing.go:853: race detected during execution of test
    --- PASS: TestRtxTimer/start_and_stop_in_a_tight_loop (0.08s)
    --- PASS: TestRtxTimer/timer_should_stop_after_rtx_failure (0.63s)
        rtx_timer_test.go:242: onRTO: n=1 elapsed=0.010
        rtx_timer_test.go:242: onRTO: n=2 elapsed=0.031
        rtx_timer_test.go:242: onRTO: n=3 elapsed=0.071
        rtx_timer_test.go:242: onRTO: n=4 elapsed=0.151
        rtx_timer_test.go:242: onRTO: n=5 elapsed=0.311
        rtx_timer_test.go:248: onRtxFailure: elapsed=0.631
    --- PASS: TestRtxTimer/timer_should_not_stop_if_maxRetrans_is_0 (0.63s)
        rtx_timer_test.go:286: onRTO: n=1 elapsed=0.010
        rtx_timer_test.go:286: onRTO: n=2 elapsed=0.031
        rtx_timer_test.go:286: onRTO: n=3 elapsed=0.071
        rtx_timer_test.go:286: onRTO: n=4 elapsed=0.151
        rtx_timer_test.go:286: onRTO: n=5 elapsed=0.311
        rtx_timer_test.go:286: onRTO: n=6 elapsed=0.631
    --- PASS: TestRtxTimer/stop_timer_that_is_not_running_is_noop (0.02s)
    --- PASS: TestRtxTimer/closed_timer_won't_start (0.10s)
    testing.go:853: race detected during execution of test
@at-wat at-wat transferred this issue from pion/rtcp Jul 6, 2020
@at-wat
Copy link
Member Author

at-wat commented Jul 6, 2020

duplicated

@at-wat at-wat closed this as completed Jul 6, 2020
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

No branches or pull requests

1 participant