Skip to content
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

Crash when messages are queued due to consecutive messages sent or connection lost (CA-117) #110

Open
rparrozzani opened this issue Feb 15, 2021 · 0 comments

Comments

@rparrozzani
Copy link

Environment

  • Module or chip used: ESP32-WROOM-32D
  • IDF version v4.2-dirty 2nd stage bootloader
  • Build System: idf.py
  • Compiler version 8.4.0
  • Operating System: Windows

Problem Description

It seems to be a problem with the internal message queue of Azure SDK.
If I try to send 2 consecutive message to Azure and the the second is sent before the first one is not yet processed, the system crashes.
A similar thing appens if the connection is lost and the messages are queued and then processed when the system is connected again.

In the logs below the two cases are reported.

Code to reproduce this issue

Basically it is the same code in the iothub_client_sample_mqtt. The only difference is that when "messageTrackingId" reaches 5, two consecutive messages are sent.

if ((MESSAGE_COUNT == 0 || iterator < MESSAGE_COUNT)
	&& iterator <= callbackCounter
	&& (difftime(current_time, sent_time) > ((5000) / 1000)))
{
	temperature = minTemperature + (rand() % 10);
	humidity = minHumidity +  (rand() % 20);
	sprintf_s(msgText, sizeof(msgText), "{\"deviceId\":\"myFirstDevice\",\"windSpeed\":%.2f,\"temperature\":%.2f,\"humidity\":%.2f}", avgWindSpeed + (rand() % 4 + 2), temperature, humidity);
	if ((message.messageHandle = IoTHubMessage_CreateFromByteArray((const unsigned char*)msgText, strlen(msgText))) == NULL)
	{
		(void)printf("ERROR: iotHubMessageHandle is NULL!\r\n");
	}
	else
	{
		message.messageTrackingId = iterator;
		MAP_HANDLE propMap = IoTHubMessage_Properties(message.messageHandle);
		(void)sprintf_s(propText, sizeof(propText), temperature > 28 ? "true" : "false");
		if (Map_AddOrUpdate(propMap, "temperatureAlert", propText) != MAP_OK)
		{
			(void)printf("ERROR: Map_AddOrUpdate Failed!\r\n");
		}

		if (IoTHubClient_LL_SendEventAsync(iotHubClientHandle, message.messageHandle, SendConfirmationCallback, &message) != IOTHUB_CLIENT_OK)
		{
			(void)printf("ERROR: IoTHubClient_LL_SendEventAsync..........FAILED!\r\n");
		}
		else
		{
			time(&sent_time);
			(void)printf("IoTHubClient_LL_SendEventAsync accepted message [%d] for transmission to IoT Hub.\r\n", (int)iterator);
		}

		// CUSTOM
		if (message.messageTrackingId == 5)
		{
			iterator++;
			if (IoTHubClient_LL_SendEventAsync(iotHubClientHandle, message.messageHandle, SendConfirmationCallback, &message) != IOTHUB_CLIENT_OK)
			{
				(void)printf("ERROR: IoTHubClient_LL_SendEventAsync..........FAILED!\r\n");
			}
			else
			{
				time(&sent_time);
				(void)printf("IoTHubClient_LL_SendEventAsync accepted message [%d] for transmission to IoT Hub.\r\n", (int)iterator);
			}
		}
	}
	iterator++;
}

Debug Logs

SCENARIO 1 - CONSECUTIVE MESSAGES

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:4
load:0x3fff0034,len:7028
load:0x40078000,len:13212
load:0x40080400,len:4568
0x40080400: _init at ??:?

entry 0x400806f4
I (29) boot: ESP-IDF v4.2-dirty 2nd stage bootloader
I (29) boot: compile time 11:42:47
I (29) boot: chip revision: 1
I (32) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (39) boot.esp32: SPI Speed      : 40MHz
I (44) boot.esp32: SPI Mode       : DIO
I (49) boot.esp32: SPI Flash Size : 4MB
I (53) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (69) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (77) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (84) boot:  2 factory          factory app      00 00 00010000 00100000
I (92) boot: End of partition table
I (96) boot_comm: chip revision: 1, min. application chip revision: 0
I (103) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x255a4 (152996) map
I (170) esp_image: segment 1: paddr=0x000355cc vaddr=0x3ffb0000 size=0x03a08 ( 14856) load
I (177) esp_image: segment 2: paddr=0x00038fdc vaddr=0x40080000 size=0x00404 (  1028) load
0x40080000: _WindowOverflow4 at C:/esp32/esp-idf/components/freertos/xtensa/xtensa_vectors.S:1730

I (178) esp_image: segment 3: paddr=0x000393e8 vaddr=0x40080404 size=0x06c30 ( 27696) load
I (198) esp_image: segment 4: paddr=0x00040020 vaddr=0x400d0020 size=0x97b94 (621460) map
0x400d0020: _stext at ??:?

I (435) esp_image: segment 5: paddr=0x000d7bbc vaddr=0x40087034 size=0x0e588 ( 58760) load
0x40087034: vRingbufferReturnItem at C:/esp32/esp-idf/components/esp_ringbuf/ringbuf.c:1263 (discriminator 1)

I (473) boot: Loaded app from partition at offset 0x10000
I (473) boot: Disabling RNG early entropy source...
I (473) cpu_start: Pro cpu up.
I (477) cpu_start: Application information:
I (482) cpu_start: Project name:     iothub_client_sample_mqtt
I (488) cpu_start: App version:      v1.0-24-g7c131ae-dirty
I (495) cpu_start: Compile time:     Feb 15 2021 11:42:22
I (501) cpu_start: ELF file SHA256:  738633cc3a067e92...
I (507) cpu_start: ESP-IDF:          v4.2-dirty
I (512) cpu_start: Starting app cpu, entry point is 0x400818a8
0x400818a8: call_start_cpu1 at C:/esp32/esp-idf/components/esp32/cpu_start.c:287

I (0) cpu_start: App cpu up.
I (522) heap_init: Initializing. RAM available for dynamic allocation:
I (529) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (535) heap_init: At 3FFB88C0 len 00027740 (157 KiB): DRAM
I (542) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (548) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (554) heap_init: At 400955BC len 0000AA44 (42 KiB): IRAM
I (560) cpu_start: Pro cpu start user code
I (579) spi_flash: detected chip: generic
I (580) spi_flash: flash io: dio
I (580) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (683) wifi:wifi driver task: 3ffc0ffc, prio:23, stack:6656, core=0
I (683) system_api: Base MAC address is not set
I (683) system_api: read default base MAC address from EFUSE
I (703) wifi:wifi firmware version: 1865b55
I (703) wifi:wifi certification version: v7.0
I (703) wifi:config NVS flash: enabled
I (703) wifi:config nano formating: disabled
I (713) wifi:Init data frame dynamic rx buffer num: 32
I (713) wifi:Init management frame dynamic rx buffer num: 32
I (723) wifi:Init management short buffer num: 32
I (723) wifi:Init dynamic tx buffer num: 32
I (733) wifi:Init static rx buffer size: 1600
I (733) wifi:Init static rx buffer num: 10
I (743) wifi:Init dynamic rx buffer num: 32
I (743) wifi_init: rx ba win: 6
I (743) wifi_init: tcpip mbox: 32
I (753) wifi_init: udp mbox: 6
I (753) wifi_init: tcp mbox: 6
I (753) wifi_init: tcp tx win: 5744
I (763) wifi_init: tcp rx win: 5744
I (763) wifi_init: tcp mss: 1440
I (773) wifi_init: WiFi IRAM OP enabled
I (773) wifi_init: WiFi RX IRAM OP enabled
I (783) azure: Setting WiFi configuration SSID TIM-40467913...
I (873) phy: phy_version: 4500, 0cd6843, Sep 17 2020, 15:37:07, 0, 0
I (873) wifi:mode : sta (24:6f:28:f4:90:90)
I (1003) wifi:new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:11
I (1003) wifi:state: init -> auth (b0)
I (1023) wifi:state: auth -> assoc (0)
I (1033) wifi:state: assoc -> run (10)
I (1053) wifi:connected with TIM-40467913, aid = 4, channel 1, BW20, bssid = 78:81:02:0c:2d:43
I (1053) wifi:security: WPA2-PSK, phy: bgn, rssi: -52
I (1053) wifi:pm start, type: 1

I (1073) wifi:AP's beacon interval = 102400 us, DTIM period = 2
I (7173) esp_netif_handlers: sta ip: 192.168.1.8, mask: 255.255.255.0, gw: 192.168.1.1
I (7173) azure: Connected to AP success!
Initializing SNTP
ESP platform sntp inited!
Time is not set yet. Connecting to WiFi and getting time over NTP. timeinfo.tm_year:70
Waiting for system time to be set... tm_year:0[times:1]
Waiting for system time to be set... tm_year:70[times:2]
I (11193) platform: The current date/time is: Mon Feb 15 11:03:43 2021
IoTHubClient_LL_SetMessageCallback...successful.
IoTHubClient_LL_SendEventAsync accepted message [0] for transmission to IoT Hub.
-> 11:03:46 CONNECT | VER: 4 | KEEPALIVE: 240 | FLAGS: 192 | USERNAME: XXXXXXXXXX/YYYYYYYYYYYYYYYYYYYYY/?api-version=2019-10-01&DeviceClientType=iothubclient%2f1.4.1%20(native%3b%20freertos%3b%20esp%20platform) | PWD: XXXX | CLEAN: 0
<- 11:03:46 CONNACK | SESSION_PRESENT: true | RETURN_CODE: 0x0


Connection Status result:IOTHUB_CLIENT_CONNECTION_AUTHENTICATED, Connection Status reason: IOTHUB_CLIENT_CONNECTION_OK

-> 11:03:46 SUBSCRIBE | PACKET_ID: 2 | TOPIC_NAME: devices/YYYYYYYYYYYYYYYYYYYYY/messages/devicebound/# | QOS: 1
-> 11:03:46 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_LEAST_ONCE | TOPIC_NAME: devices/YYYYYYYYYYYYYYYYYYYYY/messages/events/temperatureAlert=false | PACKET_ID: 3 | PAYLOAD_LEN: 
83
<- 11:03:46 SUBACK | PACKET_ID: 2 | RETURN_CODE: 1
<- 11:03:46 PUBACK | PACKET_ID: 3
Confirmation[0] received for message tracking id = 0 with result = IOTHUB_CLIENT_CONFIRMATION_OK
IoTHubClient_LL_SendEventAsync accepted message [1] for transmission to IoT Hub.
-> 11:03:49 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_LEAST_ONCE | TOPIC_NAME: devices/YYYYYYYYYYYYYYYYYYYYY/messages/events/temperatureAlert=false | PACKET_ID: 4 | PAYLOAD_LEN: 
83
<- 11:03:49 PUBACK | PACKET_ID: 4
Confirmation[1] received for message tracking id = 1 with result = IOTHUB_CLIENT_CONFIRMATION_OK
IoTHubClient_LL_SendEventAsync accepted message [2] for transmission to IoT Hub.
-> 11:03:55 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_LEAST_ONCE | TOPIC_NAME: devices/YYYYYYYYYYYYYYYYYYYYY/messages/events/temperatureAlert=false | PACKET_ID: 5 | PAYLOAD_LEN: 
83
<- 11:03:55 PUBACK | PACKET_ID: 5
Confirmation[2] received for message tracking id = 2 with result = IOTHUB_CLIENT_CONFIRMATION_OK
IoTHubClient_LL_SendEventAsync accepted message [3] for transmission to IoT Hub.
-> 11:04:01 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_LEAST_ONCE | TOPIC_NAME: devices/YYYYYYYYYYYYYYYYYYYYY/messages/events/temperatureAlert=false | PACKET_ID: 6 | PAYLOAD_LEN: 
83
<- 11:04:01 PUBACK | PACKET_ID: 6
Confirmation[3] received for message tracking id = 3 with result = IOTHUB_CLIENT_CONFIRMATION_OK
IoTHubClient_LL_SendEventAsync accepted message [4] for transmission to IoT Hub.
-> 11:04:07 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_LEAST_ONCE | TOPIC_NAME: devices/YYYYYYYYYYYYYYYYYYYYY/messages/events/temperatureAlert=false | PACKET_ID: 7 | PAYLOAD_LEN: 
83
<- 11:04:07 PUBACK | PACKET_ID: 7
Confirmation[4] received for message tracking id = 4 with result = IOTHUB_CLIENT_CONFIRMATION_OK

IoTHubClient_LL_SendEventAsync accepted message [5] for transmission to IoT Hub.
IoTHubClient_LL_SendEventAsync accepted message [6] for transmission to IoT Hub.
-> 11:04:13 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_LEAST_ONCE | TOPIC_NAME: devices/YYYYYYYYYYYYYYYYYYYYY/messages/events/temperatureAlert=false | PACKET_ID: 8 | PAYLOAD_LEN: 
83
-> 11:04:13 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_LEAST_ONCE | TOPIC_NAME: devices/YYYYYYYYYYYYYYYYYYYYY/messages/events/temperatureAlert=false | PACKET_ID: 9 | PAYLOAD_LEN: 
83
<- 11:04:13 PUBACK | PACKET_ID: 8
Confirmation[5] received for message tracking id = 5 with result = IOTHUB_CLIENT_CONFIRMATION_OK
<- 11:04:13 PUBACK | PACKET_ID: 9
Confirmation[6] received for message tracking id = 5 with result = IOTHUB_CLIENT_CONFIRMATION_OK

abort() was called at PC 0x40082ac2 on core 0
0x40082ac2: lock_acquire_generic at C:/esp32/esp-idf/components/newlib/locks.c:142


Backtrace:0x400871d7:0x3ffc6c60 0x40087875:0x3ffc6c80 0x4008e40a:0x3ffc6ca0 0x40082ac2:0x3ffc6d10 0x40082be5:0x3ffc6d40 0x40159919:0x3ffc6d60 0x40155679:0x3ffc7020 0x401555ed:0x3ffc7070 0x4008ad07:0x3ffc70a0 0x4008b00a:0x3ffc70c0 0x400813f2:0x3ffc70e0 0x4008e435:0x3ffc7100 0x400d7cb8:0x3ffc7120 0x400db673:0x3ffc7140 0x400dc22b:0x3ffc7160 0x400d61b0:0x3ffc7180 0x400d906f:0x3ffc71a0 0x400dc696:0x3ffc71c0 0x400dc6dc:0x3ffc71f0 0x400e0ad7:0x3ffc7220 0x400e1481:0x3ffc7250 0x400e20a1:0x3ffc7270 0x400e03ab:0x3ffc7290 0x401642d1:0x3ffc72b0 0x400d6add:0x3ffc7310 0x4016490b:0x3ffc7330 0x400e1376:0x3ffc7350 0x400df74b:0x3ffc7380 0x400dc2a9:0x3ffc73b0 0x400d9649:0x3ffc73d0 0x400d8ac5:0x3ffc7400 0x400d64e9:0x3ffc7420 0x400d6562:0x3ffc7480 0x4008787d:0x3ffc74a0
0x400871d7: panic_abort at C:/esp32/esp-idf/components/esp_system/panic.c:330

0x40087875: esp_system_abort at C:/esp32/esp-idf/components/esp_system/system_api.c:106

0x4008e40a: abort at C:/esp32/esp-idf/components/newlib/abort.c:46

0x40082ac2: lock_acquire_generic at C:/esp32/esp-idf/components/newlib/locks.c:142

0x40082be5: _lock_acquire_recursive at C:/esp32/esp-idf/components/newlib/locks.c:170

0x40159919: _vfiprintf_r at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/newlib/newlib/libc/stdio/vfprintf.c:853 (discriminator 2)

0x40155679: fiprintf at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/newlib/newlib/libc/stdio/fiprintf.c:48

0x401555ed: __assert_func at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/newlib/newlib/libc/stdlib/assert.c:58 (discriminator 8)

0x4008ad07: get_next_block at C:/esp32/esp-idf/components/heap/multi_heap.c:131
 (inlined by) assert_valid_block at C:/esp32/esp-idf/components/heap/multi_heap.c:171

0x4008b00a: multi_heap_free_impl at C:/esp32/esp-idf/components/heap/multi_heap.c:539

0x400813f2: heap_caps_free at C:/esp32/esp-idf/components/heap/heap_caps.c:305

0x4008e435: free at C:/esp32/esp-idf/components/newlib/heap.c:47

0x400d7cb8: Map_Destroy at C:/Y_Data/Y322-20-WiFiOrved/Firmware/esp-azure/esp-azure/azure-iot-sdk-c/c-utility/src/map.c:51 (discriminator 3)

0x400db673: DestroyMessageData at C:/Y_Data/Y322-20-WiFiOrved/Firmware/esp-azure/esp-azure/azure-iot-sdk-c/iothub_client/src/iothub_message.c:91

0x400dc22b: IoTHubMessage_Destroy at C:/Y_Data/Y322-20-WiFiOrved/Firmware/esp-azure/esp-azure/azure-iot-sdk-c/iothub_client/src/iothub_message.c:1079

