lwIP - A Lightweight TCP/IP stack - Bugs: bug #57734, MQTT broken with muti-segments data
You are not allowed to post comments on this tracker with your current authentication level.
bug #57734: MQTT broken with muti-segments data
Submitter: | David Bourgeois <jaguarondi> | ||
Submitted: | Mon 03 Feb 2020 09:33:19 PM UTC | ||
Category: | apps | Severity: | 3 - Normal |
Item Group: | Crash Error | Status: | None |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Open | Planned Release: | None |
lwIP version: | git head |
Jump to the original submission
Fri 06 Oct 2023 09:42:49 PM UTC, comment #8: |
Deomid Ryabkov <rojer> |
Sat 16 May 2020 01:29:33 PM UTC, comment #7: When data are segmented, mqtt_message_receive() (mqtt.c line 913 on master - 3f47b04f16a874c05def88dcda6b3e0a2d6684ce) fails. It returns -1 because it is a short PUBLISH packet (mqtt.c line 729).
|
Paul RATHGEB <ks156> |
Sun 16 Feb 2020 08:53:10 PM UTC, comment #6: The topic is null-terminated, see mqtt.c line 755. So I think we should keep the last null byte in the test for the topic. I also tried without without checking the last nul byte and it also fails so the problem isn't there.
|
David Bourgeois <jaguarondi> |
Sun 16 Feb 2020 07:58:09 PM UTC, comment #5: For me (testing on windows), the tests fail in test_1_mqtt_incoming_data_cb() called from line 213.
|
Simon Goldschmidt <goldsimon> |
Sun 16 Feb 2020 03:48:57 PM UTC, comment #4: I could reproduce the problem, it comes when the topic ends-up being spread over 2 TCP segments. So I added 3 unit tests in the patch attached, a standard single segment incoming publish, and 2 segmented either in the topic or message.
|
David Bourgeois <jaguarondi> |
Wed 05 Feb 2020 07:09:47 PM UTC, comment #3:
|
Simon Goldschmidt <goldsimon> |
Wed 05 Feb 2020 08:36:13 AM UTC, comment #2:
|
David Bourgeois <jaguarondi> |
Tue 04 Feb 2020 09:14:06 PM UTC, comment #1: I can't find the code you mention in git head. Could you send a proposed patch of how to fix this? |
Simon Goldschmidt <goldsimon> |
Mon 03 Feb 2020 09:33:19 PM UTC, original submission:
I have a "Socket error on client..." since commit #2cc420e linked to bug #55607
|
David Bourgeois <jaguarondi> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 3 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2023-10-06 | rojer | Attached File | - | Added mqtt.patch, #55211 | |
2020-02-16 | jaguarondi | Attached File | - | Added 0001-Add-3-tests-of-incoming-publish_v2.patch, #48422 | |
2020-02-16 | jaguarondi | Attached File | - | Added 0001-Add-3-tests-of-incoming-publish.patch, #48421 |
Powered by Savane 3.13-02a9.
Corresponding source code
Ran into this issue recently. mqtt.patch is my take on the fix: new message parser, zero copy in most cases and using 128 bytes less RAM.