Hi everyone,
we use docker-mender-convert (v5.1.0) on an Raspbian(Debian 12, Bookworm) image for a Raspberry Pi 3B which works without any problems.
Problem
During operation the system is executing the service mender-updated and fails during processing the inventory scripts with a C++ “malloc(): unsorted double linked list corrupted“-error:
Mar 16 12:15:03 connector systemd[1]: mender-data-dir.service - Mender persistent data dir was skipped because of an unmet condition check (ConditionPathExists=!/data/mender).
Mar 16 12:15:03 connector systemd[1]: Started mender-updated.service - Mender OTA update service.
Mar 16 12:15:03 connector systemd[1]: systemquery.service: Deactivated successfully.
Mar 16 12:15:03 connector systemd[1]: Finished systemquery.service - systemquery.
Mar 16 12:15:03 connector CRON[20999]: pam_unix(cron:session): session closed for user root
Mar 16 12:15:03 connector mender-update[21259]: record_id=1 severity=info time="2026-Mar-16 12:15:03.351876" name="Global" msg="Running Mender client 5.0.3"
Mar 16 12:15:03 connector mender-update[21259]: record_id=2 severity=info time="2026-Mar-16 12:15:03.352291" name="Global" msg="The update client daemon is now ready to handle incoming deployments"
Mar 16 12:15:03 connector mender-update[21259]: record_id=3 severity=info time="2026-Mar-16 12:15:03.361873" name="Global" msg="Running State Script: /etc/mender/scripts/Sync_Enter_01_connection-check"
Mar 16 12:15:04 connector mender-update[21259]: malloc(): unsorted double linked list corrupted
Mar 16 12:15:04 connector systemd[1]: mender-updated.service: Main process exited, code=killed, status=6/ABRT
Mar 16 12:15:04 connector systemd[1]: mender-updated.service: Failed with result 'signal'.
Mar 16 12:15:04 connector systemd[1]: mender-updated.service: Scheduled restart job, restart counter is at 7.
Mar 16 12:15:04 connector systemd[1]: Stopped mender-updated.service - Mender OTA update service.
We tested the Mender client 5.0.4 as well as 5.0.3 and the client is never able to connect to the server and the system stops the service for good after 5 restart tries.
We used Mender up until now with the same custom inventory scripts and client v3.5.0, but since updating to 5.0.x we get consistently the malloc()-error. Non of our key/value-pairs are excessively large or use protected keys and worked under client v3.5.0.
What we tested
- We made sure that non of our custom script failed and restarted the service. (failed)
- We cleared the mender-store and restarted the service. (failed)
- We moved all inventory scripts (custom and Mender) manually to a backup folder and restarted the mender-updated.service. (success)
Further investigation
We copied the the scripts manually one by one back into the folder and restarted the mender-updated.service. We did this for every file and we tried this process multiple times in a different order. The error reappeared randomly and not after a specific script.
- Once the crash happened after coping the last inventory script.
- Once after coping only half of the scripts.
- Once crashing after coping the last script, but upon commenting out random key/value-pairs the service was starting again and connecting to the server.
Sadly we can not recognize any pattern which would help with the investigation. If anyone could give advice on this issue we would highly appreciate it.