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

Allow MQTT to run on Mac OS with OTP 26 #9121

Merged
merged 1 commit into from
Aug 16, 2023
Merged

Allow MQTT to run on Mac OS with OTP 26 #9121

merged 1 commit into from
Aug 16, 2023

Conversation

ansd
Copy link
Member

@ansd ansd commented Aug 16, 2023

On Mac OS M1 and M2 with OTP 26, prior to this commit,
the following test failed:

make -C deps/rabbitmq_mqtt ct-reader t=tests:rabbit_mqtt_qos0_queue_overflow FULL=1

with:

reader_SUITE > tests > rabbit_mqtt_qos0_queue_overflow
    #1. {'EXIT',
            {function_clause,
                {emqtt_frame,parse_packet,
                    [{mqtt_packet_header,7,true,0,false},
                     <<120,120,120,120,120,120,120,120,120,120,120,120,120,120,
                       120,120,120,120,120,120,120,120,120,120,120,120,120,120,
                       120,120,120,120,48,159,31,0,31,114,97,98,98,105,116,95,
                       109,113,116,116,95,113,111,115,48,95,113,117,101,117,
                       101,95,111,118,101,114,102,108,111,119,120,120,120,120,
                       120,120,120,120,120,120,120,120,120,120,120,120,120,120,
                       120,120,120,120,120,120,120,120,120,120,120,120,120,120,
                       120,120,120,120,120,120,120,120,120,120,120,120,120,120,
                       120,120,120,120,120,120>>,
                     #{version => 4,max_size => 268435455,
                       strict_mode => false}],
                    [{file,"src/emqtt_frame.erl"},{line,182}]}}}

This is due to the OTP bug in erlang/otp#7566
Simply exporting the serialise_len/1 fixes this OTP bug.

On Mac OS M1 and M2 with OTP 26, prior to this commit,
the following test failed:
```
make -C deps/rabbitmq_mqtt ct-reader t=tests:rabbit_mqtt_qos0_queue_overflow FULL=1
```
with:
```
reader_SUITE > tests > rabbit_mqtt_qos0_queue_overflow
    #1. {'EXIT',
            {function_clause,
                {emqtt_frame,parse_packet,
                    [{mqtt_packet_header,7,true,0,false},
                     <<120,120,120,120,120,120,120,120,120,120,120,120,120,120,
                       120,120,120,120,120,120,120,120,120,120,120,120,120,120,
                       120,120,120,120,48,159,31,0,31,114,97,98,98,105,116,95,
                       109,113,116,116,95,113,111,115,48,95,113,117,101,117,
                       101,95,111,118,101,114,102,108,111,119,120,120,120,120,
                       120,120,120,120,120,120,120,120,120,120,120,120,120,120,
                       120,120,120,120,120,120,120,120,120,120,120,120,120,120,
                       120,120,120,120,120,120,120,120,120,120,120,120,120,120,
                       120,120,120,120,120,120>>,
                     #{version => 4,max_size => 268435455,
                       strict_mode => false}],
                    [{file,"src/emqtt_frame.erl"},{line,182}]}}}
```

This is due to the OTP bug in erlang/otp#7566
Simply exporting the serialise_len/1 fixes this OTP bug.
@ansd ansd merged commit a712db6 into v3.12.x Aug 16, 2023
14 checks passed
@ansd ansd deleted the mqtt-macos branch August 16, 2023 15:20
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.

2 participants