0x400d61b0: SendConfirmationCallback at C:\Y_Data\Y322-20-WiFiOrved\Firmware\esp-azure\esp-azure\examples\iothub_client_sample_mqtt\build/../main/iothub_client_sample_mqtt.c:121

0x400d906f: IoTHubClientCore_LL_SendComplete at C:/Y_Data/Y322-20-WiFiOrved/Firmware/esp-azure/esp-azure/azure-iot-sdk-c/iothub_client/src/iothub_client_core_ll.c:514

0x400dc696: sendMsgComplete at C:/Y_Data/Y322-20-WiFiOrved/Firmware/esp-azure/esp-azure/azure-iot-sdk-c/iothub_client/src/iothubtransport_mqtt_common.c:607

0x400dc6dc: mqtt_operation_complete_callback at C:/Y_Data/Y322-20-WiFiOrved/Firmware/esp-azure/esp-azure/azure-iot-sdk-c/iothub_client/src/iothubtransport_mqtt_common.c:1711

0x400e0ad7: recvCompleteCallback at C:/Y_Data/Y322-20-WiFiOrved/Firmware/esp-azure/esp-azure/azure-iot-sdk-c/umqtt/src/mqtt_client.c:823

0x400e1481: completePacketData at C:/Y_Data/Y322-20-WiFiOrved/Firmware/esp-azure/esp-azure/azure-iot-sdk-c/umqtt/src/mqtt_codec.c:578

0x400e20a1: mqtt_codec_bytesReceived at C:/Y_Data/Y322-20-WiFiOrved/Firmware/esp-azure/esp-azure/azure-iot-sdk-c/umqtt/src/mqtt_codec.c:1110

0x400e03ab: onBytesReceived at C:/Y_Data/Y322-20-WiFiOrved/Firmware/esp-azure/esp-azure/azure-iot-sdk-c/umqtt/src/mqtt_client.c:473

0x401642d1: dowork_read at C:/Y_Data/Y322-20-WiFiOrved/Firmware/esp-azure/esp-azure/port/src/tlsio_esp_tls.c:409

0x400d6add: tlsio_esp_tls_dowork at C:/Y_Data/Y322-20-WiFiOrved/Firmware/esp-azure/esp-azure/port/src/tlsio_esp_tls.c:493

0x4016490b: xio_dowork at C:/Y_Data/Y322-20-WiFiOrved/Firmware/esp-azure/esp-azure/azure-iot-sdk-c/c-utility/src/xio.c:164

0x400e1376: mqtt_client_dowork at C:/Y_Data/Y322-20-WiFiOrved/Firmware/esp-azure/esp-azure/azure-iot-sdk-c/umqtt/src/mqtt_client.c:1312

0x400df74b: IoTHubTransport_MQTT_Common_DoWork at C:/Y_Data/Y322-20-WiFiOrved/Firmware/esp-azure/esp-azure/azure-iot-sdk-c/iothub_client/src/iothubtransport_mqtt_common.c:3233

0x400dc2a9: IoTHubTransportMqtt_DoWork at C:/Y_Data/Y322-20-WiFiOrved/Firmware/esp-azure/esp-azure/azure-iot-sdk-c/iothub_client/src/iothubtransportmqtt.c:121

0x400d9649: IoTHubClientCore_LL_DoWork at C:/Y_Data/Y322-20-WiFiOrved/Firmware/esp-azure/esp-azure/azure-iot-sdk-c/iothub_client/src/iothub_client_core_ll.c:2122

0x400d8ac5: IoTHubClient_LL_DoWork at C:/Y_Data/Y322-20-WiFiOrved/Firmware/esp-azure/esp-azure/azure-iot-sdk-c/iothub_client/src/iothub_client_ll.c:91

0x400d64e9: iothub_client_sample_mqtt_run at C:\Y_Data\Y322-20-WiFiOrved\Firmware\esp-azure\esp-azure\examples\iothub_client_sample_mqtt\build/../main/iothub_client_sample_mqtt.c:234

0x400d6562: azure_task at C:\Y_Data\Y322-20-WiFiOrved\Firmware\esp-azure\esp-azure\examples\iothub_client_sample_mqtt\build/../main/azure_main.c:85

0x4008787d: vPortTaskWrapper at C:/esp32/esp-idf/components/freertos/xtensa/port.c:143



ELF file SHA256: 738633cc3a067e92

Rebooting...
ets Jun  8 2016 00:22:57

SCENARIO 2 - QUEUED MESSAGES AFTER RECONNECTION

