-
Notifications
You must be signed in to change notification settings - Fork 428
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
Mongoose c2s #3765
Mongoose c2s #3765
Conversation
The flow is as follows: init casts a `connect` message, to indicate the process that it needs to establish the tcp connection, outside of the init function that blocks the supervisor. Then all states are handled in a single handle_event. The event connect in state connecting indicates to end negotiating the connection. The event info with payload from tcp or ssl, regardless of the state, simply parses the payload using exml_stream, and adds all parsed packets as internal action events of the OTP's gen_statem behaviour, that is, they will be processed immediately as the next event in the state machine, without involved message passing. Then, as internal events, all packets are processed, according to their running state machine state. One specific event is expected in that state, and an appropriate handle_* helper does the work. States can be compound, so now instead of sticking data of a specific state into the state-machine memory, we can make it part of the state itself, and it will be used in the next event in that state, see `{wait_for_feature, after auth, _}` and `{wait_for_feature, before_auth, _}`. Code that specifies stanzas is moved to a helper module that construct all the verbose #xmlel{} packets, to keep the c2s module smaller and separate protocol from state machine.
As connections are inherently long-lived, we'd want to avoid the possibility of an attacker opening many connections that then only very slowly progress, taking ports and memory from the system. If the connection doesn't make progress fast enough towards the session establishment, it should be dropped. This, of course, is configurable.
Note that gen_hook type now allows to take the type for the function handler, in order to specify stronger types. Note that dialyzer might not be strong enough to identify this polymorphism, but it might probably be in the future, as well as different tools like Gradualizer. Also mongoose_acc uses erlang:system_time/1 instead of the os equivalent, to better resist time warps and also for performance, and likewise such time is later used to calculate a metric for the time the message took to be handled. Now, all c2s handling stanzas will be captured and handled in hooks, and mongoose_acc will be a universal accumulator.
Set a separate module, with its own edoc comments, all events that are to be triggered by mongoose_c2s.
The idea is that hooks now can request the gen_statem engine to do things on return, like putting payloads on the socket to deliver to the user, adding timeouts to the engine, adding ad-hoc events to be triggered by the engine (see gen_statem's next_event action), or pushing a new callback module to take control over the state machine. This accumulator, specific to the statem engine, is embedded into the mongoose_acc map, and then parsed and acted upon on all hook and handle_event returns.
This includes handling fast_tls, cleaning the declared types to avoid confusion between what is a 'state' and what is 'data' in the context of a state machine, implementing the language callbacks, bouncing messages on termination, and adding an interface to handle handlers.
Prepare all knowledge of the tls configuration, whether to use ranch's reuseport extension, and pass to ranch all other parameters that were present in the c2s listener config.
C2s/enable all suites This PR enabled the last test suite: tcp_listener_SUITE. It was testing an issue with a c2s connection breaking while it was being accepted by mongoose_tcp_listener. Now c2s connections are handled by the ranch acceptor, which does not seem to have such an issue (I checked the code). However, s2s and component (service) listeners still might suffer from the issue, so the updated test ensures that both are working correctly.
This comment was marked as outdated.
This comment was marked as outdated.
Routing should be done only for stanzas. Arbitrary messages shouldn't be sent this way - they are already sent directly in multiple places.
The events are tagged to encourage meaningful and consistent categories, and prevent evnts like '{item, _, _}' which are hard to debug.
C2s/Do not route broadcast tuples
This comment was marked as outdated.
This comment was marked as outdated.
Fixing bug in mongoose_metrics_hooks
This comment was marked as outdated.
This comment was marked as outdated.
This was untested, and actually not working with mongoose_c2s. Also: - Do setup/teardown in init/end_per_testcase instead of doing it in the test case. - Do not setup/teardown inside parallel tests.
Previously the handlers were installed with the access rules themselves, what caused: - Possible duplication of handlers in case of same rules. - Running all handlers sequentially, effectively performing an intersection of all rules instead of applying rules for a given listener. Now the handlers are installed with the listener ID's, and for each new session these ID's are compared with the c2s data, resulting in only the right handler being executed. The access rules can be just extracted from the c2s data itself.
C2s/fix listener access hook
This comment was marked as outdated.
This comment was marked as outdated.
small_tests_24 / small_tests / 8f20f7f small_tests_25 / small_tests / 8f20f7f ldap_mnesia_24 / ldap_mnesia / 8f20f7f dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 8f20f7f ldap_mnesia_25 / ldap_mnesia / 8f20f7f dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 8f20f7f pgsql_mnesia_24 / pgsql_mnesia / 8f20f7f dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 8f20f7f inbox_extensions_SUITE:regular:one_to_one:pagination:max_queries_can_be_limited{error,
{timeout_when_waiting_for_stanza,
[{escalus_client,wait_for_stanza,
[{client,
<<"[email protected]/res1">>,
escalus_tcp,<0.13130.1>,
[{event_manager,<0.13086.1>},
{server,<<"domain.example.com">>},
{username,<<"bOb_max_queries_can_be_limited_1533">>},
{resource,<<"res1">>}],
[{event_client,
[{event_manager,<0.13086.1>},
{server,<<"domain.example.com">>},
{username,<<"bOb_max_queries_can_be_limited_1533">>},
{resource,<<"res1">>}]},
{resource,<<"res1">>},
{username,<<"bob_max_queries_can_be_limited_1533">>},
{server,<<"domain.example.com">>},
{host,<<"localhost">>},
{port,5222},
{auth,{escalus_auth,auth_plain}},
{wspath,undefined},
{username,<<"bOb_max_queries_can_be_limited_1533">>},
{server,<<"domain.example.com">>},
{host,<<"localhost">>},
{password,<<"makrolika">>},
{stream_id,<<"6884d926710fe09c">>}]},
5000],
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
{line,136}]},
{inbox_helper,'-given_conversations_between/2-fun-1-',4,
[{file,"/home/circleci/project/big_tests/tests/inbox_helper.erl"},
{line,543}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1350}]},
{in... inbox_extensions_SUITE:regular:one_to_one:pagination:max_queries_can_fetch_ahead{error,
{timeout_when_waiting_for_stanza,
[{escalus_client,wait_for_stanza,
[{client,
<<"[email protected]/res1">>,
escalus_tcp,<0.13135.1>,
[{event_manager,<0.13121.1>},
{server,<<"domain.example.com">>},
{username,<<"bOb_max_queries_can_fetch_ahead_1538">>},
{resource,<<"res1">>}],
[{event_client,
[{event_manager,<0.13121.1>},
{server,<<"domain.example.com">>},
{username,<<"bOb_max_queries_can_fetch_ahead_1538">>},
{resource,<<"res1">>}]},
{resource,<<"res1">>},
{username,<<"bob_max_queries_can_fetch_ahead_1538">>},
{server,<<"domain.example.com">>},
{host,<<"localhost">>},
{port,5222},
{auth,{escalus_auth,auth_plain}},
{wspath,undefined},
{username,<<"bOb_max_queries_can_fetch_ahead_1538">>},
{server,<<"domain.example.com">>},
{host,<<"localhost">>},
{password,<<"makrolika">>},
{stream_id,<<"cf9b02e86d092d3d">>}]},
5000],
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
{line,136}]},
{inbox_helper,'-given_conversations_between/2-fun-1-',4,
[{file,"/home/circleci/project/big_tests/tests/inbox_helper.erl"},
{line,543}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1350}]},
... inbox_extensions_SUITE:regular:one_to_one:pagination:can_paginate_backwards{error,
{timeout_when_waiting_for_stanza,
[{escalus_client,wait_for_stanza,
[{client,
<<"[email protected]/res1">>,
escalus_tcp,<0.13136.1>,
[{event_manager,<0.13114.1>},
{server,<<"domain.example.com">>},
{username,<<"bOb_can_paginate_backwards_1537">>},
{resource,<<"res1">>}],
[{event_client,
[{event_manager,<0.13114.1>},
{server,<<"domain.example.com">>},
{username,<<"bOb_can_paginate_backwards_1537">>},
{resource,<<"res1">>}]},
{resource,<<"res1">>},
{username,<<"bob_can_paginate_backwards_1537">>},
{server,<<"domain.example.com">>},
{host,<<"localhost">>},
{port,5222},
{auth,{escalus_auth,auth_plain}},
{wspath,undefined},
{username,<<"bOb_can_paginate_backwards_1537">>},
{server,<<"domain.example.com">>},
{host,<<"localhost">>},
{password,<<"makrolika">>},
{stream_id,<<"fa27760d1865b305">>}]},
5000],
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
{line,136}]},
{inbox_helper,'-given_conversations_between/2-fun-1-',4,
[{file,"/home/circleci/project/big_tests/tests/inbox_helper.erl"},
{line,543}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1350}]},
{inbox_extensions_SUITE... inbox_extensions_SUITE:regular:one_to_one:pagination:pagination_overrides_form{error,
{timeout_when_waiting_for_stanza,
[{escalus_client,wait_for_stanza,
[{client,
<<"[email protected]/res1">>,
escalus_tcp,<0.13137.1>,
[{event_manager,<0.13107.1>},
{server,<<"domain.example.com">>},
{username,<<"bOb_pagination_overrides_form_1536">>},
{resource,<<"res1">>}],
[{event_client,
[{event_manager,<0.13107.1>},
{server,<<"domain.example.com">>},
{username,<<"bOb_pagination_overrides_form_1536">>},
{resource,<<"res1">>}]},
{resource,<<"res1">>},
{username,<<"bob_pagination_overrides_form_1536">>},
{server,<<"domain.example.com">>},
{host,<<"localhost">>},
{port,5222},
{auth,{escalus_auth,auth_plain}},
{wspath,undefined},
{username,<<"bOb_pagination_overrides_form_1536">>},
{server,<<"domain.example.com">>},
{host,<<"localhost">>},
{password,<<"makrolika">>},
{stream_id,<<"6a40f5b74af71f4e">>}]},
5000],
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
{line,136}]},
{inbox_helper,'-given_conversations_between/2-fun-1-',4,
[{file,"/home/circleci/project/big_tests/tests/inbox_helper.erl"},
{line,543}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1350}]},
{inbox_e... inbox_extensions_SUITE:regular:one_to_one:pagination:can_paginate_forwards{error,
{timeout_when_waiting_for_stanza,
[{escalus_client,wait_for_stanza,
[{client,
<<"[email protected]/res1">>,
escalus_tcp,<0.13139.1>,
[{event_manager,<0.13093.1>},
{server,<<"domain.example.com">>},
{username,<<"kate_can_paginate_forwards_1534">>},
{resource,<<"res1">>}],
[{event_client,
[{event_manager,<0.13093.1>},
{server,<<"domain.example.com">>},
{username,<<"kate_can_paginate_forwards_1534">>},
{resource,<<"res1">>}]},
{resource,<<"res1">>},
{username,<<"kate_can_paginate_forwards_1534">>},
{server,<<"domain.example.com">>},
{host,<<"localhost">>},
{port,5222},
{auth,{escalus_auth,auth_plain}},
{wspath,undefined},
{username,<<"kate_can_paginate_forwards_1534">>},
{server,<<"domain.example.com">>},
{host,<<"localhost">>},
{password,<<"makrowe;p">>},
{stream_id,<<"562af4e842958a8e">>}]},
5000],
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
{line,136}]},
{inbox_helper,'-given_conversations_between/2-fun-1-',4,
[{file,"/home/circleci/project/big_tests/tests/inbox_helper.erl"},
{line,543}]},
{lists,foldl_1,3,[{file,"lists.erl"},{line,1355}]},
{inbox_extensions_SUI... muc_SUITE:hibernation:hibernated_room_can_be_queried_for_archive{error,{{assertion_failed,assert,is_groupchat_message,
[<<"Restorable message">>],
undefined,"undefined"},
[{escalus_new_assert,assert_true,2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
{line,84}]},
{muc_SUITE,wait_for_mam_result,3,
[{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
{line,4394}]},
{muc_SUITE,'-hibernated_room_can_be_queried_for_archive/1-fun-0-',3,
[{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
{line,4130}]},
{escalus_story,story,4,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{muc_SUITE,hibernated_room_can_be_queried_for_archive,1,
[{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
{line,4126}]},
{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}]}]}} internal_mnesia_25 / internal_mnesia / 8f20f7f elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 8f20f7f riak_mnesia_24 / riak_mnesia / 8f20f7f graphql_server_SUITE:admin_http:clustering_http_tests:remove_dead_from_cluster_http{error,
{{badrpc,
{'EXIT',
{{try_clause,
{badrpc,{'EXIT',{aborted,{no_exists,node,storage_type}}}}},
[{mongoose_cluster,table_type,2,
[{file,"/home/circleci/project/src/mongoose_cluster.erl"},
{line,158}]},
{mongoose_cluster,'-unsafe_join/2-lc$^0/1-0-',2,
[{file,"/home/circleci/project/src/mongoose_cluster.erl"},
{line,119}]},
{mongoose_cluster,unsafe_join,2,
[{file,"/home/circleci/project/src/mongoose_cluster.erl"},
{line,120}]},
{mongoose_cluster,with_app_stopped,2,
[{file,"/home/circleci/project/src/mongoose_cluster.erl"},
{line,221}]},
{global,trans,4,[{file,"global.erl"},{line,463}]},
{mongoose_cluster,join,1,[]}]}}},
[{distributed_helper,rpc,
[#{node => mongooseim3@localhost,timeout => 60000},
mongoose_cluster,join,
[mongooseim@localhost]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{graphql_server_SUITE,remove_dead_from_cluster_http,1,
[{file,
"/home/circleci/project/big_tests/tests/graphql_server_SUITE.erl"},
{line,247}]},
{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}]}]}} pgsql_mnesia_25 / pgsql_mnesia / 8f20f7f mysql_redis_25 / mysql_redis / 8f20f7f mssql_mnesia_25 / odbc_mssql_mnesia / 8f20f7f inbox_extensions_SUITE:async_pools:one_to_one:mute_muted_entry_gets_unmuted{error,
{{assert,
[{module,inbox_extensions_SUITE},
{line,882},
{expression,"escalus_pred : is_message ( Message )"},
{expected,true},
{value,false}]},
[{inbox_extensions_SUITE,check_message_with_properties,4,
[{file,
"/home/circleci/project/big_tests/tests/inbox_extensions_SUITE.erl"},
{line,882}]},
{inbox_extensions_SUITE,set_inbox_properties,4,
[{file,
"/home/circleci/project/big_tests/tests/inbox_extensions_SUITE.erl"},
{line,876}]},
{inbox_extensions_SUITE,'-mute_muted_entry_gets_unmuted/1-fun-2-',2,
[{file,
"/home/circleci/project/big_tests/tests/inbox_extensions_SUITE.erl"},
{line,575}]},
{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,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}]}]}} dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 8f20f7f mssql_mnesia_25 / odbc_mssql_mnesia / 8f20f7f riak_mnesia_24 / riak_mnesia / 8f20f7f riak_mnesia_24 / riak_mnesia / 8f20f7f riak_mnesia_24 / riak_mnesia / 8f20f7f graphql_server_SUITE:admin_http:clustering_http_tests:remove_dead_from_cluster_http{error,
{{badrpc,
{'EXIT',
{badarg,
[{persistent_term,get,
[{mongoose_config,listen}],
[{error_info,#{module => erl_erts_errors}}]},
{mongoose_config,get_opt,1,
[{file,
"/home/circleci/project/src/config/mongoose_config.erl"},
{line,118}]}]}}},
[{distributed_helper,rpc,
[#{node => mongooseim@localhost},mongoose_config,get_opt,[listen]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{graphql_helper,get_listener_config,2,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,143}]},
{graphql_helper,get_listener_opts,1,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,198}]},
{graphql_helper,make_admin_creds,2,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,114}]},
{graphql_helper,execute_auth,3,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,103}]},
{graphql_server_SUITE,remove_dead_from_cluster_http,1,
[{file,
"/home/circleci/project/big_tests/tests/graphql_server_SUITE.erl"},
{line,251}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1292}]}]}} graphql_server_SUITE:admin_http:clustering_http_tests:remove_alive_from_cluster_http{error,
{{badrpc,
{'EXIT',
{#{cluster_member => mongooseim@localhost,
reason => set_extra_db_nodes_failed,
result => {ok,[]}},
[{mongoose_cluster,set_extra_db_nodes,1,
[{file,"/home/circleci/project/src/mongoose_cluster.erl"},
{line,132}]},
{mongoose_cluster,unsafe_join,2,
[{file,"/home/circleci/project/src/mongoose_cluster.erl"},
{line,116}]},
{mongoose_cluster,with_app_stopped,2,
[{file,"/home/circleci/project/src/mongoose_cluster.erl"},
{line,221}]},
{global,trans,4,[{file,"global.erl"},{line,463}]},
{mongoose_cluster,join,1,[]}]}}},
[{distributed_helper,rpc,
[#{node => mongooseim2@localhost,timeout => 60000},
mongoose_cluster,join,
[mongooseim@localhost]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{graphql_server_SUITE,remove_alive_from_cluster_http,1,
[{file,
"/home/circleci/project/big_tests/tests/graphql_server_SUITE.erl"},
{line,266}]},
{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}]}]}} graphql_server_SUITE:admin_http:clustering_http_tests:remove_node_test{error,
{{badrpc,
{'EXIT',
{badarg,
[{persistent_term,get,
[{mongoose_config,listen}],
[{error_info,#{module => erl_erts_errors}}]},
{mongoose_config,get_opt,1,
[{file,
"/home/circleci/project/src/config/mongoose_config.erl"},
{line,118}]}]}}},
[{distributed_helper,rpc,
[#{node => mongooseim@localhost},mongoose_config,get_opt,[listen]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{graphql_helper,get_listener_config,2,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,143}]},
{graphql_helper,get_listener_opts,1,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,198}]},
{graphql_helper,make_admin_creds,2,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,114}]},
{graphql_helper,execute_auth,3,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,103}]},
{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,1783}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1292}]}]}} graphql_server_SUITE:admin_http:clustering_http_tests:stop_node_test{error,
{{badrpc,
{'EXIT',
{badarg,
[{persistent_term,get,
[{mongoose_config,listen}],
[{error_info,#{module => erl_erts_errors}}]},
{mongoose_config,get_opt,1,
[{file,
"/home/circleci/project/src/config/mongoose_config.erl"},
{line,118}]}]}}},
[{distributed_helper,rpc,
[#{node => mongooseim@localhost},mongoose_config,get_opt,[listen]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{graphql_helper,get_listener_config,2,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,143}]},
{graphql_helper,get_listener_opts,1,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,198}]},
{graphql_helper,make_admin_creds,2,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,114}]},
{graphql_helper,execute_auth,3,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,103}]},
{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,1783}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1292}]}]}} graphql_server_SUITE:admin_cli:init_per_group{'EXIT',
{{badrpc,
{'EXIT',
{noproc,{gen_server,call,[admin_schema_ep,get_endpoint_ctx]}}}},
[{distributed_helper,rpc,
[#{node => mongooseim@localhost},
mongoose_graphql_commands,build_specs,
[admin]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{graphql_helper,add_specs,1,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,181}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1380}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1224}]}]}} graphql_server_SUITE:end_per_suite{error,
{{badrpc,
{'EXIT',
{badarg,
[{persistent_term,get,
[{mongoose_config,{modules,<<"localhost">>}}],
[{error_info,#{module => erl_erts_errors}}]},
{mongoose_config,get_opt,1,
[{file,
"/home/circleci/project/src/config/mongoose_config.erl"},
{line,118}]},
{gen_mod,loaded_modules_with_opts,1,[]}]}}},
[{distributed_helper,rpc,
[#{node => mongooseim@localhost},
gen_mod,loaded_modules_with_opts,
[<<"localhost">>]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{dynamic_modules,restore_modules,3,
[{file,"/home/circleci/project/big_tests/tests/dynamic_modules.erl"},
{line,50}]},
{dynamic_modules,'-restore_modules/2-lc$^0/1-0-',2,
[{file,"/home/circleci/project/big_tests/tests/dynamic_modules.erl"},
{line,45}]},
{dynamic_modules,restore_modules,2,
[{file,"/home/circleci/project/big_tests/tests/dynamic_modules.erl"},
{line,46}]},
{graphql_server_SUITE,end_per_suite,1,
[{file,
"/home/circleci/project/big_tests/tests/graphql_server_SUITE.erl"},
{line,76}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1380}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1224}]}]}} graphql_metric_SUITE:metrics_http:init_per_group{'EXIT',
{{badrpc,
{'EXIT',
{badarg,
[{persistent_term,get,
[{mongoose_config,listen}],
[{error_info,#{module => erl_erts_errors}}]},
{mongoose_config,get_opt,1,
[{file,
"/home/circleci/project/src/config/mongoose_config.erl"},
{line,118}]}]}}},
[{distributed_helper,rpc,
[#{node => mongooseim@localhost},mongoose_config,get_opt,[listen]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{graphql_helper,get_listener_config,2,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,143}]},
{graphql_helper,get_listener_opts,1,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,198}]},
{graphql_helper,init_admin_handler,1,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,150}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1380}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1224}]}]}} graphql_metric_SUITE:metrics_cli:init_per_group{'EXIT',
{{badrpc,
{'EXIT',
{noproc,{gen_server,call,[admin_schema_ep,get_endpoint_ctx]}}}},
[{distributed_helper,rpc,
[#{node => mongooseim@localhost},
mongoose_graphql_commands,build_specs,
[admin]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{graphql_helper,add_specs,1,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,181}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1380}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1224}]}]}} graphql_metric_SUITE:domain_admin_metrics:init_per_group{'EXIT',
{{badrpc,
{'EXIT',
{badarg,
[{ets,lookup,
[mongoose_wpool,{rdbms,<<"localhost">>,default}],
[{error_info,
#{cause => id,module => erl_stdlib_errors}}]},
{mongoose_wpool,get_pool,3,
[{file,
"/home/circleci/project/src/wpool/mongoose_wpool.erl"},
{line,395}]},
{mongoose_wpool,call,4,
[{file,
"/home/circleci/project/src/wpool/mongoose_wpool.erl"},
{line,259}]},
{mongoose_rdbms,sql_transaction,2,[]}]}}},
[{distributed_helper,rpc,
[#{node => mongooseim@localhost},
mongoose_rdbms,sql_transaction,
[<<"localhost">>,fun erlang:yield/0]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{mongoose_helper,is_rdbms_enabled,1,
[{file,"/home/circleci/project/big_tests/tests/mongoose_helper.erl"},
{line,60}]},
{graphql_helper,init_domain_admin_handler,2,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,169}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1380}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1224}]}]}} jingle_SUITE:init_per_suite{'EXIT',
{{badrpc,
{'EXIT',
{#{cluster_member => mongooseim@localhost,
reason => set_extra_db_nodes_failed,
result => {ok,[]}},
[{mongoose_cluster,set_extra_db_nodes,1,
[{file,"/home/circleci/project/src/mongoose_cluster.erl"},
{line,132}]},
{mongoose_cluster,unsafe_join,2,
[{file,"/home/circleci/project/src/mongoose_cluster.erl"},
{line,116}]},
{mongoose_cluster,with_app_stopped,2,
[{file,"/home/circleci/project/src/mongoose_cluster.erl"},
{line,221}]},
{global,trans,4,[{file,"global.erl"},{line,463}]},
{mongoose_cluster,join,1,[]}]}}},
[{distributed_helper,rpc,
[#{node => mongooseim2@localhost,timeout => 30000},
mongoose_cluster,join,
[mongooseim@localhost]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{distributed_helper,add_node_to_cluster,2,
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,29}]},
{jingle_SUITE,init_per_suite,1,
[{file,"/home/circleci/project/big_tests/tests/jingle_SUITE.erl"},
{line,61}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1380}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1224}]}]}} |
Postponing the merge to master until this PR is load-tested. |
Load test report summary The c2s rework caused no statistically significant changes in performance. A more significant improvement in CPU usage of 1-4% was seen between PR-3394 and PR-3948/PR-3765, i.e. before the c2s rework. This was not investigated any further because it was out of scope of the c2s load tests. One missing metric ( Performed tests:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this feature branch is ready to be merged, all the remaining minor tasks can be continued on master.
This is a feature branch for the new
mongoose_c2s
prototype. The goal is to have all of CI re-enabled and green.Pending are things that were partially inside of the old
ejabberd_c2s
:And tests that used to depend on the internals of
ejabberd_c2s
,ejabberd_c2s_sup
, or the older version ofranch
: