k6
k6 copied to clipboard
`TestSetTimeoutContextCancel` and `TestSetTimeoutOrder` are flaky
TestSetTimeoutContextCancel and TestSetTimeoutOrder are flaky:
github.com/grafana/sobek.(*Runtime).runWrapped()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/runtime.go:2525 +0xe4
github.com/grafana/sobek.AssertFunction.func1()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/runtime.go:2480 +0x13a
go.k6.io/k6/internal/js/tc55/timers.(*timers).call()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:77 +0x98
go.k6.io/k6/internal/js/tc55/timers.(*timers).timerInitialization.func1()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:139 +0xeb
go.k6.io/k6/internal/js/tc55/timers.(*timers).runFirstTask()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:184 +0x216
go.k6.io/k6/internal/js/tc55/timers.(*timers).runFirstTask-fm()
<autogenerated>:1 +0x33
github.com/mstoykov/k6-taskqueue-lib/taskqueue.(*TaskQueue).innerQueueATask()
/home/runner/work/k6/k6/vendor/github.com/mstoykov/k6-taskqueue-lib/taskqueue/queuer.go:92 +0x10e
github.com/mstoykov/k6-taskqueue-lib/taskqueue.(*TaskQueue).Queue.func1()
/home/runner/work/k6/k6/vendor/github.com/mstoykov/k6-taskqueue-lib/taskqueue/queuer.go:73 +0x38
go.k6.io/k6/internal/js/eventloop.(*EventLoop).Start()
/home/runner/work/k6/k6/internal/js/eventloop/eventloop.go:177 +0x277
go.k6.io/k6/js/modulestest.(*Runtime).RunOnEventLoop()
/home/runner/work/k6/k6/js/modulestest/runtime.go:111 +0x23d
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:168 +0x47a
testing.tRunner()
/home/runner/sdk/gotip/src/testing/testing.go:1799 +0x21c
testing.(*T).Run.gowrap1()
/home/runner/sdk/gotip/src/testing/testing.go:1858 +0x44
Previous read at 0x00c0002be790 by goroutine 41:
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel.func3()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:165 +0x54
Goroutine 13 (running) created at:
testing.(*T).Run()
/home/runner/sdk/gotip/src/testing/testing.go:1858 +0x8dd
testing.runTests.func1()
/home/runner/sdk/gotip/src/testing/testing.go:2289 +0x85
testing.tRunner()
/home/runner/sdk/gotip/src/testing/testing.go:1799 +0x21c
testing.runTests()
/home/runner/sdk/gotip/src/testing/testing.go:2287 +0x96c
testing.(*M).Run()
/home/runner/sdk/gotip/src/testing/testing.go:2152 +0xed4
main.main()
_testmain.go:57 +0x164
Goroutine 41 (finished) created at:
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:162 +0x464
testing.tRunner()
/home/runner/sdk/gotip/src/testing/testing.go:1799 +0x21c
testing.(*T).Run.gowrap1()
/home/runner/sdk/gotip/src/testing/testing.go:1858 +0x44
==================
--- FAIL: TestSetTimeoutContextCancel (0.87s)
testing.go:1492: race detected during execution of test
--- FAIL: TestSetTimeoutOrder (2.12s)
testing.go:1492: race detected during execution of test
FAIL
FAIL go.k6.io/k6/internal/js/tc55/timers 2.164s
Happened one more time, here.
Click here to see the logs.
time="2025-11-07T15:32:06Z" level=warning msg="setTimeout 2 was stopped because the VU iteration was interrupted"
time="2025-11-07T15:32:06Z" level=warning msg="setTimeout 5 was stopped because the VU iteration was interrupted"
==================
WARNING: DATA RACE
Read at 0x00c000424520 by goroutine 404:
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel.func4()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:178 +0x179
Previous write at 0x00c000424520 by goroutine 13:
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:160 +0x2e7
github.com/grafana/sobek.(*vm).try()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/vm.go:870 +0x405
github.com/grafana/sobek.(*Runtime).runWrapped()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/runtime.go:2525 +0xe4
github.com/grafana/sobek.AssertFunction.func1()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/runtime.go:2480 +0x13a
go.k6.io/k6/internal/js/tc55/timers.(*timers).call()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:78 +0x98
go.k6.io/k6/internal/js/tc55/timers.(*timers).timerInitialization.func1()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:147 +0xeb
go.k6.io/k6/internal/js/tc55/timers.(*timers).runFirstTask()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:192 +0x216
go.k6.io/k6/internal/js/tc55/timers.(*timers).runFirstTask-fm()
<autogenerated>:1 +0x33
github.com/mstoykov/k6-taskqueue-lib/taskqueue.(*TaskQueue).innerQueueATask()
/home/runner/work/k6/k6/vendor/github.com/mstoykov/k6-taskqueue-lib/taskqueue/queuer.go:92 +0x10e
github.com/mstoykov/k6-taskqueue-lib/taskqueue.(*TaskQueue).Queue.func1()
/home/runner/work/k6/k6/vendor/github.com/mstoykov/k6-taskqueue-lib/taskqueue/queuer.go:73 +0x38
go.k6.io/k6/internal/js/eventloop.(*EventLoop).Start()
/home/runner/work/k6/k6/internal/js/eventloop/eventloop.go:179 +0x277
go.k6.io/k6/js/modulestest.(*Runtime).RunOnEventLoop()
/home/runner/work/k6/k6/js/modulestest/runtime.go:111 +0x23d
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:181 +0x5e5
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.(*T).Run.gowrap1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x44
Goroutine 404 (running) created at:
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:169 +0x5cf
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.(*T).Run.gowrap1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x44
Goroutine 13 (running) created at:
testing.(*T).Run()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x9d2
testing.runTests.func1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2477 +0x85
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.runTests()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2475 +0x96c
testing.(*M).Run()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2337 +0xed4
main.main()
_testmain.go:59 +0x164
==================
==================
WARNING: DATA RACE
Write at 0x00c0003c7690 by goroutine 404:
sync/atomic.CompareAndSwapInt32()
/opt/hostedtoolcache/go/1.25.4/x64/src/runtime/race_amd64.s:361 +0xb
sync/atomic.CompareAndSwapInt32()
<autogenerated>:1 +0x18
sync.(*Mutex).Lock()
/opt/hostedtoolcache/go/1.25.4/x64/src/sync/mutex.go:46 +0x28
context.(*cancelCtx).cancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:556 +0x84
context.WithCancel.func1()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:242 +0x52
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel.func4()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:178 +0x18a
Previous write at 0x00c0003c7690 by goroutine 13:
context.withCancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:277 +0x53
context.WithCancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:241 +0x26
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:159 +0x2c4
github.com/grafana/sobek.(*vm).try()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/vm.go:870 +0x405
github.com/grafana/sobek.(*Runtime).runWrapped()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/runtime.go:2525 +0xe4
github.com/grafana/sobek.AssertFunction.func1()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/runtime.go:2480 +0x13a
go.k6.io/k6/internal/js/tc55/timers.(*timers).call()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:78 +0x98
go.k6.io/k6/internal/js/tc55/timers.(*timers).timerInitialization.func1()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:147 +0xeb
go.k6.io/k6/internal/js/tc55/timers.(*timers).runFirstTask()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:192 +0x216
go.k6.io/k6/internal/js/tc55/timers.(*timers).runFirstTask-fm()
<autogenerated>:1 +0x33
github.com/mstoykov/k6-taskqueue-lib/taskqueue.(*TaskQueue).innerQueueATask()
/home/runner/work/k6/k6/vendor/github.com/mstoykov/k6-taskqueue-lib/taskqueue/queuer.go:92 +0x10e
github.com/mstoykov/k6-taskqueue-lib/taskqueue.(*TaskQueue).Queue.func1()
/home/runner/work/k6/k6/vendor/github.com/mstoykov/k6-taskqueue-lib/taskqueue/queuer.go:73 +0x38
go.k6.io/k6/internal/js/eventloop.(*EventLoop).Start()
/home/runner/work/k6/k6/internal/js/eventloop/eventloop.go:179 +0x277
go.k6.io/k6/js/modulestest.(*Runtime).RunOnEventLoop()
/home/runner/work/k6/k6/js/modulestest/runtime.go:111 +0x23d
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:181 +0x5e5
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.(*T).Run.gowrap1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x44
Goroutine 404 (running) created at:
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:169 +0x5cf
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.(*T).Run.gowrap1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x44
Goroutine 13 (running) created at:
testing.(*T).Run()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x9d2
testing.runTests.func1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2477 +0x85
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.runTests()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2475 +0x96c
testing.(*M).Run()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2337 +0xed4
main.main()
_testmain.go:59 +0x164
==================
==================
WARNING: DATA RACE
Read at 0x00c0003c76b0 by goroutine 404:
sync/atomic.LoadInt64()
/opt/hostedtoolcache/go/1.25.4/x64/src/runtime/race_amd64.s:208 +0xb
sync/atomic.LoadPointer()
<autogenerated>:1 +0x10
context.(*cancelCtx).cancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:557 +0x9a
context.WithCancel.func1()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:242 +0x52
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel.func4()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:178 +0x18a
Previous write at 0x00c0003c76b0 by goroutine 13:
context.withCancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:277 +0x53
context.WithCancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:241 +0x26
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:159 +0x2c4
github.com/grafana/sobek.(*vm).try()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/vm.go:870 +0x405
github.com/grafana/sobek.(*Runtime).runWrapped()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/runtime.go:2525 +0xe4
github.com/grafana/sobek.AssertFunction.func1()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/runtime.go:2480 +0x13a
go.k6.io/k6/internal/js/tc55/timers.(*timers).call()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:78 +0x98
go.k6.io/k6/internal/js/tc55/timers.(*timers).timerInitialization.func1()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:147 +0xeb
go.k6.io/k6/internal/js/tc55/timers.(*timers).runFirstTask()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:192 +0x216
go.k6.io/k6/internal/js/tc55/timers.(*timers).runFirstTask-fm()
<autogenerated>:1 +0x33
github.com/mstoykov/k6-taskqueue-lib/taskqueue.(*TaskQueue).innerQueueATask()
/home/runner/work/k6/k6/vendor/github.com/mstoykov/k6-taskqueue-lib/taskqueue/queuer.go:92 +0x10e
github.com/mstoykov/k6-taskqueue-lib/taskqueue.(*TaskQueue).Queue.func1()
/home/runner/work/k6/k6/vendor/github.com/mstoykov/k6-taskqueue-lib/taskqueue/queuer.go:73 +0x38
go.k6.io/k6/internal/js/eventloop.(*EventLoop).Start()
/home/runner/work/k6/k6/internal/js/eventloop/eventloop.go:179 +0x277
go.k6.io/k6/js/modulestest.(*Runtime).RunOnEventLoop()
/home/runner/work/k6/k6/js/modulestest/runtime.go:111 +0x23d
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:181 +0x5e5
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.(*T).Run.gowrap1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x44
Goroutine 404 (running) created at:
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:169 +0x5cf
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.(*T).Run.gowrap1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x44
Goroutine 13 (running) created at:
testing.(*T).Run()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x9d2
testing.runTests.func1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2477 +0x85
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.runTests()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2475 +0x96c
testing.(*M).Run()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2337 +0xed4
main.main()
_testmain.go:59 +0x164
==================
==================
WARNING: DATA RACE
Write at 0x00c0003c76b8 by goroutine 404:
sync/atomic.StoreInt64()
/opt/hostedtoolcache/go/1.25.4/x64/src/runtime/race_amd64.s:237 +0xb
sync/atomic.StorePointer()
/opt/hostedtoolcache/go/1.25.4/x64/src/runtime/atomic_pointer.go:92 +0x44
context.(*cancelCtx).cancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:561 +0x114
context.WithCancel.func1()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:242 +0x52
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel.func4()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:178 +0x18a
Previous write at 0x00c0003c76b8 by goroutine 13:
context.withCancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:277 +0x53
context.WithCancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:241 +0x26
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:159 +0x2c4
github.com/grafana/sobek.(*vm).try()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/vm.go:870 +0x405
github.com/grafana/sobek.(*Runtime).runWrapped()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/runtime.go:2525 +0xe4
github.com/grafana/sobek.AssertFunction.func1()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/runtime.go:2480 +0x13a
go.k6.io/k6/internal/js/tc55/timers.(*timers).call()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:78 +0x98
go.k6.io/k6/internal/js/tc55/timers.(*timers).timerInitialization.func1()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:147 +0xeb
go.k6.io/k6/internal/js/tc55/timers.(*timers).runFirstTask()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:192 +0x216
go.k6.io/k6/internal/js/tc55/timers.(*timers).runFirstTask-fm()
<autogenerated>:1 +0x33
github.com/mstoykov/k6-taskqueue-lib/taskqueue.(*TaskQueue).innerQueueATask()
/home/runner/work/k6/k6/vendor/github.com/mstoykov/k6-taskqueue-lib/taskqueue/queuer.go:92 +0x10e
github.com/mstoykov/k6-taskqueue-lib/taskqueue.(*TaskQueue).Queue.func1()
/home/runner/work/k6/k6/vendor/github.com/mstoykov/k6-taskqueue-lib/taskqueue/queuer.go:73 +0x38
go.k6.io/k6/internal/js/eventloop.(*EventLoop).Start()
/home/runner/work/k6/k6/internal/js/eventloop/eventloop.go:179 +0x277
go.k6.io/k6/js/modulestest.(*Runtime).RunOnEventLoop()
/home/runner/work/k6/k6/js/modulestest/runtime.go:111 +0x23d
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:181 +0x5e5
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.(*T).Run.gowrap1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x44
Goroutine 404 (running) created at:
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:169 +0x5cf
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.(*T).Run.gowrap1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x44
Goroutine 13 (running) created at:
testing.(*T).Run()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x9d2
testing.runTests.func1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2477 +0x85
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.runTests()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2475 +0x96c
testing.(*M).Run()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2337 +0xed4
main.main()
_testmain.go:59 +0x164
==================
==================
WARNING: DATA RACE
Write at 0x00c0003c76c0 by goroutine 404:
context.(*cancelCtx).cancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:562 +0x125
context.WithCancel.func1()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:242 +0x52
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel.func4()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:178 +0x18a
Previous write at 0x00c0003c76c0 by goroutine 13:
context.withCancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:277 +0x53
context.WithCancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:241 +0x26
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:159 +0x2c4
github.com/grafana/sobek.(*vm).try()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/vm.go:870 +0x405
github.com/grafana/sobek.(*Runtime).runWrapped()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/runtime.go:2525 +0xe4
github.com/grafana/sobek.AssertFunction.func1()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/runtime.go:2480 +0x13a
go.k6.io/k6/internal/js/tc55/timers.(*timers).call()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:78 +0x98
go.k6.io/k6/internal/js/tc55/timers.(*timers).timerInitialization.func1()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:147 +0xeb
go.k6.io/k6/internal/js/tc55/timers.(*timers).runFirstTask()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:192 +0x216
go.k6.io/k6/internal/js/tc55/timers.(*timers).runFirstTask-fm()
<autogenerated>:1 +0x33
github.com/mstoykov/k6-taskqueue-lib/taskqueue.(*TaskQueue).innerQueueATask()
/home/runner/work/k6/k6/vendor/github.com/mstoykov/k6-taskqueue-lib/taskqueue/queuer.go:92 +0x10e
github.com/mstoykov/k6-taskqueue-lib/taskqueue.(*TaskQueue).Queue.func1()
/home/runner/work/k6/k6/vendor/github.com/mstoykov/k6-taskqueue-lib/taskqueue/queuer.go:73 +0x38
go.k6.io/k6/internal/js/eventloop.(*EventLoop).Start()
/home/runner/work/k6/k6/internal/js/eventloop/eventloop.go:179 +0x277
go.k6.io/k6/js/modulestest.(*Runtime).RunOnEventLoop()
/home/runner/work/k6/k6/js/modulestest/runtime.go:111 +0x23d
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:181 +0x5e5
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.(*T).Run.gowrap1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x44
Goroutine 404 (running) created at:
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:169 +0x5cf
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.(*T).Run.gowrap1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x44
Goroutine 13 (running) created at:
testing.(*T).Run()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x9d2
testing.runTests.func1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2477 +0x85
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.runTests()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2475 +0x96c
testing.(*M).Run()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2337 +0xed4
main.main()
_testmain.go:59 +0x164
==================
==================
WARNING: DATA RACE
Read at 0x00c0003c7698 by goroutine 404:
sync/atomic.LoadInt64()
/opt/hostedtoolcache/go/1.25.4/x64/src/runtime/race_amd64.s:208 +0xb
sync/atomic.LoadPointer()
<autogenerated>:1 +0x10
context.(*cancelCtx).cancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:563 +0x16f
context.WithCancel.func1()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:242 +0x52
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel.func4()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:178 +0x18a
Previous write at 0x00c0003c7698 by goroutine 13:
context.withCancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:277 +0x53
context.WithCancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:241 +0x26
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:159 +0x2c4
github.com/grafana/sobek.(*vm).try()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/vm.go:870 +0x405
github.com/grafana/sobek.(*Runtime).runWrapped()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/runtime.go:2525 +0xe4
github.com/grafana/sobek.AssertFunction.func1()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/runtime.go:2480 +0x13a
go.k6.io/k6/internal/js/tc55/timers.(*timers).call()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:78 +0x98
go.k6.io/k6/internal/js/tc55/timers.(*timers).timerInitialization.func1()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:147 +0xeb
go.k6.io/k6/internal/js/tc55/timers.(*timers).runFirstTask()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:192 +0x216
go.k6.io/k6/internal/js/tc55/timers.(*timers).runFirstTask-fm()
<autogenerated>:1 +0x33
github.com/mstoykov/k6-taskqueue-lib/taskqueue.(*TaskQueue).innerQueueATask()
/home/runner/work/k6/k6/vendor/github.com/mstoykov/k6-taskqueue-lib/taskqueue/queuer.go:92 +0x10e
github.com/mstoykov/k6-taskqueue-lib/taskqueue.(*TaskQueue).Queue.func1()
/home/runner/work/k6/k6/vendor/github.com/mstoykov/k6-taskqueue-lib/taskqueue/queuer.go:73 +0x38
go.k6.io/k6/internal/js/eventloop.(*EventLoop).Start()
/home/runner/work/k6/k6/internal/js/eventloop/eventloop.go:179 +0x277
go.k6.io/k6/js/modulestest.(*Runtime).RunOnEventLoop()
/home/runner/work/k6/k6/js/modulestest/runtime.go:111 +0x23d
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:181 +0x5e5
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.(*T).Run.gowrap1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x44
Goroutine 404 (running) created at:
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:169 +0x5cf
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.(*T).Run.gowrap1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x44
Goroutine 13 (running) created at:
testing.(*T).Run()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x9d2
testing.runTests.func1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2477 +0x85
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.runTests()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2475 +0x96c
testing.(*M).Run()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2337 +0xed4
main.main()
_testmain.go:59 +0x164
==================
==================
WARNING: DATA RACE
Write at 0x00c0003c76a0 by goroutine 404:
sync/atomic.StoreInt64()
/opt/hostedtoolcache/go/1.25.4/x64/src/runtime/race_amd64.s:237 +0xb
sync/atomic.StorePointer()
/opt/hostedtoolcache/go/1.25.4/x64/src/runtime/atomic_pointer.go:92 +0x44
context.(*cancelCtx).cancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:565 +0x1b2
context.WithCancel.func1()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:242 +0x52
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel.func4()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:178 +0x18a
Previous write at 0x00c0003c76a0 by goroutine 13:
context.withCancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:277 +0x53
context.WithCancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:241 +0x26
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:159 +0x2c4
github.com/grafana/sobek.(*vm).try()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/vm.go:870 +0x405
github.com/grafana/sobek.(*Runtime).runWrapped()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/runtime.go:2525 +0xe4
github.com/grafana/sobek.AssertFunction.func1()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/runtime.go:2480 +0x13a
go.k6.io/k6/internal/js/tc55/timers.(*timers).call()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:78 +0x98
go.k6.io/k6/internal/js/tc55/timers.(*timers).timerInitialization.func1()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:147 +0xeb
go.k6.io/k6/internal/js/tc55/timers.(*timers).runFirstTask()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:192 +0x216
go.k6.io/k6/internal/js/tc55/timers.(*timers).runFirstTask-fm()
<autogenerated>:1 +0x33
github.com/mstoykov/k6-taskqueue-lib/taskqueue.(*TaskQueue).innerQueueATask()
/home/runner/work/k6/k6/vendor/github.com/mstoykov/k6-taskqueue-lib/taskqueue/queuer.go:92 +0x10e
github.com/mstoykov/k6-taskqueue-lib/taskqueue.(*TaskQueue).Queue.func1()
/home/runner/work/k6/k6/vendor/github.com/mstoykov/k6-taskqueue-lib/taskqueue/queuer.go:73 +0x38
go.k6.io/k6/internal/js/eventloop.(*EventLoop).Start()
/home/runner/work/k6/k6/internal/js/eventloop/eventloop.go:179 +0x277
go.k6.io/k6/js/modulestest.(*Runtime).RunOnEventLoop()
/home/runner/work/k6/k6/js/modulestest/runtime.go:111 +0x23d
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:181 +0x5e5
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.(*T).Run.gowrap1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x44
Goroutine 404 (running) created at:
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:169 +0x5cf
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.(*T).Run.gowrap1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x44
Goroutine 13 (running) created at:
testing.(*T).Run()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x9d2
testing.runTests.func1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2477 +0x85
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.runTests()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2475 +0x96c
testing.(*M).Run()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2337 +0xed4
main.main()
_testmain.go:59 +0x164
==================
==================
WARNING: DATA RACE
Read at 0x00c0003c76a8 by goroutine 404:
context.(*cancelCtx).cancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:569 +0x1c8
context.WithCancel.func1()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:242 +0x52
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel.func4()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:178 +0x18a
Previous write at 0x00c0003c76a8 by goroutine 13:
context.withCancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:277 +0x53
context.WithCancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:241 +0x26
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:159 +0x2c4
github.com/grafana/sobek.(*vm).try()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/vm.go:870 +0x405
github.com/grafana/sobek.(*Runtime).runWrapped()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/runtime.go:2525 +0xe4
github.com/grafana/sobek.AssertFunction.func1()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/runtime.go:2480 +0x13a
go.k6.io/k6/internal/js/tc55/timers.(*timers).call()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:78 +0x98
go.k6.io/k6/internal/js/tc55/timers.(*timers).timerInitialization.func1()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:147 +0xeb
go.k6.io/k6/internal/js/tc55/timers.(*timers).runFirstTask()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:192 +0x216
go.k6.io/k6/internal/js/tc55/timers.(*timers).runFirstTask-fm()
<autogenerated>:1 +0x33
github.com/mstoykov/k6-taskqueue-lib/taskqueue.(*TaskQueue).innerQueueATask()
/home/runner/work/k6/k6/vendor/github.com/mstoykov/k6-taskqueue-lib/taskqueue/queuer.go:92 +0x10e
github.com/mstoykov/k6-taskqueue-lib/taskqueue.(*TaskQueue).Queue.func1()
/home/runner/work/k6/k6/vendor/github.com/mstoykov/k6-taskqueue-lib/taskqueue/queuer.go:73 +0x38
go.k6.io/k6/internal/js/eventloop.(*EventLoop).Start()
/home/runner/work/k6/k6/internal/js/eventloop/eventloop.go:179 +0x277
go.k6.io/k6/js/modulestest.(*Runtime).RunOnEventLoop()
/home/runner/work/k6/k6/js/modulestest/runtime.go:111 +0x23d
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:181 +0x5e5
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.(*T).Run.gowrap1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x44
Goroutine 404 (running) created at:
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:169 +0x5cf
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.(*T).Run.gowrap1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x44
Goroutine 13 (running) created at:
testing.(*T).Run()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x9d2
testing.runTests.func1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2477 +0x85
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.runTests()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2475 +0x96c
testing.(*M).Run()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2337 +0xed4
main.main()
_testmain.go:59 +0x164
==================
==================
WARNING: DATA RACE
Read at 0x00c0003c7680 by goroutine 404:
context.(*cancelCtx).cancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:577 +0x2e4
context.WithCancel.func1()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:242 +0x52
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel.func4()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:178 +0x18a
Previous write at 0x00c0003c7680 by goroutine 13:
context.withCancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:277 +0x53
context.WithCancel()
/opt/hostedtoolcache/go/1.25.4/x64/src/context/context.go:241 +0x26
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:159 +0x2c4
github.com/grafana/sobek.(*vm).try()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/vm.go:870 +0x405
github.com/grafana/sobek.(*Runtime).runWrapped()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/runtime.go:2525 +0xe4
github.com/grafana/sobek.AssertFunction.func1()
/home/runner/work/k6/k6/vendor/github.com/grafana/sobek/runtime.go:2480 +0x13a
go.k6.io/k6/internal/js/tc55/timers.(*timers).call()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:78 +0x98
go.k6.io/k6/internal/js/tc55/timers.(*timers).timerInitialization.func1()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:147 +0xeb
go.k6.io/k6/internal/js/tc55/timers.(*timers).runFirstTask()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers.go:192 +0x216
go.k6.io/k6/internal/js/tc55/timers.(*timers).runFirstTask-fm()
<autogenerated>:1 +0x33
github.com/mstoykov/k6-taskqueue-lib/taskqueue.(*TaskQueue).innerQueueATask()
/home/runner/work/k6/k6/vendor/github.com/mstoykov/k6-taskqueue-lib/taskqueue/queuer.go:92 +0x10e
github.com/mstoykov/k6-taskqueue-lib/taskqueue.(*TaskQueue).Queue.func1()
/home/runner/work/k6/k6/vendor/github.com/mstoykov/k6-taskqueue-lib/taskqueue/queuer.go:73 +0x38
go.k6.io/k6/internal/js/eventloop.(*EventLoop).Start()
/home/runner/work/k6/k6/internal/js/eventloop/eventloop.go:179 +0x277
go.k6.io/k6/js/modulestest.(*Runtime).RunOnEventLoop()
/home/runner/work/k6/k6/js/modulestest/runtime.go:111 +0x23d
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:181 +0x5e5
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.(*T).Run.gowrap1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x44
Goroutine 404 (running) created at:
go.k6.io/k6/internal/js/tc55/timers_test.TestSetTimeoutContextCancel()
/home/runner/work/k6/k6/internal/js/tc55/timers/timers_test.go:169 +0x5cf
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.(*T).Run.gowrap1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x44
Goroutine 13 (running) created at:
testing.(*T).Run()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x9d2
testing.runTests.func1()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2477 +0x85
testing.tRunner()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
testing.runTests()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2475 +0x96c
testing.(*M).Run()
/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2337 +0xed4
main.main()
_testmain.go:59 +0x164
==================
--- FAIL: TestSetTimeoutOrder (2.18s)
testing.go:1617: race detected during execution of test
--- FAIL: TestSetTimeoutContextCancel (1.66s)
testing.go:1617: race detected during execution of test