*** RE-CONNECTION AZURE
-> 09:02:11 CONNECT | VER: 4 | KEEPALIVE: 60 | FLAGS: 192 | USERNAME: XXXXXXXXXX//YYYYYYYYYYYYYYYYYYYYY/?api-version=2017-11-08-preview&DeviceClientType=iothubclient%2f1.2.14%20(native%3b%20freertos%3b%20esp%20platform) | PWD: XXXX | CLEAN: 0
<- 09:02:11 CONNACK | SESSION_PRESENT: true | RETURN_CODE: 0x0
I (603077) AZIOTHUB: Status result: IOTHUB_CLIENT_CONNECTION_AUTHENTICATED
Status reason: IOTHUB_CLIENT_CONNECTION_OK

*** SENDING QUEUED MESSAGES
-> 09:02:11 SUBSCRIBE | PACKET_ID: 6 | TOPIC_NAME: devices/esp32-pico-d4/messages/devicebound/# | QOS: 1
-> 09:02:11 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_LEAST_ONCE | TOPIC_NAME: devices/YYYYYYYYYYYYYYYYYYYYY/messages/events/ | PACKET_ID: 7 | PAYLOAD_LEN: 4
-> 09:02:11 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_LEAST_ONCE | TOPIC_NAME: devices/YYYYYYYYYYYYYYYYYYYYY/messages/events/ | PACKET_ID: 8 | PAYLOAD_LEN: 4
-> 09:02:11 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_LEAST_ONCE | TOPIC_NAME: devices/YYYYYYYYYYYYYYYYYYYYY/messages/events/ | PACKET_ID: 9 | PAYLOAD_LEN: 4
<- 09:02:11 SUBACK | PACKET_ID: 6 | RETURN_CODE: 1
<- 09:02:11 PUBACK | PACKET_ID: 7
I (603487) AZIOTHUB: Confirmation[0] received for message tracking id = 5 with result = IOTHUB_CLIENT_CONFIRMATION_OK

<- 09:02:11 PUBACK | PACKET_ID: 8
I (603497) AZIOTHUB: Confirmation[1] received for message tracking id = 5 with result = IOTHUB_CLIENT_CONFIRMATION_OK

assertion "heap != NULL && "free() target pointer is outside heap areas"" failed: file "C:/esp32/esp-idf/components/heap/heap_caps.c", line 267, function: heap_caps_free
abort() was called at PC 0x40172233 on core 0
0x40172233: __assert_func at /builds/idf/crosstool-NG/.build/HOST-i686-w64-mingw32/xtensa-esp32-elf/src/newlib/newlib/libc/stdlib/assert.c:62 (discriminator 8)


ELF file SHA256: 0ffdff3366c1c46a8f0398a2c9c381a0ecaac99f8083ae3896438a7954c722c5

Backtrace: 0x40090645:0x3ffd2bb0 0x400909bd:0x3ffd2bd0 0x40172233:0x3ffd2bf0 0x400824d7:0x3ffd2c20 0x40095e59:0x3ffd2c40 0x400de2fc:0x3ffd2c60 0x400e1b07:0x3ffd2c80 0x400e275b:0x3ffd2ca0 0x400db049:0x3ffd2cc0 0x400df63f:0x3ffd2cf0 0x400e2bae:0x3ffd2d10 0x400e2bf4:0x3ffd2d40 0x400e6c7f:0x3ffd2d70 0x400e75ba:0x3ffd2da0 0x400e8205:0x3ffd2dc0 0x400e65fd:0x3ffd2de0 0x40188991:0x3ffd2e00 0x400dd17d:0x3ffd2e60 0x40188f77:0x3ffd2e80 0x400e74b3:0x3ffd2ea0 0x400e5a82:0x3ffd2ed0 0x400e27c5:0x3ffd2f00 0x400dfbb5:0x3ffd2f20 0x400df0cd:0x3ffd2f50 0x400db2f7:0x3ffd2f70 0x400db346:0x3ffd2fb0 0x40092e91:0x3ffd2fd0
0x40090645: invoke_abort at C:/esp32/esp-idf/components/esp32/panic.c:155

0x400909bd: abort at C:/esp32/esp-idf/components/esp32/panic.c:172
@github-actions github-actions bot changed the title Crash when messages are queued due to consecutive messages sent or connection lost Crash when messages are queued due to consecutive messages sent or connection lost (CA-117) Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant