emqx / emqtt-bench

Lightweight MQTT benchmark tool written in Erlang
https://www.emqx.com
Apache License 2.0
511 stars 132 forks source link

emqtt_bench doesn't send PINGREQ?? #91

Open JaylinYu opened 3 years ago

JaylinYu commented 3 years ago

when I doing the performance benchmark in the following scenario: I7-6500U 8GB RAM SYSTEM TUNED

with

./emqtt_bench sub -c 2000 -i 50 -t bench/111 -q 0 -k 10

then get:

client(1): EXIT for {disconnected,141,#{}} =ERROR REPORT==== 13-Nov-2020::11:59:07.796452 === State machine <0.4105.0> terminating Last event = {cast,{mqtt_packet,{mqtt_packet_header,14,false,0,false}, {mqtt_packet_disconnect,141,#{}}, undefined}} ** When server state = {connected, {state,undefined,<0.4104.0>,undefined, "localhost",1883,[],emqtt_sock,#Port<0.4005>, [],60000,false, <<"jaylin-Playground_bench_sub_1_1676407926">>, true,undefined,undefined,5,<<"MQTT">>,10,

Ref<0.1272275936.3838312449.192995>,false,

                            false,false,
                            {mqtt_msg,0,false,false,undefined,undefined,
                                undefined,undefined},
                            #{'Maximum-Packet-Size' => 1048576,
                              'Retain-Available' => 1,
                              'Shared-Subscription-Available' => 1,
                              'Subscription-Identifier-Available' => 1,
                              'Topic-Alias-Maximum' => 65535,
                              'Wildcard-Subscription-Available' => 1},
                            [],
                            #{<<"bench/111">> =>
                                  #{nl => 0,qos => 0,rap => 0,rh => 0}},
                            infinity,#{},#{},true,30000,undefined,0,
                            undefined,0,5,
                            {none,#{max_size => 268435455,version => 5}}}}

Reason for termination = exit:{disconnected,141,#{}} Callback mode = state_functions Stacktrace = [{gen_statem,loop_state_callback_result,11, [{file,"gen_statem.erl"},{line,1298}]}, {proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,259}]}]

=CRASH REPORT==== 13-Nov-2020::11:59:07.798331 === crasher: initial call: emqtt:init/1 pid: <0.4105.0> registered_name: [] exception exit: {disconnected,141,#{}} in function gen_statem:loop_state_callback_result/11 (gen_statem.erl, line 1298) ancestors: [<0.4104.0>] message_queue_len: 0 messages: [] links: [<0.4104.0>] dictionary: [{send_oct,76}] trap_exit: true status: running heap_size: 6772 stack_size: 27 reductions: 14923 neighbours:

HJianBo commented 3 years ago

Hi @JaylinYu Which version are you using? We'll try to reproduce it later.