You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by "Peter Bacsko (Jira)" <ji...@apache.org> on 2022/12/01 18:52:00 UTC
[jira] [Created] (YUNIKORN-1442) Data race in TestRejectApplications
Peter Bacsko created YUNIKORN-1442:
--------------------------------------
Summary: Data race in TestRejectApplications
Key: YUNIKORN-1442
URL: https://issues.apache.org/jira/browse/YUNIKORN-1442
Project: Apache YuniKorn
Issue Type: Bug
Components: test - unit
Reporter: Peter Bacsko
Assignee: Peter Bacsko
Found the following data race when running unit tests locally for shim:
{noformat}
==================
WARNING: DATA RACE
Read at 0x00c005593dd0 by goroutine 98:
runtime.mapiterinit()
/opt/hostedtoolcache/go/1.18.6/x64/src/runtime/map.go:815 +0x0
github.com/apache/yunikorn-k8shim/pkg/cache.(*PlaceholderManager).cleanUp()
/home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/cache/placeholder_manager.go:117 +0x246
github.com/apache/yunikorn-k8shim/pkg/cache.(*Application).handleFailApplicationEvent.func1()
/home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/cache/application.go:584 +0x35
Previous write at 0x00c005593dd0 by goroutine 75:
runtime.mapdelete_faststr()
/opt/hostedtoolcache/go/1.18.6/x64/src/runtime/map_faststr.go:301 +0x0
github.com/apache/yunikorn-k8shim/pkg/cache.(*Application).removeTask()
/home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/cache/application.go:250 +0x16c
github.com/apache/yunikorn-k8shim/pkg/cache.(*Context).RemoveTask()
/home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/cache/context.go:742 +0x2a9
github.com/apache/yunikorn-k8shim/pkg/shim.TestRejectApplications()
/home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/shim/scheduler_test.go:138 +0x66f
testing.tRunner()
/opt/hostedtoolcache/go/1.18.6/x64/src/testing/testing.go:1439 +0x213
testing.(*T).Run.func1()
/opt/hostedtoolcache/go/1.18.6/x64/src/testing/testing.go:1486 +0x47
Goroutine 98 (running) created at:
github.com/apache/yunikorn-k8shim/pkg/cache.(*Application).handleFailApplicationEvent()
/home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/cache/application.go:583 +0xca
github.com/apache/yunikorn-k8shim/pkg/cache.newAppState.func7()
/home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/cache/application_state.go:547 +0x2e6
github.com/looplab/fsm.(*FSM).afterEventCallbacks()
/home/runner/go/pkg/mod/github.com/looplab/fsm@v0.1.0/fsm.go:414 +0xc7
github.com/looplab/fsm.(*FSM).Event.func1()
/home/runner/go/pkg/mod/github.com/looplab/fsm@v0.1.0/fsm.go:309 +0xb7
github.com/looplab/fsm.transitionerStruct.transition()
/home/runner/go/pkg/mod/github.com/looplab/fsm@v0.1.0/fsm.go:354 +0x99
github.com/looplab/fsm.(*transitionerStruct).transition()
<autogenerated>:1 +0x29
github.com/looplab/fsm.(*FSM).doTransition()
/home/runner/go/pkg/mod/github.com/looplab/fsm@v0.1.0/fsm.go:339 +0x701
github.com/looplab/fsm.(*FSM).Event()
/home/runner/go/pkg/mod/github.com/looplab/fsm@v0.1.0/fsm.go:321 +0x6da
github.com/apache/yunikorn-k8shim/pkg/cache.(*Application).handle()
/home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/cache/application.go:104 +0x249
github.com/apache/yunikorn-k8shim/pkg/cache.(*Context).ApplicationEventHandler.func1()
/home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/cache/context.go:910 +0xfb
github.com/apache/yunikorn-k8shim/pkg/dispatcher.Start.func1()
/home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/dispatcher/dispatcher.go:197 +0x2eb
Goroutine 75 (running) created at:
testing.(*T).Run()
/opt/hostedtoolcache/go/1.18.6/x64/src/testing/testing.go:1486 +0x724
testing.runTests.func1()
/opt/hostedtoolcache/go/1.18.6/x64/src/testing/testing.go:1839 +0x99
testing.tRunner()
/opt/hostedtoolcache/go/1.18.6/x64/src/testing/testing.go:1439 +0x213
testing.runTests()
/opt/hostedtoolcache/go/1.18.6/x64/src/testing/testing.go:1837 +0x7e4
testing.(*M).Run()
/opt/hostedtoolcache/go/1.18.6/x64/src/testing/testing.go:1719 +0xa71
main.main()
_testmain.go:103 +0x3a9
==================
{noformat}
We perform an unsafe access to {{app.taskMap}} in {{PlaceholderManager.cleanUp()}}. We need to call {{Application.GetPlaceholderTasks()}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: issues-help@yunikorn.apache.org