From: Mario E. <ma...@em...> - 2020-09-08 10:40:07
|
Dear All, many years ago, I've been using valgrind frequently and successfully, admittedly without ever giving it much thought! Thanks for the awesome tool. Now I'm setting up a larger CI system and want automatic memcheck for our tests. However, in the whole past year, I could not get a single successful run. So I must be doing something very wrong. Help would be greatly appreciated :-( The error I get most frequently is (full output attached in log.txt) ==32== Valgrind's memory management: out of memory: ==32== newSuperblock's request for 6864695621860790272 bytes failed. ==32== 114,106,368 bytes have already been mmap-ed ANONYMOUS. Here is what I tried so far: - Versions valgrind-3.13.0 from Ubuntu 18.04 and valgrind-3.16.1 compiled from source - Executed valgrind in a docker container running Ubuntu 18.04 x86_64 and Ubuntu 20.04 x86_64 - Checked `ulimit -a` in Docker, there are no tight limits - Tried valgrind with some 50++ different executables, all lead to the same error message - Tried valgrind outside Docker, leads to the same error message - Checked `ulimit -a` outside Docker, there are no tight limits - Tried the tests work successfully when _not_ using valgrind I have also tried valgrind on other executables than our debug builds, and it seems to work there without problems. So maybe the errors are related to how we create debug builds? We make pretty standard debug builds (I assume), with flags -ggdb3 -fno-omit-frame-pointer -O1 -m64 -march=nehalem -mtune=haswell. Are some of these suspicious? The host machines I have tried are relatively modern desktop computers with 64GB of RAM, and modern Skylake or Ryzen processors. The OS is typically Ubuntu 18.04 or 20.04. I have not set up any tight permission restrictions like selinux (unless it would be the default for Ubuntu). And ideas for what I can try are more than appreciated! All the best, Mario Emmenlauer |