I suspect, the issue is not completely fixed. I still get it, but much lesser. I use the mediainfo library from a Python program to analyse a few 1000 mp3 files and at some point I often get "malloc(): invalid size (unsorted)" and the program crashes.
So I started to run mediainfo with valgrind: $ G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind -v --tool=memcheck --leak-check=full --num-callers=40 --log-file=valgrind_07.log mediainfo "Ablage/Rick Wakeman/Rick Wakeman - No Earthly Connection/07 The Prisoner.mp3" Result: ==600279== Memcheck, a memory error detector ==600279== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al. ==600279== Using Valgrind-3.22.0-bd4db67b1d-20231031 and LibVEX; rerun with -h for copyright info ==600279== Command: mediainfo Ablage/Rick\ Wakeman/Rick\ Wakeman\ -\ No\ Earthly\ Connection/07\ The\ Prisoner.mp3 ==600279== Parent PID: 137285 ==600279== --600279-- --600279-- Valgrind options: --600279-- -v --600279-- --tool=memcheck --600279-- --leak-check=full --600279-- --num-callers=40 --600279-- --log-file=valgrind_07.log --600279-- Contents of /proc/version: --600279-- Linux version 6.8.0-79-generic (buildd@lcy02-amd64-049) (x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, GNU ld (GNU Binutils for Ubuntu) 2.42) #79-Ubuntu SMP PREEMPT_DYNAMIC Tue Aug 12 14:42:46 UTC 2025 --600279-- --600279-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-lzcnt-rdtscp-sse3-ssse3-avx-avx2-bmi-f16c-rdrand --600279-- Page sizes: currently 4096, max supported 4096 --600279-- Valgrind library directory: /usr/libexec/valgrind --600279-- Reading syms from /usr/bin/mediainfo --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 --600279-- Considering /usr/lib/debug/.build-id/28/1ac1521b4102509b1c7ac7004db7c1efb81796.debug .. --600279-- .. build-id is valid --600279-- Reading syms from /usr/libexec/valgrind/memcheck-amd64-linux --600279-- object doesn't have a dynamic symbol table --600279-- Scheduler: using generic scheduler lock implementation. --600279-- Reading suppressions file: /usr/libexec/valgrind/default.supp ==600279== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-600279-by-ich-on-??? ==600279== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-600279-by-ich-on-??? ==600279== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-600279-by-ich-on-??? ==600279== ==600279== TO CONTROL THIS PROCESS USING vgdb (which you probably ==600279== don't want to do, unless you know exactly what you're doing, ==600279== or are doing some strange experiment): ==600279== /usr/bin/vgdb --pid=600279 ...command... ==600279== ==600279== TO DEBUG THIS PROCESS USING GDB: start GDB like this ==600279== /path/to/gdb mediainfo ==600279== and then give GDB the following command ==600279== target remote | /usr/bin/vgdb --pid=600279 ==600279== --pid is optional if only one valgrind process is running ==600279== --600279-- REDIR: 0x4028b00 (ld-linux-x86-64.so.2:strlen) redirected to 0x580c2e1a (???) --600279-- REDIR: 0x40272b0 (ld-linux-x86-64.so.2:index) redirected to 0x580c2e34 (???) --600279-- Reading syms from /usr/libexec/valgrind/vgpreload_core-amd64-linux.so --600279-- Reading syms from /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so ==600279== WARNING: new redirection conflicts with existing -- ignoring it --600279-- old: 0x04028b00 (strlen ) R-> (0000.0) 0x580c2e1a ??? --600279-- new: 0x04028b00 (strlen ) R-> (2007.0) 0x0484f340 strlen --600279-- REDIR: 0x40274e0 (ld-linux-x86-64.so.2:strcmp) redirected to 0x4850460 (strcmp) --600279-- REDIR: 0x4026910 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4853cd0 (mempcpy) --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libmediainfo.so.0.0.0 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libzen.so.0.4.41 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libc.so.6 --600279-- Considering /usr/lib/debug/.build-id/28/2c2c16e7b6600b0b22ea0c99010d2795752b5f.debug .. --600279-- .. build-id is valid --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libz.so.1.3 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.8.0 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libmms.so.0.0.2 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libm.so.6 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libnghttp2.so.14.26.0 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libidn2.so.0.4.0 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/librtmp.so.1 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libssh.so.4.9.6 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libpsl.so.5.3.4 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libnettle.so.8.8 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libgnutls.so.30.37.1 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libldap.so.2.0.200 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/liblber.so.2.0.200 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libzstd.so.1.5.5 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libbrotlidec.so.1.1.0 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libunistring.so.5.0.0 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libhogweed.so.6.8 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libgmp.so.10.5.0 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libcrypto.so.3 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.3.1 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libtasn1.so.6.6.3 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libcom_err.so.2.1 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libbrotlicommon.so.1.1.0 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libffi.so.8.1.4 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libkeyutils.so.1.10 --600279-- Reading syms from /usr/lib/x86_64-linux-gnu/libresolv.so.2 --600279-- REDIR: 0x4028ca0 (ld-linux-x86-64.so.2:strncmp) redirected to 0x484fc90 (strncmp) --600279-- REDIR: 0x54a5050 (libc.so.6:strnlen) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a50e0 (libc.so.6:strpbrk) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a31a0 (libc.so.6:strcmp) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54bc3b0 (libc.so.6:wcsnlen) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a2290 (libc.so.6:memset) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54bbb20 (libc.so.6:wcslen) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x55273c0 (libc.so.6:__memcpy_chk) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a2200 (libc.so.6:memrchr) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54bc350 (libc.so.6:wcsncpy) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a1720 (libc.so.6:memcpy@@GLIBC_2.14) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54ba8e0 (libc.so.6:wcschr) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a3090 (libc.so.6:index) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a5110 (libc.so.6:rindex) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54ba990 (libc.so.6:wcscmp) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a24b0 (libc.so.6:stpncpy) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54c8eb0 (libc.so.6:wmemchr) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a4ef0 (libc.so.6:strncmp) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a2510 (libc.so.6:strcasecmp) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a4310 (libc.so.6:strcspn) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54bb8f0 (libc.so.6:wcscpy) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a3020 (libc.so.6:strcat) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a4df0 (libc.so.6:strncasecmp_l) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a3110 (libc.so.6:strchrnul) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a1630 (libc.so.6:bcmp) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a42a0 (libc.so.6:strcpy) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a25b0 (libc.so.6:strcasecmp_l) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a4cc0 (libc.so.6:strlen) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a4f90 (libc.so.6:strncpy) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54c8f30 (libc.so.6:wmemcmp) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x55274e0 (libc.so.6:__memmove_chk) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) ==600279== WARNING: new redirection conflicts with existing -- ignoring it --600279-- old: 0x055789d0 (__memcpy_chk_avx_una) R-> (2030.0) 0x04853dd0 __memcpy_chk --600279-- new: 0x055789d0 (__memcpy_chk_avx_una) R-> (2024.0) 0x04853740 __memmove_chk --600279-- REDIR: 0x54a2440 (libc.so.6:stpcpy) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a1fc0 (libc.so.6:memmove) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) ==600279== Preferring higher priority redirection: --600279-- old: 0x05578a00 (__memcpy_avx_unalign) R-> (2018.0) 0x04851580 __memcpy_avx_unaligned_erms --600279-- new: 0x05578a00 (__memcpy_avx_unalign) R-> (2018.1) 0x04852d60 memmove --600279-- REDIR: 0x54a15b0 (libc.so.6:memchr) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a52e0 (libc.so.6:strspn) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a20e0 (libc.so.6:mempcpy) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a4d50 (libc.so.6:strncasecmp) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) ==600279== WARNING: new redirection conflicts with existing -- ignoring it --600279-- old: 0x055789d0 (__memcpy_chk_avx_una) R-> (2030.0) 0x04853dd0 __memcpy_chk --600279-- new: 0x055789d0 (__memcpy_chk_avx_una) R-> (2024.0) 0x04853740 __memmove_chk --600279-- REDIR: 0x54a2380 (libc.so.6:rawmemchr) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a5ba0 (libc.so.6:strstr) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) --600279-- REDIR: 0x54a4e90 (libc.so.6:strncat) redirected to 0x483d1c0 (_vgnU_ifunc_wrapper) ==600279== WARNING: new redirection conflicts with existing -- ignoring it --600279-- old: 0x055789d0 (__memcpy_chk_avx_una) R-> (2030.0) 0x04853dd0 __memcpy_chk --600279-- new: 0x055789d0 (__memcpy_chk_avx_una) R-> (2024.0) 0x04853740 __memmove_chk ==600279== WARNING: new redirection conflicts with existing -- ignoring it --600279-- old: 0x055789d0 (__memcpy_chk_avx_una) R-> (2030.0) 0x04853dd0 __memcpy_chk --600279-- new: 0x055789d0 (__memcpy_chk_avx_una) R-> (2024.0) 0x04853740 __memmove_chk --600279-- REDIR: 0x557d5f0 (libc.so.6:__strrchr_avx2) redirected to 0x484ed20 (rindex) --600279-- REDIR: 0x557b740 (libc.so.6:__strlen_avx2) redirected to 0x484f220 (strlen) --600279-- REDIR: 0x557c820 (libc.so.6:__strncmp_avx2) redirected to 0x484fab0 (strncmp) --600279-- REDIR: 0x557ab60 (libc.so.6:__strchr_avx2) redirected to 0x484ef00 (index) --600279-- REDIR: 0x557af90 (libc.so.6:__strcmp_avx2) redirected to 0x4850360 (strcmp) --600279-- REDIR: 0x549d650 (libc.so.6:malloc) redirected to 0x48467b0 (malloc) --600279-- REDIR: 0x55782a0 (libc.so.6:__memcmp_avx2_movbe) redirected to 0x4852480 (bcmp) --600279-- REDIR: 0x55789d0 (libc.so.6:__memcpy_chk_avx_unaligned_erms) redirected to 0x4853dd0 (__memcpy_chk) --600279-- REDIR: 0x549e7a0 (libc.so.6:calloc) redirected to 0x484d8a0 (calloc) --600279-- REDIR: 0x5578a00 (libc.so.6:__memcpy_avx_unaligned_erms) redirected to 0x4852d60 (memmove) --600279-- REDIR: 0x549dd30 (libc.so.6:free) redirected to 0x4849820 (free) --600279-- REDIR: 0x5578000 (libc.so.6:__memchr_avx2) redirected to 0x48504e0 (memchr) --600279-- REDIR: 0x557ce80 (libc.so.6:__strncpy_avx2) redirected to 0x484f4f0 (strncpy) --600279-- REDIR: 0x549e0a0 (libc.so.6:realloc) redirected to 0x484db00 (realloc) --600279-- REDIR: 0x5579400 (libc.so.6:__memset_avx2_unaligned_erms) redirected to 0x4852c50 (memset) --600279-- REDIR: 0x51fd8e0 (libstdc++.so.6:operator new(unsigned long)) redirected to 0x4846f30 (operator new(unsigned long)) --600279-- REDIR: 0x557ec40 (libc.so.6:__wcslen_avx2) redirected to 0x4854260 (wcslen) --600279-- REDIR: 0x5580340 (libc.so.6:__wmemchr_avx2) redirected to 0x48544b0 (wmemchr) --600279-- REDIR: 0x5580600 (libc.so.6:__wmemcmp_avx2_movbe) redirected to 0x4854510 (wmemcmp) --600279-- REDIR: 0x51fb8a0 (libstdc++.so.6:operator delete(void*)) redirected to 0x484a080 (operator delete(void*)) --600279-- REDIR: 0x557ada0 (libc.so.6:__strchrnul_avx2) redirected to 0x48537b0 (strchrnul) --600279-- REDIR: 0x55789c0 (libc.so.6:__mempcpy_avx_unaligned_erms) redirected to 0x48538d0 (mempcpy) --600279-- REDIR: 0x51fd950 (libstdc++.so.6:operator new[](unsigned long)) redirected to 0x4848550 (operator new[](unsigned long)) --600279-- REDIR: 0x557d320 (libc.so.6:__strnlen_avx2) redirected to 0x484f1c0 (strnlen) --600279-- REDIR: 0x51fb8d0 (libstdc++.so.6:operator delete[](void*)) redirected to 0x484bec0 (operator delete[](void*)) --600279-- REDIR: 0x557fd20 (libc.so.6:__wcsnlen_avx2) redirected to 0x4854290 (wcsnlen) --600279-- REDIR: 0x55796b0 (libc.so.6:__stpcpy_avx2) redirected to 0x48525a0 (stpcpy) --600279-- REDIR: 0x557f8c0 (libc.so.6:__wcsncpy_avx2) redirected to 0x4854550 (wcsncpy) ==600279== ==600279== HEAP SUMMARY: ==600279== in use at exit: 0 bytes in 0 blocks ==600279== total heap usage: 35,504 allocs, 35,504 frees, 74,849,537 bytes allocated ==600279== ==600279== All heap blocks were freed -- no leaks are possible ==600279== ==600279== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) As you can see, there are a few : WARNING: new redirection conflicts with existing So please check, where malloc() is in false use. As example you can use the mp3 file linked in comment #0 . -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2122243 Title: Crash with mp3 file To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mediainfo/+bug/2122243/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
