2017-11-29 17:15 GMT+01:00 Silva João <joao.si...@altran.com>: > I'm not sure it worked (I was already using Valgrind that I built, so I > patched, ran make and make install):
It worked pretty well. Valgrind tries to map an ELF file (/u/wh/rel/ifaplrel/pw_fwp_engine.eab) and one of its program headers has two parts: data and bss. The data part (few kBs) backed by the file has been mmap'ed to segment 3 (shown in "after #1"): ... > --92903:1: initimg Loading client > --92903:0: ume mmap_file_fixed_client #1 > --92903:0: aspacem <<< SHOW_SEGMENTS: after #1 (19 segments) > --92903:0: aspacem 2 segment names in 2 slots > --92903:0: aspacem freelist is empty > --92903:0: aspacem (0,4,3) > /home/AltranUK/jsilva.fs/lib/valgrind/memcheck-amd64-linux > --92903:0: aspacem (1,67,1) /u/wh/rel/ifaplrel/pw_fwp_engine.eab > --92903:0: aspacem 0: RSVN 0000000000-00003fffff 4194304 ----- SmFixed > --92903:0: aspacem 1: file 0000400000-000085efff 4583424 r-x-- d=0xfd00 > i=712737 o=0 (1,67) > --92903:0: aspacem 2: RSVN 000085f000-0003ffffff 55m ----- SmFixed > --92903:0: aspacem 3: 0004000000-0057ffffff 1344m > --92903:0: aspacem 4: FILE 0058000000-0058235fff 2318336 r-x-- d=0xfd02 > i=2635334 o=0 (0,4) > --92903:0: aspacem 5: 0058236000-0058434fff 2093056 > --92903:0: aspacem 6: FILE 0058435000-0058437fff 12288 rw--- d=0xfd02 > i=2635334 o=2314240 (0,4) > --92903:0: aspacem 7: ANON 0058438000-0059e39fff 26m rw--- > --92903:0: aspacem 8: 0059e3a000-1001ffffff 64129m > --92903:0: aspacem 9: RSVN 1002000000-1002000fff 4096 ----- SmFixed > --92903:0: aspacem 10: ANON 1002001000-1002400fff 4194304 rwx-- > --92903:0: aspacem 11: 1002401000-1fffffffff 65499m > --92903:0: aspacem 12: RSVN 2000000000-7ffc6d8e8fff 130929g ----- SmFixed > --92903:0: aspacem 13: ANON 7ffc6d8e9000-7ffc6d90afff 139264 rw--- > --92903:0: aspacem 14: RSVN 7ffc6d90b000-7ffc6d972fff 425984 ----- SmFixed > --92903:0: aspacem 15: ANON 7ffc6d973000-7ffc6d974fff 8192 r-x-- > --92903:0: aspacem 16: RSVN 7ffc6d975000-ffffffffff5fffff 16383e ----- > SmFixed > --92903:0: aspacem 17: ANON ffffffffff600000-ffffffffff600fff 4096 r-x-- > --92903:0: aspacem 18: RSVN ffffffffff601000-ffffffffffffffff 9m ----- > SmFixed > --92903:0: aspacem >>> > --92903:0: ume mmap_file_fixed_client #1 > --92903:0: aspacem <<< SHOW_SEGMENTS: after #1 (21 segments) > --92903:0: aspacem 2 segment names in 2 slots > --92903:0: aspacem freelist is empty > --92903:0: aspacem (0,4,3) > /home/AltranUK/jsilva.fs/lib/valgrind/memcheck-amd64-linux > --92903:0: aspacem (1,67,3) /u/wh/rel/ifaplrel/pw_fwp_engine.eab > --92903:0: aspacem 0: RSVN 0000000000-00003fffff 4194304 ----- SmFixed > --92903:0: aspacem 1: file 0000400000-000085efff 4583424 r-x-- d=0xfd00 > i=712737 o=0 (1,67) > --92903:0: aspacem 2: RSVN 000085f000-0000a5dfff 2093056 ----- SmFixed > --92903:0: aspacem 3: file 0000a5e000-0000a63fff 24576 rw--- d=0xfd00 > i=712737 o=4579328 (1,67) > --92903:0: aspacem 4: RSVN 0000a64000-0003ffffff 53m ----- SmFixed > --92903:0: aspacem 5: 0004000000-0057ffffff 1344m > --92903:0: aspacem 6: FILE 0058000000-0058235fff 2318336 r-x-- d=0xfd02 > i=2635334 o=0 (0,4) > --92903:0: aspacem 7: 0058236000-0058434fff 2093056 > --92903:0: aspacem 8: FILE 0058435000-0058437fff 12288 rw--- d=0xfd02 > i=2635334 o=2314240 (0,4) > --92903:0: aspacem 9: ANON 0058438000-0059e39fff 26m rw--- > --92903:0: aspacem 10: 0059e3a000-1001ffffff 64129m > --92903:0: aspacem 11: RSVN 1002000000-1002000fff 4096 ----- SmFixed > --92903:0: aspacem 12: ANON 1002001000-1002400fff 4194304 rwx-- > --92903:0: aspacem 13: 1002401000-1fffffffff 65499m > --92903:0: aspacem 14: RSVN 2000000000-7ffc6d8e8fff 130929g ----- SmFixed > --92903:0: aspacem 15: ANON 7ffc6d8e9000-7ffc6d90afff 139264 rw--- > --92903:0: aspacem 16: RSVN 7ffc6d90b000-7ffc6d972fff 425984 ----- SmFixed > --92903:0: aspacem 17: ANON 7ffc6d973000-7ffc6d974fff 8192 r-x-- > --92903:0: aspacem 18: RSVN 7ffc6d975000-ffffffffff5fffff 16383e ----- > SmFixed > --92903:0: aspacem 19: ANON ffffffffff600000-ffffffffff600fff 4096 r-x-- > --92903:0: aspacem 20: RSVN ffffffffff601000-ffffffffffffffff 9m ----- > SmFixed > --92903:0: aspacem >>> Now Valgrind tries to get finish with the bss of that program header. That needs to come directly after the data part. For some reason it determined its size is 1793339392 bytes. However there is not enough free address space at address 0x0000a64000 to accommodate that amount of bytes. Thus we see the failure. > --92903:0: ume mmap_anon_fixed_client #2 > --92903:0: aspacem <<< SHOW_SEGMENTS: after #2 (21 segments) > --92903:0: aspacem 2 segment names in 2 slots > --92903:0: aspacem freelist is empty > --92903:0: aspacem (0,4,3) > /home/AltranUK/jsilva.fs/lib/valgrind/memcheck-amd64-linux > --92903:0: aspacem (1,67,3) /u/wh/rel/ifaplrel/pw_fwp_engine.eab > --92903:0: aspacem 0: RSVN 0000000000-00003fffff 4194304 ----- SmFixed > --92903:0: aspacem 1: file 0000400000-000085efff 4583424 r-x-- d=0xfd00 > i=712737 o=0 (1,67) > --92903:0: aspacem 2: RSVN 000085f000-0000a5dfff 2093056 ----- SmFixed > --92903:0: aspacem 3: file 0000a5e000-0000a63fff 24576 rw--- d=0xfd00 > i=712737 o=4579328 (1,67) > --92903:0: aspacem 4: RSVN 0000a64000-0003ffffff 53m ----- SmFixed > --92903:0: aspacem 5: 0004000000-0057ffffff 1344m > --92903:0: aspacem 6: FILE 0058000000-0058235fff 2318336 r-x-- d=0xfd02 > i=2635334 o=0 (0,4) > --92903:0: aspacem 7: 0058236000-0058434fff 2093056 > --92903:0: aspacem 8: FILE 0058435000-0058437fff 12288 rw--- d=0xfd02 > i=2635334 o=2314240 (0,4) > --92903:0: aspacem 9: ANON 0058438000-0059e39fff 26m rw--- > --92903:0: aspacem 10: 0059e3a000-1001ffffff 64129m > --92903:0: aspacem 11: RSVN 1002000000-1002000fff 4096 ----- SmFixed > --92903:0: aspacem 12: ANON 1002001000-1002400fff 4194304 rwx-- > --92903:0: aspacem 13: 1002401000-1fffffffff 65499m > --92903:0: aspacem 14: RSVN 2000000000-7ffc6d8e8fff 130929g ----- SmFixed > --92903:0: aspacem 15: ANON 7ffc6d8e9000-7ffc6d90afff 139264 rw--- > --92903:0: aspacem 16: RSVN 7ffc6d90b000-7ffc6d972fff 425984 ----- SmFixed > --92903:0: aspacem 17: ANON 7ffc6d973000-7ffc6d974fff 8192 r-x-- > --92903:0: aspacem 18: RSVN 7ffc6d975000-ffffffffff5fffff 16383e ----- > SmFixed > --92903:0: aspacem 19: ANON ffffffffff600000-ffffffffff600fff 4096 r-x-- > --92903:0: aspacem 20: RSVN ffffffffff601000-ffffffffffffffff 9m ----- > SmFixed > --92903:0: aspacem >>> > valgrind: mmap(0xa64000, 1793339392) failed in UME with error 22 (Invalid > argument). > valgrind: this can be caused by executables with very large text, data or bss > segments. Please can you double check whether pw_fwp_engine.eab really contains such an extra large program header? For example 'readelf -l' might help. I. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users