Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
Data race was detected by the Go toolkit during a precommit run:
================== WARNING: DATA RACE Write at 0x00c0003870b0 by goroutine 67: github.com/apache/yunikorn-core/pkg/scheduler/objects.(*Application).setStateTimer() /home/runner/work/yunikorn-core/yunikorn-core/pkg/scheduler/objects/application.go:296 +0x385 github.com/apache/yunikorn-core/pkg/scheduler/objects.NewAppState.func3() /home/runner/work/yunikorn-core/yunikorn-core/pkg/scheduler/objects/application_state.go:151 +0x124 github.com/looplab/fsm.(*FSM).enterStateCallbacks() /home/runner/go/pkg/mod/github.com/looplab/fsm@v1.0.1/fsm.go:470 +0xca github.com/looplab/fsm.(*FSM).Event.func2.1() /home/runner/go/pkg/mod/github.com/looplab/fsm@v1.0.1/fsm.go:363 +0x1f6 github.com/looplab/fsm.transitionerStruct.transition() /home/runner/go/pkg/mod/github.com/looplab/fsm@v1.0.1/fsm.go:422 +0x92 github.com/looplab/fsm.(*transitionerStruct).transition() <autogenerated>:1 +0x29 github.com/looplab/fsm.(*FSM).doTransition() /home/runner/go/pkg/mod/github.com/looplab/fsm@v1.0.1/fsm.go:407 +0xad4 github.com/looplab/fsm.(*FSM).Event() /home/runner/go/pkg/mod/github.com/looplab/fsm@v1.0.1/fsm.go:390 +0xaad github.com/apache/yunikorn-core/pkg/scheduler/objects.(*Application).HandleApplicationEvent() /home/runner/work/yunikorn-core/yunikorn-core/pkg/scheduler/objects/application.go:240 +0x13c github.com/apache/yunikorn-core/pkg/scheduler/objects.TestStateTimeOut() /home/runner/work/yunikorn-core/yunikorn-core/pkg/scheduler/objects/application_test.go:1013 +0x74b testing.tRunner() /opt/hostedtoolcache/go/1.18.10/x64/src/testing/testing.go:1439 +0x213 testing.(*T).Run.func1() /opt/hostedtoolcache/go/1.18.10/x64/src/testing/testing.go:1486 +0x47 Previous read at 0x00c0003870b0 by goroutine 71: github.com/apache/yunikorn-core/pkg/scheduler/objects.(*Application).clearStateTimer() /home/runner/work/yunikorn-core/yunikorn-core/pkg/scheduler/objects/application.go:335 +0x69 github.com/apache/yunikorn-core/pkg/scheduler/objects.NewAppState.func2() /home/runner/work/yunikorn-core/yunikorn-core/pkg/scheduler/objects/application_state.go:146 +0x84 github.com/looplab/fsm.(*FSM).leaveStateCallbacks() /home/runner/go/pkg/mod/github.com/looplab/fsm@v1.0.1/fsm.go:456 +0x1b7 github.com/looplab/fsm.(*FSM).Event() /home/runner/go/pkg/mod/github.com/looplab/fsm@v1.0.1/fsm.go:370 +0x6be github.com/apache/yunikorn-core/pkg/scheduler/objects.(*Application).HandleApplicationEvent() /home/runner/work/yunikorn-core/yunikorn-core/pkg/scheduler/objects/application.go:240 +0x13c github.com/apache/yunikorn-core/pkg/scheduler/objects.(*Application).timeoutStateTimer.func1() /home/runner/work/yunikorn-core/yunikorn-core/pkg/scheduler/objects/application.go:325 +0x51e Goroutine 67 (running) created at: testing.(*T).Run() /opt/hostedtoolcache/go/1.18.10/x64/src/testing/testing.go:1486 +0x724 testing.runTests.func1() /opt/hostedtoolcache/go/1.18.10/x64/src/testing/testing.go:1839 +0x99 testing.tRunner() /opt/hostedtoolcache/go/1.18.10/x64/src/testing/testing.go:1439 +0x213 testing.runTests() /opt/hostedtoolcache/go/1.18.10/x64/src/testing/testing.go:1837 +0x7e4 testing.(*M).Run() /opt/hostedtoolcache/go/1.18.10/x64/src/testing/testing.go:1719 +0xa71 main.main() _testmain.go:439 +0x3a9 Goroutine 71 (finished) created at: time.goFunc() /opt/hostedtoolcache/go/1.18.10/x64/src/time/sleep.go:176 +0x47
Attachments
Issue Links
- links to