libstorage / libstoragemgmt

A library for storage management
https://libstorage.github.io/libstoragemgmt-doc/
GNU Lesser General Public License v2.1
82 stars 32 forks source link

1.9.2: mem_leak__lsmd tests failed #467

Closed k0ste closed 3 years ago

k0ste commented 3 years ago

Hi, when try to build 1.9.2 on ArchLinux at some step tests detect mem leak in lsmd (?)

--2446052-- When reading debug info from /usr/lib/libgcc_s.so.1:
--2446052-- Ignoring non-Dwarf2/3/4 block in .debug_info
--2446052-- WARNING: Serious error when reading debug info
--2446052-- When reading debug info from /usr/lib/libgcc_s.so.1:
--2446052-- Ignoring non-Dwarf2/3/4 block in .debug_info
--2446052-- WARNING: Serious error when reading debug info
--2446052-- When reading debug info from /usr/lib/libgcc_s.so.1:
--2446052-- Ignoring non-Dwarf2/3/4 block in .debug_info
--2446052-- WARNING: Serious error when reading debug info
--2446052-- When reading debug info from /usr/lib/libgcc_s.so.1:
--2446052-- parse_CU_Header: is neither DWARF2 nor DWARF3 nor DWARF4
======== /tmp/17510/logs//mem_leak__lsmd_2446052 END ==========
======== /tmp/17510/logs//mem_leak__lsmd_2446061 BEGIN ==========
--2446061-- WARNING: Serious error when reading debug info
--2446061-- When reading debug info from /tmp/17510/plugins/simc_lsmplugin:
--2446061-- Ignoring non-Dwarf2/3/4 block in .debug_info
--2446061-- WARNING: Serious error when reading debug info
--2446061-- When reading debug info from /tmp/17510/plugins/simc_lsmplugin:
--2446061-- Ignoring non-Dwarf2/3/4 block in .debug_info
--2446061-- WARNING: Serious error when reading debug info

I may upload a /tmp/ build folder

tasleson commented 3 years ago

The logs seem to indicate that something more fundamental is amiss. The logs are complaining of errors in debug info, even for files that aren't even part of libStorageMgmt, e.g.

--2446052-- WARNING: Serious error when reading debug info
--2446052-- When reading debug info from /usr/lib/libgcc_s.so.1:

Web searches seem to indicate that the issue maybe caused by incompatibilities with the compiler and valgrind, ref. https://gcc.gnu.org/pipermail/fortran/2021-January/055625.html in that GCC switched to defaulting to DWARF 5 in GCC 11. My development system is currently using GCC 10.3.1.

None of these messages indicate an actual memory leak in lsmd, but more of an issue with the valgrind tooling or something it needs.

Unless you're going to do active development of libStorageMgmt internals, I would skip valgrind tests by using ./configure --without-mem-leak-test. Otherwise I would follow-up with archlinux & valgrind groups. If you really want to try making this work with valgrind, you could try something like:

./configure CFLAGS="-g -Wall -O0 -gdwarf-4" CXXFLAGS="-g -Wall -O0 -gdwarf-4"

and make sure they are present when you compile, eg.

$ V=1 make -j4

to see if it helps.

k0ste commented 3 years ago

Unless you're going to do active development of libStorageMgmt internals, I would skip valgrind tests by using ./configure --without-mem-leak-test.

Set this option, now check() is happy. Thanks