-
Notifications
You must be signed in to change notification settings - Fork 964
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
[Bug]: some kind of buffer overflow in MQTT? #5136
Comments
Subjective observation is that during night the device was without reboot, but now it started rebooting again.
|
I have to confirm with 2.5.8 it still remains (as expected). |
I might have spotted something related here. Looks like a potential use-after-free bug. Line 611 in 827553f
I'm not sure that type cast is safe when queuing Callers:
I've been digging around in the MQTT code recently. I'll send a PR to fix. Might be a few days though. |
Category
Other
Hardware
T-Beam S3
Firmware Version
2.5.7
Description
Hello,
I have 2 Lilygo Supreme devices. When I configure WiFi and enable MQTT, the devices randomly reboots.
One device is very close to AP one more far away and based on logs they do not drop connection to wifi.
But I found this in the middle of the serial log, it seems it is randomly loosing connection and reconnects:
INFO | 08:08:44 863 [Router] MQTT not connected, queueing packet
ERROR | 08:08:44 863 [RadioIf] ignoring received packet due to error=-7
DEBUG | 08:08:44 863 [RadioIf] Packet received (noise?) : 170ms
INFO | 08:08:44 863 [mqtt] Using non-TLS-encrypted session
INFO | 08:08:44 863 [mqtt] Attempting to connect directly to MQTT server mqtt.meshtastic.org, port: 1883, username: meshdev, password: large4cats
INFO | 08:08:47 867 [mqtt] MQTT connected
INFO | 08:08:47 867 [mqtt] Subscribing to msh/CZ/2/e/redacted/+
INFO | 08:08:47 867 [mqtt] Subscribing to msh/CZ/2/e/PKI/+
DEBUG | 08:08:47 867 [mqtt] Publishing enqueued MQTT message
However eventually I get a panic due to buffer being full, see log.
It seems this situation is not handled well.
Can I avoid this somehow and keep MQTT? If I connect it to Linux meshtasticd and maybe process MQTT there somehow?
Or is it public server issue?
Relevant log output
The text was updated successfully, but these errors were encountered: