Fwd: ASan error using memcheck tool

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Fwd: ASan error using memcheck tool

Николай Жосов
Hi.
I have a problem trying to check my programme with memcheck.
Some details about programme:
It consist of 2 DLLs and executable, implicitly linked using -rpath to add location of DLLs to executable. Also one of DLLs was linked with the first the same way.
So I start the check with such line:

valgrind --tool=memcheck ./L1 Graph.txt

and caught the error message and valgrind report:

==14553== Memcheck, a memory error detector
==14553== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==14553== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==14553== Command: ./L1 Graph.txt
==14553==
==14553==Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING.
==14553==Process memory map follows:
    0x000000400000-0x000000498000    /home/nick/15202-zhosov.15202_zhosov/Lab_works/2_Semester/L1_Traversal/L1
    0x000000698000-0x00000069a000    /home/nick/15202-zhosov.15202_zhosov/Lab_works/2_Semester/L1_Traversal/L1
    0x00000069a000-0x000001ace000   
    0x000004000000-0x000004023000    /lib/x86_64-linux-gnu/ld-2.19.so
    0x000004023000-0x00000402c000   
    0x000004030000-0x000004034000   
    0x000004045000-0x00000404a000   
    0x000004222000-0x000004223000    /lib/x86_64-linux-gnu/ld-2.19.so
    0x000004223000-0x000004224000    /lib/x86_64-linux-gnu/ld-2.19.so
    0x000004224000-0x000004225000   
    0x000004225000-0x000004226000   
    0x000004a25000-0x000004a26000    /usr/lib/valgrind/vgpreload_core-amd64-linux.so
    0x000004a26000-0x000004c25000    /usr/lib/valgrind/vgpreload_core-amd64-linux.so
    0x000004c25000-0x000004c26000    /usr/lib/valgrind/vgpreload_core-amd64-linux.so
    0x000004c26000-0x000004c27000    /usr/lib/valgrind/vgpreload_core-amd64-linux.so
    0x000004c27000-0x000004c35000    /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
    0x000004c35000-0x000004e35000    /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
    0x000004e35000-0x000004e36000    /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
    0x000004e36000-0x000004e37000    /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
    0x000004e37000-0x000004e3b000    /home/nick/15202-zhosov.15202_zhosov/Lab_works/2_Semester/L1_Traversal/libQueue.so
    0x000004e3b000-0x00000503a000    /home/nick/15202-zhosov.15202_zhosov/Lab_works/2_Semester/L1_Traversal/libQueue.so
    0x00000503a000-0x00000503b000    /home/nick/15202-zhosov.15202_zhosov/Lab_works/2_Semester/L1_Traversal/libQueue.so
    0x00000503b000-0x000005043000    /home/nick/15202-zhosov.15202_zhosov/Lab_works/2_Semester/L1_Traversal/libHash.so
    0x000005043000-0x000005242000    /home/nick/15202-zhosov.15202_zhosov/Lab_works/2_Semester/L1_Traversal/libHash.so
    0x000005242000-0x000005243000    /home/nick/15202-zhosov.15202_zhosov/Lab_works/2_Semester/L1_Traversal/libHash.so
    0x000005243000-0x00000525c000    /lib/x86_64-linux-gnu/libpthread-2.19.so
    0x00000525c000-0x00000545b000    /lib/x86_64-linux-gnu/libpthread-2.19.so
    0x00000545b000-0x00000545c000    /lib/x86_64-linux-gnu/libpthread-2.19.so
    0x00000545c000-0x00000545d000    /lib/x86_64-linux-gnu/libpthread-2.19.so
    0x00000545d000-0x000005461000   
    0x000005461000-0x000005468000    /lib/x86_64-linux-gnu/librt-2.19.so
    0x000005468000-0x000005667000    /lib/x86_64-linux-gnu/librt-2.19.so
    0x000005667000-0x000005668000    /lib/x86_64-linux-gnu/librt-2.19.so
    0x000005668000-0x000005669000    /lib/x86_64-linux-gnu/librt-2.19.so
    0x000005669000-0x00000566c000    /lib/x86_64-linux-gnu/libdl-2.19.so
    0x00000566c000-0x00000586b000    /lib/x86_64-linux-gnu/libdl-2.19.so
    0x00000586b000-0x00000586c000    /lib/x86_64-linux-gnu/libdl-2.19.so
    0x00000586c000-0x00000586d000    /lib/x86_64-linux-gnu/libdl-2.19.so
    0x00000586d000-0x000005972000    /lib/x86_64-linux-gnu/libm-2.19.so
    0x000005972000-0x000005b71000    /lib/x86_64-linux-gnu/libm-2.19.so
    0x000005b71000-0x000005b72000    /lib/x86_64-linux-gnu/libm-2.19.so
    0x000005b72000-0x000005b73000    /lib/x86_64-linux-gnu/libm-2.19.so
    0x000005b73000-0x000005b89000    /lib/x86_64-linux-gnu/libgcc_s.so.1
    0x000005b89000-0x000005d88000    /lib/x86_64-linux-gnu/libgcc_s.so.1
    0x000005d88000-0x000005d89000    /lib/x86_64-linux-gnu/libgcc_s.so.1
    0x000005d89000-0x000005f44000    /lib/x86_64-linux-gnu/libc-2.19.so
    0x000005f44000-0x000006143000    /lib/x86_64-linux-gnu/libc-2.19.so
    0x000006143000-0x000006147000    /lib/x86_64-linux-gnu/libc-2.19.so
    0x000006147000-0x000006149000    /lib/x86_64-linux-gnu/libc-2.19.so
    0x000006149000-0x00000614e000   
    0x000038000000-0x0000383d6000    /usr/lib/valgrind/memcheck-amd64-linux
    0x0000385d6000-0x0000385d9000    /usr/lib/valgrind/memcheck-amd64-linux
    0x0000385d9000-0x00003a048000   
    0x000802001000-0x000802ae0000   
    0x000802b7c000-0x000802b9c000   
    0x000802b9c000-0x000802b9e000   
    0x000802b9e000-0x000802c9e000    [stack:14553]
    0x000802c9e000-0x000802ca0000   
    0x000802ca0000-0x000802ca1000    /tmp/vgdb-pipe-shared-mem-vgdb-14553-by-nick-on-???
    0x000802ca1000-0x0008057f3000   
    0x000805ae8000-0x000805cff000   
    0x000ffeffe000-0x000fff001000   
    0x7ffd99a54000-0x7ffd99a75000   
    0x7ffd99be5000-0x7ffd99be7000    [vvar]
    0xffffffffff600000-0xffffffffff601000    [vsyscall]
