vesoft-inc / k6-plugin

Apache License 2.0
10 stars 9 forks source link

could not initialize x.js: could not load JS test #49

Closed graph666-2023 closed 1 year ago

graph666-2023 commented 1 year ago

Please check the FAQ documentation before raising an issue

python3 run.py stress run -a xxxx -scenario go.Bar --args='-u 100 -d 3s -o csv=test.csv' -s sf1

Describe the bug (required)

run command as below: scripts/k6 run output/20230817181250/Bar.js -u 100 -d 3s -o csv=test.csv --summary-trend-stats "min,avg,med,max,p(90),p(95),p(99)" --summary-export output/20230817181250/result_100_Bar.json

      /\      |‾‾| /‾‾/   /‾‾/
 /\  /  \     |  |/  /   /  /
/  \/    \    |     (   /   ‾‾\

/ \ | |\ \ | (‾) | / __ \ || __\ ___/ .io

ERRO[0000] panic: runtime error: invalid memory address or nil pointer dereference goroutine 1 [running]: runtime/debug.Stack() runtime/debug/stack.go:24 +0x65 go.k6.io/k6/js/common.RunWithPanicCatching.func1() go.k6.io/k6@v0.45.1/js/common/util.go:82 +0x191 panic({0x1508ea0, 0x274f030}) runtime/panic.go:884 +0x212 github.com/dop251/goja.(Runtime).runWrapped.func1() github.com/dop251/goja@v0.0.0-20230531210528-d7324b2d74f7/runtime.go:2516 +0x185 panic({0x1508ea0, 0x274f030}) runtime/panic.go:884 +0x212 github.com/dop251/goja.(vm).handleThrow(0xc0005a39e0, {0x1508ea0, 0x274f030}) github.com/dop251/goja@v0.0.0-20230531210528-d7324b2d74f7/vm.go:788 +0x497 github.com/dop251/goja.(vm).try.func1() github.com/dop251/goja@v0.0.0-20230531210528-d7324b2d74f7/vm.go:807 +0x45 panic({0x1508ea0, 0x274f030}) runtime/panic.go:884 +0x212 github.com/dop251/goja.(vm).handleThrow(0xc0005a39e0, {0x1508ea0, 0x274f030}) github.com/dop251/goja@v0.0.0-20230531210528-d7324b2d74f7/vm.go:788 +0x497 github.com/dop251/goja.(vm).runTryInner.func1() github.com/dop251/goja@v0.0.0-20230531210528-d7324b2d74f7/vm.go:830 +0x45 panic({0x1508ea0, 0x274f030}) runtime/panic.go:884 +0x212 github.com/vesoft-inc/k6-plugin/pkg/nebulagraph.(GraphPool).Init(0xc0005aa000) github.com/vesoft-inc/k6-plugin@v0.0.0-00010101000000-000000000000/pkg/nebulagraph/client.go:109 +0x3c reflect.Value.call({0x1610240?, 0xc0005aa000?, 0x2541160?}, {0x1711175, 0x4}, {0x27a4b60, 0x0, 0xc002707d10?}) reflect/value.go:584 +0x8c5 reflect.Value.Call({0x1610240?, 0xc0005aa000?, 0x0?}, {0x27a4b60?, 0xc000286840?, 0x4?}) reflect/value.go:368 +0xbc github.com/dop251/goja.(Runtime).wrapReflectFunc.func1({{0x1a3d530, 0xc002250480}, {0xc00242f100, 0x2, 0x8}}) github.com/dop251/goja@v0.0.0-20230531210528-d7324b2d74f7/runtime.go:2056 +0x1da github.com/dop251/goja.(nativeFuncObject).vmCall(0xc000862780, 0xc0005a39e0, 0x2) github.com/dop251/goja@v0.0.0-20230531210528-d7324b2d74f7/func.go:559 +0x1af github.com/dop251/goja.call.exec(0x4?, 0xc0005a39e0) github.com/dop251/goja@v0.0.0-20230531210528-d7324b2d74f7/vm.go:3366 +0x6a github.com/dop251/goja.(vm).run(0xc0005a39e0) github.com/dop251/goja@v0.0.0-20230531210528-d7324b2d74f7/vm.go:582 +0x62 github.com/dop251/goja.(vm).runTryInner(0xc0005a39e0?) github.com/dop251/goja@v0.0.0-20230531210528-d7324b2d74f7/vm.go:834 +0x70 github.com/dop251/goja.(baseJsFuncObject).__call(0xc0006c1a40, {0xc001105360?, 0x2, 0xc001105340?}, {0x0?, 0x0}, {0x1a3d530?, 0xc002247c80?}) github.com/dop251/goja@v0.0.0-20230531210528-d7324b2d74f7/func.go:426 +0x665 github.com/dop251/goja.(baseJsFuncObject).call(...) github.com/dop251/goja@v0.0.0-20230531210528-d7324b2d74f7/func.go:442 github.com/dop251/goja.(baseJsFuncObject).call(0xc0006c1a01?, {{0x1a3d530, 0xc002247c80}, {0xc001105360, 0x2, 0x2}}, {0x0?, 0x0?}) github.com/dop251/goja@v0.0.0-20230531210528-d7324b2d74f7/func.go:450 +0x7a github.com/dop251/goja.(baseJsFuncObject).Call(0xc001105340?, {{0x1a3d530, 0xc002247c80}, {0xc001105360, 0x2, 0x2}}) github.com/dop251/goja@v0.0.0-20230531210528-d7324b2d74f7/func.go:382 +0x45 github.com/dop251/goja.AssertFunction.func1.1() github.com/dop251/goja@v0.0.0-20230531210528-d7324b2d74f7/runtime.go:2476 +0x74 github.com/dop251/goja.(vm).try(0xc0005a39e0, 0xc0027083c8) github.com/dop251/goja@v0.0.0-20230531210528-d7324b2d74f7/vm.go:811 +0x243 github.com/dop251/goja.(Runtime).runWrapped(0xc000090800, 0x7f6ac13a2108?) github.com/dop251/goja@v0.0.0-20230531210528-d7324b2d74f7/runtime.go:2520 +0x7c github.com/dop251/goja.AssertFunction.func1({0x1a3d530?, 0xc002247c80?}, {0xc001105360?, 0x16c0dc0?, 0xc002247c80?}) github.com/dop251/goja@v0.0.0-20230531210528-d7324b2d74f7/runtime.go:2475 +0x92 go.k6.io/k6/js/modules.(cjsModuleInstance).execute(0xc001105300) go.k6.io/k6@v0.45.1/js/modules/cjsmodule.go:46 +0x3c3 go.k6.io/k6/js/modules.(ModuleSystem).Require(0xc000398460, 0xc00059c558?, {0xc0003f1300?, 0xc00059c548?}) go.k6.io/k6@v0.45.1/js/modules/resolution.go:146 +0x11c go.k6.io/k6/js/modules.(ModuleSystem).RunSourceData(0xc000398460, 0xc0005a6ea0) go.k6.io/k6@v0.45.1/js/modules/resolution.go:165 +0xd1 go.k6.io/k6/js.(Bundle).instantiate.func3.1() go.k6.io/k6@v0.45.1/js/bundle.go:309 +0x2d go.k6.io/k6/js/eventloop.(EventLoop).Start(0xc0005b6eb0, 0xc000398500) go.k6.io/k6@v0.45.1/js/eventloop/eventloop.go:177 +0x1bd go.k6.io/k6/js.(Bundle).instantiate.func3() go.k6.io/k6@v0.45.1/js/bundle.go:306 +0xb9 go.k6.io/k6/js/common.RunWithPanicCatching({0x1a41ca0?, 0xc000386e80?}, 0xc00063b3e0?, 0xc000398460?) go.k6.io/k6@v0.45.1/js/common/util.go:86 +0x87 go.k6.io/k6/js.(*Bundle).instantiate(0xc0005f5600, 0xc00063b3e0, 0x0) go.k6.io/k6@v0.45.1/js/bundle.go:305 +0x36b go.k6.io/k6/js.newBundle(, , , {{{0x0, 0x0}}, {{0x0, 0x0}}, {0x0, 0x0}, {{0x0, ...}}, ...}, ...) go.k6.io/k6@v0.45.1/js/bundle.go:117 +0x329 go.k6.io/k6/js.NewBundle(...) go.k6.io/k6@v0.45.1/js/bundle.go:87 go.k6.io/k6/js.New(0xc0005e4800?, 0x5e8?, 0xc00059cc20?) go.k6.io/k6@v0.45.1/js/runner.go:65 +0x5d go.k6.io/k6/cmd.(loadedTest).initializeFirstRunner(0xc0001fd8f0, 0xc0005feb00) go.k6.io/k6@v0.45.1/cmd/test_load.go:126 +0x40f go.k6.io/k6/cmd.loadTest(0xc0005feb00, 0x1510260?, {0xc000199290?, 0xc000536720?, 0xc000534120?}) go.k6.io/k6@v0.45.1/cmd/test_load.go:89 +0x6ce go.k6.io/k6/cmd.loadAndConfigureTest(0x1a2f100?, 0xc0003ab2c0?, {0xc000199290?, 0xc000386e80?, 0xb2620e?}, 0x2554eec?) go.k6.io/k6@v0.45.1/cmd/test_load.go:242 +0x2d go.k6.io/k6/cmd.(cmdRun).run(0xc0005ae3b0, 0xc0004d4280, {0xc000199290?, 0x1, 0xb}) go.k6.io/k6@v0.45.1/cmd/run.go:69 +0x208 github.com/spf13/cobra.(Command).execute(0xc0004d4280, {0xc0001991e0, 0xb, 0xb}) github.com/spf13/cobra@v1.4.0/command.go:856 +0x67c github.com/spf13/cobra.(Command).ExecuteC(0xc000212500) github.com/spf13/cobra@v1.4.0/command.go:974 +0x3bd github.com/spf13/cobra.(Command).Execute(...) github.com/spf13/cobra@v1.4.0/command.go:902 go.k6.io/k6/cmd.(rootCommand).execute(0xc0001b15c0) go.k6.io/k6@v0.45.1/cmd/root.go:104 +0x125 go.k6.io/k6/cmd.Execute() go.k6.io/k6@v0.45.1/cmd/root.go:137 +0x31 main.main() k6/main.go:12 +0x17

Goja stack: ERRO[0000] could not initialize 'output/20230817181250/Bar.js': could not load JS test 'file:///root/NebulaGraph-Bench/output/20230817181250/Bar.js': a panic occurred during JS execution: runtime error: invalid memory address or nil pointer dereference

Your Environments (required)

How To Reproduce(required)

Steps to reproduce the behavior:

Run the stress test with go1.19.12

Expected behavior

Additional context without error

sf1

HarrisChu commented 1 year ago

sorry for that, the latest k6 is incompatible with nebula-bench. you could download the original version manually in nebula-bench/scripts folder with https://github.com/vesoft-inc/k6-plugin/releases/download/v1.1.1/k6-linux-amd64

or wait for my pr in nebula-bench.

HarrisChu commented 1 year ago

https://github.com/nebula-contrib/NebulaGraph-Bench/pull/89/files

QingZ11 commented 1 year ago

@graph666-2023 hi, I have noticed that the issue you created hasn’t been updated for nearly a month, so I have to close it for now. If you have any new updates, you are welcome to reopen this issue anytime.

Thanks a lot for your contribution anyway 😊