Skip to content

[Bug]: some kind of buffer overflow in MQTT? #5136

Description

@jointerCZ

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

INFO | 07:34:56 2085 [mqtt] Attempting to connect directly to MQTT server mqtt.meshtastic.org, port: 1883, username: meshdev, password: large4cats

INFO | 07:34:57 2086 [mqtt] MQTT connected

DEBUG | 07:34:57 2086 [mqtt] Publishing enqueued MQTT message

ERROR | 07:34:57 2086 [mqtt] Panic: can't encode protobuf reason='bytes size exceeded'

Metadata

Metadata

Labels

bugSomething isn't workingtriagedReviewed by the team, has enough information and ready to work on now.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions