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 announcing session establishment feature #3970

Merged
merged 2 commits into from
Feb 21, 2023

Conversation

NelsonVides
Copy link
Collaborator

An XMPP client won't try the old session establishment step if it doesn't see it announced in the server features, even when the server is strictly waiting for it, so this would deadlock all connections.

@NelsonVides NelsonVides marked this pull request as draft February 21, 2023 10:28
@mongoose-im

This comment was marked as outdated.

@codecov
Copy link

codecov bot commented Feb 21, 2023

Codecov Report

Base: 83.54% // Head: 83.56% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (62a6af8) compared to base (5fa12c5).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3970      +/-   ##
==========================================
+ Coverage   83.54%   83.56%   +0.01%     
==========================================
  Files         538      538              
  Lines       34007    34009       +2     
==========================================
+ Hits        28412    28419       +7     
+ Misses       5595     5590       -5     
Impacted Files Coverage Δ
src/c2s/mongoose_c2s.erl 87.35% <100.00%> (ø)
src/c2s/mongoose_c2s_stanzas.erl 97.67% <100.00%> (+0.11%) ⬆️
src/pubsub/node_pep.erl 77.77% <0.00%> (-1.86%) ⬇️
src/domain/mongoose_domain_loader.erl 89.28% <0.00%> (-0.90%) ⬇️
src/rdbms/mongoose_rdbms.erl 66.31% <0.00%> (-0.71%) ⬇️
src/mod_muc_log.erl 62.82% <0.00%> (ø)
src/pubsub/mod_pubsub.erl 73.60% <0.00%> (+0.12%) ⬆️
src/pubsub/mod_pubsub_db_mnesia.erl 93.24% <0.00%> (+0.84%) ⬆️
src/mam/mod_mam_muc_rdbms_arch_async.erl 85.71% <0.00%> (+2.85%) ⬆️
src/inbox/mod_inbox_rdbms_async.erl 73.52% <0.00%> (+2.94%) ⬆️
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

An XMPP client won't try the old session establishment step if it doesn't see it
announced in the server features, even when the server is strictly waiting for
it, so this would deadlock all connections.
@mongoose-im
Copy link
Collaborator

mongoose-im commented Feb 21, 2023

small_tests_24 / small_tests / 62a6af8
Reports root / small


small_tests_25 / small_tests / 62a6af8
Reports root / small


ldap_mnesia_24 / ldap_mnesia / 62a6af8
Reports root/ big
OK: 2221 / Failed: 0 / User-skipped: 825 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 62a6af8
Reports root/ big
OK: 4171 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 62a6af8
Reports root/ big
OK: 4551 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / 62a6af8
Reports root/ big
OK: 4145 / Failed: 0 / User-skipped: 114 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 62a6af8
Reports root/ big
OK: 4168 / Failed: 0 / User-skipped: 91 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 62a6af8
Reports root/ big
OK: 4171 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / 62a6af8
Reports root/ big
OK: 2219 / Failed: 2 / User-skipped: 825 / Auto-skipped: 0

graphql_server_SUITE:admin_http:clustering_http_tests:remove_node_test
{error,{{badmatch,{error,econnrefused}},
    [{rest_helper,fusco_request,7,
            [{file,"/home/circleci/project/big_tests/tests/rest_helper.erl"},
             {line,185}]},
     {rest_helper,make_request,1,
            [{file,"/home/circleci/project/big_tests/tests/rest_helper.erl"},
             {line,114}]},
     {rest_helper,make_request,1,
            [{file,"/home/circleci/project/big_tests/tests/rest_helper.erl"},
             {line,121}]},
     {graphql_server_SUITE,remove_node_test,1,
                 [{file,"/home/circleci/project/big_tests/tests/graphql_server_SUITE.erl"},
                {line,210}]},
     {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1291}]},
     {test_server,run_test_case_eval,9,
            [{file,"test_server.erl"},{line,1223}]}]}}

Report log

graphql_server_SUITE:admin_http:clustering_http_tests:stop_node_test
{error,{{badmatch,{error,econnrefused}},
    [{rest_helper,fusco_request,7,
            [{file,"/home/circleci/project/big_tests/tests/rest_helper.erl"},
             {line,185}]},
     {rest_helper,make_request,1,
            [{file,"/home/circleci/project/big_tests/tests/rest_helper.erl"},
             {line,114}]},
     {rest_helper,make_request,1,
            [{file,"/home/circleci/project/big_tests/tests/rest_helper.erl"},
             {line,121}]},
     {graphql_server_SUITE,stop_node_test,1,
                 [{file,"/home/circleci/project/big_tests/tests/graphql_server_SUITE.erl"},
                {line,215}]},
     {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1291}]},
     {test_server,run_test_case_eval,9,
            [{file,"test_server.erl"},{line,1223}]}]}}

Report log


internal_mnesia_25 / internal_mnesia / 62a6af8
Reports root/ big
OK: 2363 / Failed: 0 / User-skipped: 683 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 62a6af8
Reports root/ big
OK: 2579 / Failed: 1 / User-skipped: 654 / Auto-skipped: 0

pubsub_SUITE:dag+basic:subscribe_options_separate_request_test
{error,{{badmatch,false},
    [{pubsub_tools,check_response,2,
             [{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
            {line,491}]},
     {pubsub_tools,receive_response,3,
             [{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
            {line,481}]},
     {pubsub_tools,receive_and_check_response,4,
             [{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
            {line,471}]},
     {pubsub_SUITE,'-subscribe_options_separate_request_test/1-fun-2-',2,
             [{file,"/home/circleci/project/big_tests/tests/pubsub_SUITE.erl"},
            {line,492}]},
     {escalus_story,story,4,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,72}]},
     {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1292}]},
     {test_server,run_test_case_eval,9,
            [{file,"test_server.erl"},{line,1224}]}]}}

Report log


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 62a6af8
Reports root/ big
OK: 2723 / Failed: 0 / User-skipped: 662 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 62a6af8
Reports root/ big
OK: 4551 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / 62a6af8
Reports root/ big
OK: 4537 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / 62a6af8
Reports root/ big
OK: 4548 / Failed: 0 / User-skipped: 100 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / 62a6af8
Reports root/ big
OK: 2221 / Failed: 0 / User-skipped: 825 / Auto-skipped: 0

@NelsonVides NelsonVides marked this pull request as ready for review February 21, 2023 16:23
Copy link
Member

@chrzaszcz chrzaszcz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good ❤️

@chrzaszcz chrzaszcz merged commit 1f80425 into master Feb 21, 2023
@chrzaszcz chrzaszcz deleted the c2s/fix_compatible_session branch February 21, 2023 16:44
@jacekwegr jacekwegr added this to the 6.1.0 milestone Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants