Skip to content

Modbus Slave RTU crashes after couple of days of working (v1)(IDFGH-15008) #109

Open
@bugrayanik

Description

@bugrayanik

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate
  • Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
  • Tested with the latest version to ensure the issue hasn't been fixed

How often does this bug occurs?

After 2-3 days

Expected behavior

I have an ESP32 device with serial port programmed with ESP IDF, i'm leaving the modbus RTU slave open and expect it to work for days, months without crashing. The test is that there is one modbus master sending 2 requests in 1 second through serial port to the ESP device that use the library. it starts well, I'm watching it works for hours.

Actual behavior (suspected bug)

Two different crashes happened for two different times. I have the core dumps as follows. Both are same experiment, leave the modbus rtu working for days but it lasted for 2-3 days and then crashed.

Error logs or terminal output

1. 

0x40081c1a: panic_abort at D:/Espressif_5_3_1/frameworks/v5.3.1/esp-idf/components/esp_system/panic.c:463
0x4008af19: esp_system_abort at D:/Espressif_5_3_1/frameworks/v5.3.1/esp-idf/components/esp_system/port/esp_system_chip.c:92
0x400931a1: __assert_func at D:/Espressif_5_3_1/frameworks/v5.3.1/esp-idf/components/newlib/assert.c:80
0x400fdba1: eMBRTUSend at D:/Github/KRIO-2S_V5/components/esp-modbus/freemodbus/modbus/rtu/mbrtu.c:225
0x400fe0f5: xMBPortEventGet at D:/Github/KRIO-2S_V5/components/esp-modbus/freemodbus/port/portevent.c:104 (discriminator 1)
0x400fe167: usMBPortSerialRxPoll at D:/Github/KRIO-2S_V5/components/esp-modbus/freemodbus/port/portserial.c:107
0x4008bae2: vPortTaskWrapper at D:/Espressif_5_3_1/frameworks/v5.3.1/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134



2.

--- 0x40081c1a: panic_abort at D:/Espressif_5_3_1/frameworks/v5.3.1/esp-idf/components/esp_system/panic.c:463
0x4008af19: esp_system_abort at D:/Espressif_5_3_1/frameworks/v5.3.1/esp-idf/components/esp_system/port/esp_system_chip.c:92
0x400931a1: __assert_func at D:/Espressif_5_3_1/frameworks/v5.3.1/esp-idf/components/newlib/assert.c:80
0x400fdba1: eMBRTUSend at D:/Github/KRIO-2S_V5/components/esp-modbus/freemodbus/modbus/rtu/mbrtu.c:221
0x400fe0f5: xMBPortEventPost at D:/Github/KRIO-2S_V5/components/esp-modbus/freemodbus/port/portevent.c:96 (discriminator 1)
0x400fe167: usMBPortSerialRxPoll at D:/Github/KRIO-2S_V5/components/esp-modbus/freemodbus/port/portserial.c:92
0x4008bae2: vPortTaskWrapper at D:/Espressif_5_3_1/frameworks/v5.3.1/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134

I (06:30:39.740) CORE_DUMP: [backtrace]Backtrace Depth: 7
I (06:30:39.746) CORE_DUMP: [backtrace]Backtrace Corrupted: No
I (06:30:39.753) CORE_DUMP: [backtrace]Program Counter: 1074273306
I (06:30:39.760) CORE_DUMP: [backtrace]Coredump Version: 258

I (06:30:39.766) CORE_DUMP: Core Dump Summary:
I (06:30:39.771) CORE_DUMP: Exception Task: uart_queue_task
I (06:30:39.778) CORE_DUMP: Exception PC: 0x40081c1a
--- 0x40081c1a: panic_abort at D:/Espressif_5_3_1/frameworks/v5.3.1/esp-idf/components/esp_system/panic.c:463

Steps to reproduce the behavior

leave the modbus RTU slave working

Project release version

1.0.16

System architecture

ARM 64-bit (Apple M1/M2, Raspberry Pi 4/5)

Operating system

MacOS

Operating system version

Sequoia

Shell

ZSH

Additional context

Can you help me what's going on here? Should i switch to the newest version of the library? Are these 2 issues related? What can be the workaround here? Thanks!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions