-
Notifications
You must be signed in to change notification settings - Fork 175
fix: hanging process when TLS alert happens during mqtt_connect (tls_alert)
#286
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
Merged
thalesmg
merged 4 commits into
emqx:master
from
thalesmg:20250626-fix-connack-timeout-again
Jun 27, 2025
Merged
fix: hanging process when TLS alert happens during mqtt_connect (tls_alert)
#286
thalesmg
merged 4 commits into
emqx:master
from
thalesmg:20250626-fix-connack-timeout-again
Jun 27, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…_alert`) Similar to emqx#279 This time, the error is a bit different, but the effect is the same: ``` 18:17:09.437 [info] [reason: {:tls_alert, {:certificate_revoked, ~c"TLS client: In state connection received SERVER ALERT: Fatal - Certificate Revoked\n"}}, msg: ~c"failed_to_send_connect_packet", clientid: "emqtt-erlang-9e2056f5415da439bfce"] ``` ``` Testing apps.emqx.emqx_crl_cache_SUITE: *** FAILED test case 1 *** %%% emqx_crl_cache_SUITE ==> t_revoked: FAILED %%% emqx_crl_cache_SUITE ==> {{case_clause,{error,connack_timeout}}, [{emqx_crl_cache_SUITE,t_revoked,1, [{file,"test/emqx_crl_cache_SUITE.erl"},{line,969}]}, {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1794}]}, {test_server,run_test_case_eval1,6,[{file,"test_server.erl"},{line,1303}]}, {test_server,run_test_case_eval,9,[{file,"test_server.erl"},{line,1235}]}]} ``` Simple to reproduce with a small sleep before `mqtt_connect`: ```diff modified src/emqtt.erl @@ -1032,6 +1032,7 @@ do_connect(ConnMod, #state{pending_calls = Pendings, socket = NewSock, pending_calls = NewPendings }), + timer:sleep(50), case mqtt_connect(State3) of {ok, State4} -> {ok, State4}; ```
thalesmg
added a commit
to thalesmg/emqx
that referenced
this pull request
Jun 26, 2025
See emqx/emqtt#286 https://github.com/emqx/emqx/actions/runs/15908476851/job/44870052354?pr=15436#step:5:532 ``` %%% emqx_crl_cache_SUITE ==> t_revoked: FAILED %%% emqx_crl_cache_SUITE ==> {{case_clause,{error,connack_timeout}}, [{emqx_crl_cache_SUITE,t_revoked,1, [{file,"/__w/emqx/emqx/apps/emqx/test/emqx_crl_cache_SUITE.erl"}, {line,952}]}, {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1794}]}, {test_server,run_test_case_eval1,6,[{file,"test_server.erl"},{line,1303}]}, {test_server,run_test_case_eval,9,[{file,"test_server.erl"},{line,1235}]}]} ```
emqx now uses 27 features (such as triple quote strings in `-doc` attributes), and fails to compile on otp 26.
95d5c0d to
7365129
Compare
keynslug
approved these changes
Jun 27, 2025
|
tagged 1.14.5 |
thalesmg
added a commit
to thalesmg/emqx
that referenced
this pull request
Jun 27, 2025
See emqx/emqtt#286 https://github.com/emqx/emqx/actions/runs/15908476851/job/44870052354?pr=15436#step:5:532 ``` %%% emqx_crl_cache_SUITE ==> t_revoked: FAILED %%% emqx_crl_cache_SUITE ==> {{case_clause,{error,connack_timeout}}, [{emqx_crl_cache_SUITE,t_revoked,1, [{file,"/__w/emqx/emqx/apps/emqx/test/emqx_crl_cache_SUITE.erl"}, {line,952}]}, {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1794}]}, {test_server,run_test_case_eval1,6,[{file,"test_server.erl"},{line,1303}]}, {test_server,run_test_case_eval,9,[{file,"test_server.erl"},{line,1235}]}]} ```
thalesmg
added a commit
to thalesmg/emqx
that referenced
this pull request
Jun 27, 2025
See emqx/emqtt#286 https://github.com/emqx/emqx/actions/runs/15908476851/job/44870052354?pr=15436#step:5:532 ``` %%% emqx_crl_cache_SUITE ==> t_revoked: FAILED %%% emqx_crl_cache_SUITE ==> {{case_clause,{error,connack_timeout}}, [{emqx_crl_cache_SUITE,t_revoked,1, [{file,"/__w/emqx/emqx/apps/emqx/test/emqx_crl_cache_SUITE.erl"}, {line,952}]}, {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1794}]}, {test_server,run_test_case_eval1,6,[{file,"test_server.erl"},{line,1303}]}, {test_server,run_test_case_eval,9,[{file,"test_server.erl"},{line,1235}]}]} ```
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Similar to #279
This time, the error is a bit different, but the effect is the same:
Simple to reproduce with a small sleep before
mqtt_connect: