satori-com / mzbench

MZ Benchmarking
BSD 3-Clause "New" or "Revised" License
271 stars 78 forks source link

mqtt tests fail to run #119

Closed syberkitten closed 7 years ago

syberkitten commented 7 years ago

I'm unable to run the mqtt tests by vmq_bench, here is a sample script:

#!benchDL

#######
# Scenario:
# A single subscriber reading from "prefix/clients/#" topic filter
# 1k publisher publishing to exclusive topic "prefix/clients/{client_id}"
# Overall Msg rate: 1k msg/s
# Message Size: 150 random bytes
# Runtime: 5 min
#######

make_install(git = "https://github.com/erlio/vmq_mzbench.git",
             branch = "master")

defaults("pool_size" = 10)

pool(size = 1,
     worker_type = mqtt_worker):

            connect([t(host,"127.0.0.1"),
                    t(port,1883),
                    t(client,"subscriber1"),
                    t(clean_session,true),
                    t(keepalive_interval,60),
                    t(proto_version,4), t(reconnect_timeout,4)
                    ])

            wait(1 sec)
            subscribe("test/clients/#", 0)

pool(size = numvar("pool_size"),
     worker_type = mqtt_worker,
     worker_start = linear(250 rps)):
            connect([t(host,"127.0.0.1"),
                    t(port,1883),
                    t(client,fixed_client_id("pool1", worker_id())),
                    t(clean_session,true),
                    t(keepalive_interval,60),
                    t(proto_version,4), t(reconnect_timeout,4)
                    ])

            set_signal(connect1, 1)
            wait_signal(connect1, numvar("pool_size"))
            wait(5 sec)
            loop(time = 5 min, rate = 1 rpm):
                publish_to_self("test/clients/", random_binary(150), 0)
            disconnect()

(On MacOSX El-Capitan) the result:

18:32:38.615 [error] [mzb_director24_0@127.0.0.1] <0.266.0> Worker <0.272.0> on 'mzb_director24_0@127.0.0.1' has crashed: undef
Stacktrace: [{crypto,rand_bytes,[150],[]},{mzbl_stdlib,random_binary,4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_stdlib.erl"},{line,79}]},{mzbl_interpreter,'-eval/4-fun-0-',4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,19}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{mzbl_interpreter,eval_function,6,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,33}]},{mzbl_interpreter,'-eval/4-fun-0-',4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,19}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{mzbl_loop,k_times,5,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_loop.erl"},{line,316}]}]
18:32:38.787 [error] [mzb_director24_0@127.0.0.1] <0.266.0> Worker <0.277.0> on 'mzb_director24_0@127.0.0.1' has crashed: undef
Stacktrace: [{crypto,rand_bytes,[150],[]},{mzbl_stdlib,random_binary,4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_stdlib.erl"},{line,79}]},{mzbl_interpreter,'-eval/4-fun-0-',4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,19}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{mzbl_interpreter,eval_function,6,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,33}]},{mzbl_interpreter,'-eval/4-fun-0-',4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,19}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{mzbl_loop,k_times,5,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_loop.erl"},{line,316}]}]
18:32:50.609 [error] [mzb_director24_0@127.0.0.1] <0.266.0> Worker <0.282.0> on 'mzb_director24_0@127.0.0.1' has crashed: undef
Stacktrace: [{crypto,rand_bytes,[150],[]},{mzbl_stdlib,random_binary,4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_stdlib.erl"},{line,79}]},{mzbl_interpreter,'-eval/4-fun-0-',4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,19}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{mzbl_interpreter,eval_function,6,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,33}]},{mzbl_interpreter,'-eval/4-fun-0-',4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,19}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{mzbl_loop,k_times,5,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_loop.erl"},{line,316}]}]
18:32:55.859 [error] [mzb_director24_0@127.0.0.1] <0.266.0> Worker <0.287.0> on 'mzb_director24_0@127.0.0.1' has crashed: undef
Stacktrace: [{crypto,rand_bytes,[150],[]},{mzbl_stdlib,random_binary,4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_stdlib.erl"},{line,79}]},{mzbl_interpreter,'-eval/4-fun-0-',4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,19}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{mzbl_interpreter,eval_function,6,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,33}]},{mzbl_interpreter,'-eval/4-fun-0-',4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,19}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{mzbl_loop,k_times,5,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_loop.erl"},{line,316}]}]
18:32:57.125 [error] [mzb_director24_0@127.0.0.1] <0.266.0> Worker <0.280.0> on 'mzb_director24_0@127.0.0.1' has crashed: undef
Stacktrace: [{crypto,rand_bytes,[150],[]},{mzbl_stdlib,random_binary,4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_stdlib.erl"},{line,79}]},{mzbl_interpreter,'-eval/4-fun-0-',4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,19}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{mzbl_interpreter,eval_function,6,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,33}]},{mzbl_interpreter,'-eval/4-fun-0-',4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,19}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{mzbl_loop,k_times,5,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_loop.erl"},{line,316}]}]
18:33:12.620 [error] [mzb_director24_0@127.0.0.1] <0.266.0> Worker <0.270.0> on 'mzb_director24_0@127.0.0.1' has crashed: undef
Stacktrace: [{crypto,rand_bytes,[150],[]},{mzbl_stdlib,random_binary,4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_stdlib.erl"},{line,79}]},{mzbl_interpreter,'-eval/4-fun-0-',4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,19}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{mzbl_interpreter,eval_function,6,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,33}]},{mzbl_interpreter,'-eval/4-fun-0-',4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,19}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{mzbl_loop,k_times,5,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_loop.erl"},{line,316}]}]
18:33:14.421 [error] [mzb_director24_0@127.0.0.1] <0.266.0> Worker <0.274.0> on 'mzb_director24_0@127.0.0.1' has crashed: undef
Stacktrace: [{crypto,rand_bytes,[150],[]},{mzbl_stdlib,random_binary,4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_stdlib.erl"},{line,79}]},{mzbl_interpreter,'-eval/4-fun-0-',4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,19}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{mzbl_interpreter,eval_function,6,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,33}]},{mzbl_interpreter,'-eval/4-fun-0-',4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,19}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{mzbl_loop,k_times,5,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_loop.erl"},{line,316}]}]
18:33:18.267 [error] [mzb_director24_0@127.0.0.1] <0.266.0> Worker <0.276.0> on 'mzb_director24_0@127.0.0.1' has crashed: undef
Stacktrace: [{crypto,rand_bytes,[150],[]},{mzbl_stdlib,random_binary,4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_stdlib.erl"},{line,79}]},{mzbl_interpreter,'-eval/4-fun-0-',4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,19}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{mzbl_interpreter,eval_function,6,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,33}]},{mzbl_interpreter,'-eval/4-fun-0-',4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,19}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{mzbl_loop,k_times,5,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_loop.erl"},{line,316}]}]
18:33:28.107 [error] [mzb_director24_0@127.0.0.1] <0.266.0> Worker <0.290.0> on 'mzb_director24_0@127.0.0.1' has crashed: undef
Stacktrace: [{crypto,rand_bytes,[150],[]},{mzbl_stdlib,random_binary,4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_stdlib.erl"},{line,79}]},{mzbl_interpreter,'-eval/4-fun-0-',4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,19}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{mzbl_interpreter,eval_function,6,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,33}]},{mzbl_interpreter,'-eval/4-fun-0-',4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,19}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{mzbl_loop,k_times,5,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_loop.erl"},{line,316}]}]
18:33:28.948 [error] [mzb_director24_0@127.0.0.1] <0.266.0> Worker <0.286.0> on 'mzb_director24_0@127.0.0.1' has crashed: undef
Stacktrace: [{crypto,rand_bytes,[150],[]},{mzbl_stdlib,random_binary,4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_stdlib.erl"},{line,79}]},{mzbl_interpreter,'-eval/4-fun-0-',4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,19}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{mzbl_interpreter,eval_function,6,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,33}]},{mzbl_interpreter,'-eval/4-fun-0-',4,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,19}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{mzbl_loop,k_times,5,[{file,"/private/tmp/bench_mzbench_api_Liams-MacBook-Pro_1502_30127_632363/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_loop.erl"},{line,316}]}]
15:33:28.964 [error] [ API ] <0.2417.0> Benchmark result: FAILED
10 of 11 workers failed
15:33:29.019 [error] [ API ] <0.2380.0> Stage 'pipeline - running': failed
Benchmark has failed on running with reason:
{benchmark_failed,{workers_failed,10}}

Stacktrace: [{mzb_pipeline,error,2,
                           [{file,"/Users/liam/Documents/dev/1/erlang/mzbench/server/_build/default/deps/mzbench_api/src/mzb_pipeline.erl"},
                            {line,90}]},
             {mzb_pipeline,'-handle_cast/2-fun-0-',6,
                           [{file,"/Users/liam/Documents/dev/1/erlang/mzbench/server/_build/default/deps/mzbench_api/src/mzb_pipeline.erl"},
                            {line,172}]}]
parsifal-47 commented 7 years ago

Hi, looks like you don't have a crypto module in your erlang, it could be checked in a following way:

$ erl
Erlang/OTP 18 [erts-7.3.1] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Eshell V7.3.1  (abort with ^G)
1> crypto:rand_bytes(2).
<<"×"/utf8>>
2>

installation depend on how you got erlang, most probably, you need to install additional packages with your package manager like yum install erlang-crypto or build your sources with --with-ssl

parsifal-47 commented 7 years ago

closing by timeout, please feel free to reopen or create any additional issues