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

Concurrent map iteration and write #1375

Open
5 tasks
Tracked by #1138
inancgumus opened this issue Jun 7, 2024 · 0 comments
Open
5 tasks
Tracked by #1138

Concurrent map iteration and write #1375

inancgumus opened this issue Jun 7, 2024 · 0 comments
Labels
bug Something isn't working next Might be eligible for the next planning (not guaranteed!) remote remote browser related

Comments

@inancgumus
Copy link
Member

inancgumus commented Jun 7, 2024

What?

Fix the concurrent map iteration and map write bug.

Test run ID: 2760298
Browser version: 1.5.1

Why?

To prevent the panic.

How?

Fix the following bug (look at this line):

fatal error: concurrent map iteration and map write

goroutine 94 [running]:
reflect.mapiternext(0x4b6aa9?)
runtime/map.go:1392 +0x13
reflect.(*MapIter).Next(0xc018d88680?)
reflect/value.go:2005 +0x74
internal/fmtsort.Sort({0x15a7760?, 0xc002cd2b60?, 0xc0012d1690?})
internal/fmtsort/sort.go:62 +0x1d3
fmt.(*pp).printValue(0xc000f94000, {0x15a7760?, 0xc002cd2b60?, 0x1?}, 0x76, 0x3)
fmt/print.go:816 +0x988
fmt.(*pp).printValue(0xc000f94000, {0x16f8d20?, 0xc002cd2b40?, 0xc018d88b28?}, 0x76, 0x2)
fmt/print.go:853 +0x11be
fmt.(*pp).printValue(0xc000f94000, {0x1750940?, 0xc002cd2b40?, 0xc01ae76000?}, 0x76, 0x1)
fmt/print.go:853 +0x11be
fmt.(*pp).printValue(0xc000f94000, {0x173a740?, 0xc002cd2b40?, 0x0?}, 0x76, 0x0)
fmt/print.go:921 +0xaf4
fmt.(*pp).badVerb(0xc000f94000, 0x71)
fmt/print.go:394 +0x47f
fmt.(*pp).fmtPointer(0xc000f94000, {0x173a740?, 0xc002cd2b40?, 0x50aa70?}, 0x71)
fmt/print.go:583 +0x414
fmt.(*pp).printValue(0xc000f94000, {0x173a740?, 0xc002cd2b40?, 0x50aa70?}, 0x71, 0x3)
fmt/print.go:927 +0x1165
fmt.(*pp).printValue(0xc000f94000, {0x17135e0?, 0xc014fefb80?, 0x0?}, 0x71, 0x2)
fmt/print.go:853 +0x11be
fmt.(*pp).printValue(0xc000f94000, {0x1646fa0?, 0xc014fefb80?, 0x50aa70?}, 0x71, 0x1)
fmt/print.go:853 +0x11be
fmt.(*pp).printValue(0xc000f94000, {0x17cb4c0?, 0xc014fefb80?, 0xc018d89970?}, 0x71, 0x0)
fmt/print.go:921 +0xaf4
fmt.(*pp).printArg(0xc000f94000, {0x17cb4c0, 0xc014fefb80}, 0x71)
fmt/print.go:759 +0x4bc
fmt.(*pp).doPrintf(0xc000f94000, {0x184d1e5, 0x45}, {0xc018d89de0, 0x4, 0x4})
fmt/print.go:1075 +0x37e
fmt.Errorf({0x184d1e5, 0x45}, {0xc018d89de0, 0x4, 0x4})
fmt/errors.go:25 +0x85
github.com/grafana/xk6-browser/common.(*ExecutionContext).eval(0xc018c3cfd0, {0x1bb8208, 0xc000ece730}, {0x1, 0x0}, {0x185895c, 0xa5}, {0xc0194d8a20, 0x6, 0x6})
github.com/grafana/[email protected]/common/execution_context.go:189 +0xd65
github.com/grafana/xk6-browser/common.(*ElementHandle).eval(...)
github.com/grafana/[email protected]/common/element_handle.go:1401
github.com/grafana/xk6-browser/common.(*ElementHandle).evalWithScript(0xc014fefb80, {0x1bb8208, 0xc000ece730}, {0x0?, 0x0?}, {0x185895c, 0xa5}, {0xc018d89f40, 0x4, 0x4})
github.com/grafana/[email protected]/common/element_handle.go:1392 +0x25d
github.com/grafana/xk6-browser/common.(*ElementHandle).waitForSelector(0xc014fefb80, {0x1bb8208, 0xc000ece730}, {0xc00258e3a8?, 0x1808d81?}, 0xc018d8a158)
github.com/grafana/[email protected]/common/element_handle.go:681 +0x188
github.com/grafana/xk6-browser/common.(*Frame).waitForSelector(0xc000a92540, {0xc00258e3a8, 0x11}, 0xc018d8a158)
github.com/grafana/[email protected]/common/frame.go:527 +0x1bb
github.com/grafana/xk6-browser/common.(*Frame).waitForSelectorRetry(0xc000a92540, {0xc00258e3a8, 0x11}, 0xc018d8a158, 0xc001b4a780?)
github.com/grafana/[email protected]/common/frame.go:511 +0x5a
github.com/grafana/xk6-browser/common.(*Frame).WaitForSelector(0xc000a92540, {0xc00258e3a8, 0x11}, {0x1bc9d18, 0xc001b4a780})
github.com/grafana/[email protected]/common/frame.go:1930 +0x165
github.com/grafana/xk6-browser/browser.mapFrame.func14({0xc00258e3a8?, 0x2?}, {0x1bc9d18?, 0xc001b4a780?})
github.com/grafana/[email protected]/browser/mapping.go:491 +0x45
reflect.Value.call({0x15a34a0?, 0xc000a87080?, 0x8?}, {0x17ec3d9, 0x4}, {0xc001b4a7e0, 0x2, 0xc0149663e0?})
reflect/value.go:596 +0xca6
reflect.Value.Call({0x15a34a0?, 0xc000a87080?, 0xc001b4a780?}, {0xc001b4a7e0?, 0xc00164ea10?, 0x7fcfca223bd8?})
reflect/value.go:380 +0xb9
github.com/dop251/goja.(*Runtime).newWrappedFunc.(*Runtime).wrapReflectFunc.func1({{0x1bc9d18, 0xc003544210}, {0xc0159497b8, 0x2, 0x2d}})
github.com/dop251/[email protected]/runtime.go:1982 +0x3bd
github.com/dop251/goja.(*nativeFuncObject).vmCall(0xc0017be840, 0xc0034905a0, 0x2)
github.com/dop251/[email protected]/func.go:563 +0x184
github.com/dop251/goja.call.exec(0x5?, 0xc0034905a0)
github.com/dop251/[email protected]/vm.go:3375 +0x66
github.com/dop251/goja.(*vm).run(0xc0034905a0)
github.com/dop251/[email protected]/vm.go:582 +0x5b
github.com/dop251/goja.(*vm).runTryInner(0xc018d8ac18?)
github.com/dop251/[email protected]/vm.go:834 +0x65
github.com/dop251/goja.(*generator).step(0xc0009287e0)
github.com/dop251/[email protected]/func.go:762 +0x2b
github.com/dop251/goja.(*asyncRunner).start(0xc0009287e0, 0x1)
github.com/dop251/[email protected]/func.go:733 +0xfd
github.com/dop251/goja.(*baseJsFuncObject).asyncVmCall(0xc0032a5a40, 0xc0034905a0, 0x1, 0xc00164e990)
github.com/dop251/[email protected]/func.go:664 +0x79
github.com/dop251/goja.(*asyncFuncObject).vmCall(0xc0032a5a40, 0xc0034905a0, 0x1)
github.com/dop251/[email protected]/func.go:670 +0x65
github.com/dop251/goja.call.exec(0xd988e5?, 0xc0034905a0)
github.com/dop251/[email protected]/vm.go:3375 +0x66
github.com/dop251/goja.(*vm).run(0xc0034905a0)
github.com/dop251/[email protected]

Tasks

Tasks

Related PR(s)/Issue(s)

@inancgumus inancgumus added bug Something isn't working next Might be eligible for the next planning (not guaranteed!) remote remote browser related labels Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working next Might be eligible for the next planning (not guaranteed!) remote remote browser related
Projects
None yet
Development

No branches or pull requests

1 participant