WiPy 2.0 - 1.10.b1 frozen MQTTClient - ValueError: buffer too small



  • Overview

    Hello all,

    I am trying to use the (newish?) frozen MQTT client provided in the 1.10.b1 WiPy 2.0 firmware. After being subscribed to a topic for a while (maybe 20 minutes) and receiving let's say 100-ish messages I get the following error...

    Error stack trace (and some preceding output)

    (2017, 12, 4, 1, 42, 35, 948882, None)
    b'{"task": "wegrowbot.tasks.realtime.test", "id": "e352dc88-07ae-4f6a-bd6b-3f0198d1f6d3", "args": [], "kwargs": {}, "group": null, "retries": 0, "eta": "2017-12-04T01:43:05.413571", "expires": null, "utc": true, "callbacks": null, "errbacks": null, "timelimit": [null,'
    Available RAM: 31712 bytes
    (2017, 12, 4, 1, 42, 50, 458302, None)
    b'{"task": "wegrowbot.tasks.realtime.test", "id": "6ff456e7-24d2-4fee-9b21-3593e71ce77a", "args": [], "kwargs": {}, "group": null, "retries": 0, "eta": "2017-12-04T01:43:20.431799", "expires": null, "utc": true, "callbacks": null, "errbacks": null, "timelimit": [null,'
    Available RAM: 29568 bytes
    Packet sent. (Length: 2)
    Packet sent. (Length: 2)
    (2017, 12, 4, 1, 43, 20, 608361, None)
    b'{"task": "wegrowbot.tasks.realtime.test", "id": "52e2fc60-ff88-4b92-8c88-7662fcb83cc4", "args": [], "kwargs": {}, "group": null, "retries": 0, "eta": "2017-12-04T01:43:50.126385", "expires": null, "utc": true, "callbacks": null, "errbacks": null, "timelimit": [null,'
    Available RAM: 26240 bytes
    Unknown message type: 0
    Unknown message type: 0
    Unhandled exception in thread started by <bound_method>
    Traceback (most recent call last):
    File "MQTTMsgHandler.py", line 261, in _io_thread_func
    File "MQTTMsgHandler.py", line 201, in _receive_packet
    File "MQTTClient.py", line 416, in _recv_callback
    File "MQTTClient.py", line 374, in _parse_publish
    ValueError: buffer too small

    Function source

    I'm not sure if this is an issue with the provided firmware or if I'm creating a memory leak or something else weird. Here's my function source...

    def sub_cb(client, na, msg):
    print(rtc.now())
    print(msg.payload)
    print("Available RAM: ", gc.mem_free(), "bytes")

    #os.uname()

    os.uname()
    (sysname='WiPy', nodename='WiPy', release='1.10.1.b1', version='v1.8.6-839-g536c958c on 2017-11-15', machine='WiPy with ESP32')

    Thanks,
    Keith



  • @rkeiii
    Before start fighting with an error, better is to upgrade to latest firmware
    which is 1.10.2.b1
    and then we will see if problem still exists


 

Pycom on Twitter