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
MQTT broker disconnection during large messages leads to endless data events (IDFGH-6859) #8482
Comments
I stumbled over this problem for the same reson as Xtensa2C, while testing for robustness of OTA over MQTT. The problem is in file mqtt_client.c, function
and 1007:
where A quick and dirty solution is forcing a conversion in line 1007:
but this quite hides the problem even more. A better solution is defining |
Sorry, forgot to specify that I'm referring to IDF v4.4 and first found the problem with IDF v4.3-beta3-131. |
@Elledici thanks for reporting. The issues is in process of resolvent and will be fixed soon. |
@david-cermak |
The fix is still not available in any esp-idf branches. |
v4.3.3 does not include this fix. |
* Update submodule: git log --oneline 985078affa8a2d2b56b87c8e6455252850f895c6..27eb4726067465c5c67d4ecdca5ddccd26f02580 Detailed description of the changes: * MQTT: Fix signature matching for integer values (Backport to idf_v4.x) - See merge request espressif/esp-mqtt!133 - Closes #8482 - MQTT: Fix signature matching for integer values (espressif/esp-mqtt@f162002) * ci: Deploy idf_v4.x branch to GitHub (espressif/esp-mqtt@ee5ecad)
@david-cermak v4.3 branch still needs fix. |
* Update submodule: git log --oneline 985078affa8a2d2b56b87c8e6455252850f895c6..27eb4726067465c5c67d4ecdca5ddccd26f02580 Detailed description of the changes: * MQTT: Fix signature matching for integer values (Backport to idf_v4.x) - See merge request espressif/esp-mqtt!133 - Closes #8482 - MQTT: Fix signature matching for integer values (espressif/esp-mqtt@f162002) * ci: Deploy idf_v4.x branch to GitHub (espressif/esp-mqtt@ee5ecad)
* Update submodule: git log --oneline 4874bab..64f88b4 Detailed description of the changes: * Fix documentation of config struct - See merge request espressif/esp-mqtt!129 - See commit e31834c * Changes the moment we update keepalive_tick. - See merge request espressif/esp-mqtt!127 - See commit 2c2e6f3 * MQTT: Fix signature matching for some integer values - See merge request espressif/esp-mqtt!128 - Closes espressif/esp-idf#8482 - MQTT: Fix signature matching for integer values (6b794e4) * Make the mqtt submodule logging tags lower case - See merge request espressif/esp-mqtt!122 - See commit fb3184c Closes espressif/esp-idf#8482 Closes espressif/esp-idf#8550
* Update submodule: git log --oneline 4874bab..64f88b4 Detailed description of the changes: * Fix documentation of config struct - See merge request espressif/esp-mqtt!129 - See commit espressif@e31834c * Changes the moment we update keepalive_tick. - See merge request espressif/esp-mqtt!127 - See commit espressif@2c2e6f3 * MQTT: Fix signature matching for some integer values - See merge request espressif/esp-mqtt!128 - Closes espressif/esp-idf#8482 - MQTT: Fix signature matching for integer values (espressif/esp-mqtt@6b794e4) * Make the mqtt submodule logging tags lower case - See merge request espressif/esp-mqtt!122 - See commit espressif@fb3184c Closes espressif/esp-idf#8482 Closes espressif/esp-idf#8550
* Update submodule: git log --oneline 4874bab..64f88b4 Detailed description of the changes: * Fix documentation of config struct - See merge request espressif/esp-mqtt!129 - See commit espressif@e31834c * Changes the moment we update keepalive_tick. - See merge request espressif/esp-mqtt!127 - See commit espressif@2c2e6f3 * MQTT: Fix signature matching for some integer values - See merge request espressif/esp-mqtt!128 - Closes espressif/esp-idf#8482 - MQTT: Fix signature matching for integer values (espressif/esp-mqtt@6b794e4) * Make the mqtt submodule logging tags lower case - See merge request espressif/esp-mqtt!122 - See commit espressif@fb3184c Closes espressif/esp-idf#8482 Closes espressif/esp-idf#8550
Environment
Problem Description:
While receiving large messages via MQTT with size > MQTT input buffer the data will be split in multiple data events.
However if the connection to the broker is interrupted (e.g. by teminating the broker) after the transfer started no mqtt error will occur but an infinite number of data events is triggered with data size = -1 and the last data received.
Expected Behavior
In case of a connection error an MQTT error event should be triggered and no further data events should occur.
Actual Behavior
The controller is trapped in an infinite loop of data events.
Steps to reproduce
Additional remarks
It has been observed that this error does not occur if the connection is terminated close to the end of the transmission.
Example Code:
Error log after terminating the transfer at the beginning:
Error log after terminating the transfer close to the end:
The text was updated successfully, but these errors were encountered: