|
From: <dou...@so...> - 2004-09-21 12:54:38
|
I can't get valgrind 2.2.0 memcheck to work on RedHat 8.0: Whatever program I try I always get the same response: $ valgrind --tool=memcheck <program> valgrind: Couldn't allocate address space for shadow memory valgrind: Are you using a kernel with a small user address space, valgrind: or do you have your virtual memory size limited? $ valgrind --version valgrind-2.2.0 $ uname -a Linux rosalind.dev 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386 GNU/Linux $ cat /etc/redhat-release Red Hat Linux release 8.0 (Psyche) The error occurs regardless of which program in passed to valgrind: /bin/true, /bin/ls, /bin/bash... valgrind --tool=addrcheck works fine. valgrind 2.0.0 works fine. -- Douglas Leeder Software Engineer, Sophos |
|
From: Tom H. <th...@cy...> - 2004-09-21 13:56:01
|
In message <OFC...@gr...phos>
douglas leeder <dou...@so...> wrote:
> I can't get valgrind 2.2.0 memcheck to work on RedHat 8.0:
>
> Whatever program I try I always get the same response:
>
> $ valgrind --tool=memcheck <program>
> valgrind: Couldn't allocate address space for shadow memory
> valgrind: Are you using a kernel with a small user address space,
> valgrind: or do you have your virtual memory size limited?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
So do you?
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: John R.
|
Tom Hughes wrote:
> In message <OFC...@gr...phos>
> douglas leeder <dou...@so...> wrote:
>
>
>>I can't get valgrind 2.2.0 memcheck to work on RedHat 8.0:
>>
>>Whatever program I try I always get the same response:
>>
>>$ valgrind --tool=memcheck <program>
>>valgrind: Couldn't allocate address space for shadow memory
>>valgrind: Are you using a kernel with a small user address space,
>>valgrind: or do you have your virtual memory size limited?
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> So do you?
>
> Tom
>
This exchange shows EXTREMELY BAD usability in memcheck.
The diagnostic message is not helpful to new or infrequent users.
It is technically deficient because it does not give the specific values
of the request that failed: the requested amount, current usage, etc.
The reply from a well-connected insider on the recommended support
list is no better, because it does not shed light on the problem,
nor give the user help in figuring it out.
Suggestions:
1. Change the memcheck diagnostic to list the size of the request
that failed (such as, "could not mmap 939524096 (0x38000000) bytes")
and memcheck's current usage (such as, "memcheck currently uses
20971520 (0x1400000) bytes").
2. Append hints that enable the user to make progress, such as:
Check virtual space with "ulimit -v".
Check swap usage with "/usr/bin/free".
Check address allocations with "/usr/bin/ldd <application>".
Add enough hints to enable an expert to give a definitive
answer immediately, when the user reports the data requested.
3. For an application which is truly friendly to users,
enter a diganostic mode which does a fork+exec of those
suggestions, and annotates the output so that it is easy
to interpret. Such as:
(memcheck) diagnosing virtual space with "ulimit -v":
<<output from /bin/bash -c "ulimit -v">>
(memcheck) diagnosing swap space with "/usr/bin/free":
<<output from /usr/bin/free>>
(memcheck) diagnosing address space with /proc/self/maps:
<<contents of /proc/self/maps>>
Such output is at least as "sexy" as memcheck's report of
an uninitialized value or double free.
Regards,
--
John Reiser, jreiser@BitWagon.com
|