lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #53103] MQTT corrupted mesages


From: David Bourgeois
Subject: [lwip-devel] [bug #53103] MQTT corrupted mesages
Date: Thu, 8 Feb 2018 21:44:48 -0500 (EST)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36

URL:
  <http://savannah.nongnu.org/bugs/?53103>

                 Summary: MQTT corrupted mesages 
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: jaguarondi
            Submitted on: Fri 09 Feb 2018 02:44:47 AM UTC
                Category: apps
                Severity: 3 - Normal
              Item Group: Crash Error
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head

    _______________________________________________________

Details:

In the attached wireshark capture, we can see a series of corrupted messages
in packet 454,  which trigger a disconnection by the broker.

It is difficult to debug, but from what we could gather, it seems that an
ERR_MEM produced by the altcp_write is not handled, and it somehow corrupts
the ring buffer.

The capture has been produced by the following code:


extern mqtt_client_t *mqtt_client;
int ip[4] = {10,192,55,55};
mqtt_connect(ip, "client_test");
char topic[64];
char payload[64];
int  counter=0;
while(1){
    sprintf(topic, "topic/test/%d", counter);
    sprintf(payload, "packet %d", counter);
    mqtt_publish(mqtt_client, topic, payload, strlen(payload), MQTT_QOS_1, 0,
NULL, NULL);        
    ++counter;
    if (counter%10 == 0){
        osDelay(10);
    }
}




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Fri 09 Feb 2018 02:44:47 AM UTC  Name: mqtt_garbage_capture.pcapng.gz 
Size: 13KiB   By: jaguarondi
Wireshark capture of the bug triggered by the example code
<http://savannah.nongnu.org/bugs/download.php?file_id=43211>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?53103>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]