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

Fix drain the session process mailbox handling error #2373

Merged
merged 1 commit into from Mar 28, 2019

Conversation

@HJianBo
Copy link
Member

HJianBo commented Mar 27, 2019

For to resolve #2366.

The session process will crash at handling many messages {dispatch, Topic, Msgs} in a moment:

** Reason for termination ==
** {function_clause,
       [{emqx_session,'-maybe_ack_shared/2-fun-0-',
            [{message,
                 <<0,5,133,6,74,242,172,20,244,67,1,0,125,135,5,249>>,
                 0,<<"some_client_id">>,
                 #{dup => false,retain => true},
                 #{allow_publish => true,retained => true,
                   username => <<"username">>},
                 <<"topic">>, <<"payload_data_on_there">>,
                 {1553,636957,269012}},
             []],
            [{file,"src/emqx_session.erl"},{line,851}]},
        {emqx_session,'-maybe_ack_shared/2-fun-0-',3,
            [{file,"src/emqx_session.erl"},{line,852}]},
        {lists,foldr,3,[{file,"lists.erl"},{line,1276}]},
        {emqx_session,handle_dispatch,2,
            [{file,"src/emqx_session.erl"},{line,819}]},
        {gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,637}]},
        {gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,711}]},
        {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}
@coveralls

This comment has been minimized.

Copy link

coveralls commented Mar 27, 2019

Pull Request Test Coverage Report for Build 5235

  • 1 of 4 (25.0%) changed or added relevant lines in 1 file are covered.
  • 11 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.3%) to 68.371%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/emqx_session.erl 1 4 25.0%
Files with Coverage Reduction New Missed Lines %
src/emqx_pqueue.erl 1 76.24%
src/emqx_session.erl 3 68.47%
src/emqx_client.erl 7 49.62%
Totals Coverage Status
Change from base Build 5227: -0.3%
Covered Lines: 3383
Relevant Lines: 4948

💛 - Coveralls
@tigercl tigercl merged commit 24f8c3a into develop Mar 28, 2019
2 of 3 checks passed
2 of 3 checks passed
coverage/coveralls Coverage decreased (-0.3%) to 68.371%
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@tigercl tigercl deleted the fix_drain_m_error branch Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.