grafana / xk6-amqp

A k6 extension for publishing and consuming messages from queues and exchanges using AMQP 0.9.1.
Apache License 2.0
25 stars 27 forks source link

fatal error: concurrent map writes #35

Closed kempsterc closed 11 months ago

kempsterc commented 1 year ago

Had this failure during a test, cant really work out the cause

LOG:

fatal error: concurrent map writes 17:44:20
17:44:20 goroutine 184 [running]: 17:44:20 github.com/grafana/xk6-amqp.(AMQP).Start(0xc0000d3ec0, {{0xc005a3a750?, 0x2?}}) 17:44:20 github.com/grafana/xk6-amqp@v0.4.1/amqp.go:84 +0xa5 17:44:20 reflect.Value.call({0x192b0c0?, 0xc0000d3ec0?, 0x0?}, {0x1b4c321, 0x4}, {0xc011597950, 0x1, 0x0?}) 17:44:20 reflect/value.go:596 +0xce7 17:44:20 reflect.Value.Call({0x192b0c0?, 0xc0000d3ec0?, 0xc02b05bc50?}, {0xc011597950?, 0xc02d8129d0?, 0x0?}) 17:44:20 reflect/value.go:380 +0xb9 17:44:20 github.com/dop251/goja.(Runtime).newWrappedFunc.(Runtime).wrapReflectFunc.func1({{0x1f63d90, 0xc003696420}, {0xc01f89c8b0, 0x1, 0x5}}) 17:44:20 github.com/dop251/goja@v0.0.0-20230707174833-636fdf960de1/runtime.go:2056 +0x3bd 17:44:20 github.com/dop251/goja.(nativeFuncObject).vmCall(0xc01f89c900, 0xc0017526c0, 0x1) 17:44:20 github.com/dop251/goja@v0.0.0-20230707174833-636fdf960de1/func.go:559 +0x186 17:44:20 github.com/dop251/goja.call.exec(0xe?, 0xc0017526c0) 17:44:20 github.com/dop251/goja@v0.0.0-20230707174833-636fdf960de1/vm.go:3366 +0x66 17:44:20 github.com/dop251/goja.(vm).run(0xc0017526c0) 17:44:20 github.com/dop251/goja@v0.0.0-20230707174833-636fdf960de1/vm.go:582 +0x5b 17:44:20 github.com/dop251/goja.(vm).runTryInner(0xc0017526c0?) 17:44:20 github.com/dop251/goja@v0.0.0-20230707174833-636fdf960de1/vm.go:834 +0x65 17:44:20 github.com/dop251/goja.(baseJsFuncObject).__call(0xc0037b4e40, {0xc02d812980?, 0x1, 0xc009781748?}, {0x0?, 0x0}, {0x1f641b8?, 0x3022b20?}) 17:44:20 github.com/dop251/goja@v0.0.0-20230707174833-636fdf960de1/func.go:426 +0x70f 17:44:20 github.com/dop251/goja.(baseJsFuncObject)._call(...) 17:44:20 github.com/dop251/goja@v0.0.0-20230707174833-636fdf960de1/func.go:442 17:44:20 github.com/dop251/goja.(baseJsFuncObject).call(0xc0097817a0?, {{0x1f641b8, 0x3022b20}, {0xc02d812980, 0x1, 0x1}}, {0x0?, 0x0?}) 17:44:20 github.com/dop251/goja@v0.0.0-20230707174833-636fdf960de1/func.go:450 +0x76 17:44:20 github.com/dop251/goja.(baseJsFuncObject).Call(...) 17:44:20 github.com/dop251/goja@v0.0.0-20230707174833-636fdf960de1/func.go:382 17:44:20 github.com/dop251/goja.AssertFunction.func1.1() 17:44:20 github.com/dop251/goja@v0.0.0-20230707174833-636fdf960de1/runtime.go:2476 +0x71 17:44:20 github.com/dop251/goja.(vm).try(0xc0017526c0, 0xc0097a3980) 17:44:20 github.com/dop251/goja@v0.0.0-20230707174833-636fdf960de1/vm.go:811 +0x25b 17:44:20 github.com/dop251/goja.(Runtime).runWrapped(0xc000b36000, 0x7f56884fb878?) 17:44:20 github.com/dop251/goja@v0.0.0-20230707174833-636fdf960de1/runtime.go:2520 +0x71 17:44:20 github.com/dop251/goja.AssertFunction.func1({0x1f641b8?, 0x3022b20?}, {0xc02d812980?, 0x1?, 0x1?}) 17:44:20 github.com/dop251/goja@v0.0.0-20230707174833-636fdf960de1/runtime.go:2475 +0x8c 17:44:20 go.k6.io/k6/js.(VU).runFn.func2.1() 17:44:20 go.k6.io/k6@v0.46.0/js/runner.go:848 +0x3e 17:44:20 go.k6.io/k6/js/eventloop.(EventLoop).Start(0xc0010ada90, 0xc02b05bb30) 17:44:20 go.k6.io/k6@v0.46.0/js/eventloop/eventloop.go:177 +0x19a 17:44:20 go.k6.io/k6/js.(VU).runFn.func2() 17:44:20 go.k6.io/k6@v0.46.0/js/runner.go:847 +0xdc 17:44:20 go.k6.io/k6/js/common.RunWithPanicCatching({0x1f696f0?, 0xc000083e80?}, 0xc0035ea3c0?, 0xc0097a3bd0?) 17:44:20 go.k6.io/k6@v0.46.0/js/common/util.go:86 +0x7c 17:44:20 go.k6.io/k6/js.(VU).runFn(0xc0037737c0, {0x1f4af18, 0xc02ce98f00}, 0x60?, 0xc011597938, 0xc02d812960, {0xc02d812980, 0x1, 0x1}) 17:44:20 go.k6.io/k6@v0.46.0/js/runner.go:846 +0x287 17:44:20 go.k6.io/k6/js.(ActiveVU).RunOnce(0xc0015a1840) 17:44:20 go.k6.io/k6@v0.46.0/js/runner.go:788 +0x4de 17:44:20 go.k6.io/k6/lib/executor.(RampingVUs).Run.getIterationRunner.func3({0x1f4af18, 0xc005723d60}, {0x1f39120?, 0xc0015a1840?}) 17:44:20 go.k6.io/k6@v0.46.0/lib/executor/helpers.go:81 +0x4a 17:44:20 go.k6.io/k6/lib/executor.(vuHandle).runLoopsIfPossible(0xc0035be120, 0xc000e6c0c0) 17:44:20 go.k6.io/k6@v0.46.0/lib/executor/vu_handle.go:205 +0xe3 17:44:20 created by go.k6.io/k6/lib/executor.(rampingVUsRunState).runLoopsIfPossible in goroutine 341 17:44:20 go.k6.io/k6@v0.46.0/lib/executor/ramping_vus.go:612 +0xec 17:44:20
17:44:20 goroutine 1 [chan receive, 26 minutes]: 17:44:20 go.k6.io/k6/execution.(Scheduler).Run(0xc003a7dc70, {0x1f4af18, 0xc00073d9a0}, {0x1f4aee0, 0xc000720600}, 0xc0054d7680) 17:44:20 go.k6.io/k6@v0.46.0/execution/scheduler.go:472 +0xc6e 17:44:20 go.k6.io/k6/cmd.(cmdRun).run(0xc0008a4458, 0xc000940500, {0xc000932e00?, 0x1, 0x1f}) 17:44:20 go.k6.io/k6@v0.46.0/cmd/run.go:352 +0x1531 17:44:20 github.com/spf13/cobra.(Command).execute(0xc000940500, {0xc000932c00, 0x1f, 0x20}) 17:44:20 github.com/spf13/cobra@v1.4.0/command.go:856 +0x694 17:44:20 github.com/spf13/cobra.(Command).ExecuteC(0xc000914780) 17:44:20 github.com/spf13/cobra@v1.4.0/command.go:974 +0x38d 17:44:20 github.com/spf13/cobra.(Command).Execute(...) 17:44:20 github.com/spf13/cobra@v1.4.0/command.go:902 17:44:20 go.k6.io/k6/cmd.(rootCommand).execute(0xc000703020) 17:44:20 go.k6.io/k6@v0.46.0/cmd/root.go:104 +0x125 17:44:20 go.k6.io/k6/cmd.Execute() 17:44:20 go.k6.io/k6@v0.46.0/cmd/root.go:137 +0x2f 17:44:20 main.main() 17:44:20 k6/main.go:12 +0xf