==14553==End of process memory map.
==14553==
==14553== HEAP SUMMARY:
==14553==     in use at exit: 0 bytes in 0 blocks
==14553==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==14553==
==14553== All heap blocks were freed -- no leaks are possible
==14553==
==14553== For counts of detected and suppressed errors, rerun with: -v
==14553== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

So, what do I need to do to make the check work correct? Maybe some extra keys in command line needed?

Waiting for you suggestions and comments,
Nick.



------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: ASan error using memcheck tool

Tom Hughes-2
On 25/04/16 17:11, Николай Жосов wrote:

> I have a problem trying to check my programme with memcheck.
> Some details about programme:
> It consist of 2 DLLs and executable, implicitly linked using -rpath to
> add location of DLLs to executable. Also one of DLLs was linked with the
> first the same way.
> So I start the check with such line:
>
> valgrind --tool=memcheck ./L1 Graph.txt
>
> and caught the error message and valgrind report:
>
> ==14553== Memcheck, a memory error detector
> ==14553== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
> ==14553== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
> ==14553== Command: ./L1 Graph.txt
> ==14553==
> ==14553==Shadow memory range interleaves with an existing memory
> mapping. ASan cannot proceed correctly. ABORTING.

It looks like you have compiled your program with -fsanitize=address but
that conflicts with valgrind as both are essentially trying to do more
or less the same thing.

Build your program normally and you should find it works...

Tom

--
Tom Hughes ([hidden email])
http://compton.nu/

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: ASan error using memcheck tool

Николай Жосов
In reply to this post by Николай Жосов
Yes, that worked. Thank you, Tom. You saved my day again.


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: ASan error using memcheck tool

John Carter
In case you wonder why they don't play nice....

https://github.com/google/sanitizers/wiki/AddressSanitizer#ulimit--v

ASan consumes 20 terabytes of virtual memory (plus a bit).

ASAN plays horrible tricks with virtual memory to work.
https://github.com/google/sanitizers/wiki/AddressSanitizerAlgorithm

On Tue, Apr 26, 2016 at 4:50 AM, Nick <[hidden email]> wrote:
Yes, that worked. Thank you, Tom. You saved my day again.


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users



--
John Carter
Phone : (64)(3) 358 6639
Tait Electronics                        
PO Box 1645 Christchurch
New Zealand



This Communication is Confidential. We only send and receive email on the
basis of the terms set out at www.taitradio.com/email_disclaimer


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users