10BC0 fix(jt808): avoid funcation_clause error by HJianBo · Pull Request #14445 · emqx/emqx · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@HJianBo
Copy link
Member
@HJianBo HJianBo commented Dec 19, 2024

Fixes https://emqx.atlassian.net/browse/EMQX-13602

Release version: v/e5.8.4

Before this fix, the connection process will be crashed once it received an invalid message

2024-12-02T07:19:12.404064+00:00 [error] crasher: initial call: emqx_gateway_conn:init/6, pid: <0.82884.0>, registered_name: [], exit: {#{context => function_clause,stacktrace => [{emqx_jt808_channel,msgid,[#{<<"msg">> => <<"hello">>}],[{file,"emqx_jt808_channel.erl"},{line,846}]},{emqx_jt808_channel,'-msgs2frame/2-fun-0-',2,[{file,"emqx_jt808_channel.erl"},{line,401}]},{lists,filtermap_1,2,[{file,"lists.erl"},{line,1661}]},{emqx_jt808_channel,handle_deliver,2,[{file,"emqx_jt808_channel.erl"},{line,380}]},{emqx_gateway_conn,with_channel,3,[{file,"emqx_gateway_conn.erl"},{line,772}]},{emqx_gateway_conn,process_msg,2,[{file,"emqx_gateway_conn.erl"},{line,427}]},{emqx_gateway_conn,handle_recv,3,[{file,"emqx_gateway_conn.erl"},{line,390}]},{proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,251}]}],exception => error},[{emqx_gateway_conn,terminate,2,[{file,"emqx_gateway_conn.erl"},{line,615}]},{proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,251}]}]}, ancestors: [<0.77393.0>,<0.77392.0>,esockd_sup,<0.3526.0>], message_queue_len: 0, messages: [], links: [<0.77393.0>], dictionary: [{recv_pkt,42},{outgoing_pubs,42},{recv_msg,42},{outgoing_bytes,838},{'$logger_metadata$',#{peername => "10.50.3.1:37314",clientid => <<"002319696095">>}},{send_msg,42},{incoming_pubs,42},{guid,{1733123952403744,202254305018820,9}},{send_pkt,42},{incoming_bytes,869}], trap_exit: false, status: running, heap_size: 2586, stack_size: 28, reductions: 853993; neighbours:

Summary

PR Checklist

Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:

  • Added tests for the changes
  • Added property-based tests for code which performs user input validation
  • Changed lines covered in coverage report
  • Change log has been added to changes/(ce|ee)/(feat|perf|fix|breaking)-<PR-id>.en.md files
  • For internal contributor: there is a jira ticket to track this change
  • Created PR to emqx-docs if documentation update is required, or link to a follow-up jira ticket
  • Schema changes are backward compatible

Checklist for CI (.github/workflows) changes

  • If changed package build workflow, pass this action (manual trigger)
  • Change log has been added to changes/ dir for user-facing artifacts update

@HJianBo HJianBo force-pushed the fix_jt808_funcation_clause_error branch from 315383b to 80db0cc Compare December 19, 2024 09:20
@HJianBo HJianBo marked this pull request as ready for review December 19, 2024 12:45
@HJianBo HJianBo requested a review from a team as a code owner December 19, 2024 12:45
@HJianBo HJianBo merged commit ba97820 into emqx:release-58 Dec 23, 2024
197 checks passed
@HJianBo HJianBo deleted the fix_jt808_funcation_clause_error branch December 23, 2024 02:25
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.

3 participants

0