Failing to start valgrind

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

Failing to start valgrind

alex.ivershen
Guys,

We've been using Valgrind here for quite a while, and I have never seen
this problem ... I have built Valgrind on a Linux box and whenever I try
to run it, I get this:

%valgrind --version
Executable range 0xb0000000-0xb01eafc0 is outside the
acceptable range 0x80d4000-0x3ffff000
valgrind: failed to load /usr/lib/valgrind/stage2: Cannot allocate
memory


There is not much different on this machine versus others ... Please,
help me to figure out why this is happening!
Below is the system info from the Linux machine.

Thanks a lot!
Alex


GNU C Library stable release version 2.3.2, by Roland McGrath et al.
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.3.1 (MontaVista 3.3.1-7.0.0.0401153
2004-08-21).
Compiled on a Linux 2.4.20_dev system on 2004-08-21.
Available extensions:
        GNU libio by Per Bothner
        crypt add-on version 2.1 by Michael Glad and others
        linuxthreads-0.10 by Xavier Leroy
        BIND-8.2.3-T5B
        libthread_db work sponsored by Alpha Processor Inc
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk

MontaVista(R) Linux(R) Carrier Grade Edition 3.1
Linux/i686 2.4.20_mvlcge31_p2-langley5


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|

Re: Failing to start valgrind

Qin Zhao
I assume it happens on valgrind-2.4.
In 2.4, valgrind loader will first load stage2 into address 0xb0000000, or
0xf0000000 (depends on the linux version), and the stage2 load the real
application.
I guess this is because the address of valgrind's loader is mapped to
0xb0000000, which is conflict the address of stage2.  You might have to
recompile it.

On Fri, 27 May 2005 [hidden email] wrote:

> Guys,
>
> We've been using Valgrind here for quite a while, and I have never seen
> this problem ... I have built Valgrind on a Linux box and whenever I try
> to run it, I get this:
>
> %valgrind --version
> Executable range 0xb0000000-0xb01eafc0 is outside the
> acceptable range 0x80d4000-0x3ffff000
> valgrind: failed to load /usr/lib/valgrind/stage2: Cannot allocate
> memory
>
>
> There is not much different on this machine versus others ... Please,
> help me to figure out why this is happening!
> Below is the system info from the Linux machine.
>
> Thanks a lot!
> Alex
>
>
> GNU C Library stable release version 2.3.2, by Roland McGrath et al.
> Copyright (C) 2003 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
> Compiled by GNU CC version 3.3.1 (MontaVista 3.3.1-7.0.0.0401153
> 2004-08-21).
> Compiled on a Linux 2.4.20_dev system on 2004-08-21.
> Available extensions:
>         GNU libio by Per Bothner
>         crypt add-on version 2.1 by Michael Glad and others
>         linuxthreads-0.10 by Xavier Leroy
>         BIND-8.2.3-T5B
>         libthread_db work sponsored by Alpha Processor Inc
>         NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
>
> MontaVista(R) Linux(R) Carrier Grade Edition 3.1
> Linux/i686 2.4.20_mvlcge31_p2-langley5
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Yahoo.
> Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
> Search APIs Find out how you can build Yahoo! directly into your own
> Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
> _______________________________________________
> Valgrind-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/valgrind-users
>


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|

Re: Failing to start valgrind

njn (Bugzilla)-2
In reply to this post by alex.ivershen
On Fri, 27 May 2005 [hidden email] wrote:

> We've been using Valgrind here for quite a while, and I have never seen
> this problem ... I have built Valgrind on a Linux box and whenever I try
> to run it, I get this:
>
> %valgrind --version
> Executable range 0xb0000000-0xb01eafc0 is outside the
> acceptable range 0x80d4000-0x3ffff000
> valgrind: failed to load /usr/lib/valgrind/stage2: Cannot allocate
> memory

What's the output of 'cat /proc/self/maps' ?

N


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|

RE: Failing to start valgrind

alex.ivershen
In reply to this post by alex.ivershen
Recompile it after changing what?
Alex

-----Original Message-----
From: Qin Zhao [mailto:[hidden email]]
Sent: Friday, May 27, 2005 8:28 PM
To: Ivershen, Alex
Cc: [hidden email]
Subject: Re: [Valgrind-users] Failing to start valgrind

I assume it happens on valgrind-2.4.
In 2.4, valgrind loader will first load stage2 into address 0xb0000000,
or 0xf0000000 (depends on the linux version), and the stage2 load the
real application.
I guess this is because the address of valgrind's loader is mapped to
0xb0000000, which is conflict the address of stage2.  You might have to
recompile it.

On Fri, 27 May 2005 [hidden email] wrote:

> Guys,
>
> We've been using Valgrind here for quite a while, and I have never
> seen this problem ... I have built Valgrind on a Linux box and
> whenever I try to run it, I get this:
>
> %valgrind --version
> Executable range 0xb0000000-0xb01eafc0 is outside the acceptable range

> 0x80d4000-0x3ffff000
> valgrind: failed to load /usr/lib/valgrind/stage2: Cannot allocate
> memory
>
>
> There is not much different on this machine versus others ... Please,
> help me to figure out why this is happening!
> Below is the system info from the Linux machine.
>
> Thanks a lot!
> Alex
>
>
> GNU C Library stable release version 2.3.2, by Roland McGrath et al.
> Copyright (C) 2003 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
> Compiled by GNU CC version 3.3.1 (MontaVista 3.3.1-7.0.0.0401153
> 2004-08-21).
> Compiled on a Linux 2.4.20_dev system on 2004-08-21.
> Available extensions:
>         GNU libio by Per Bothner
>         crypt add-on version 2.1 by Michael Glad and others
>         linuxthreads-0.10 by Xavier Leroy
>         BIND-8.2.3-T5B
>         libthread_db work sponsored by Alpha Processor Inc
>         NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
>
> MontaVista(R) Linux(R) Carrier Grade Edition 3.1
> Linux/i686 2.4.20_mvlcge31_p2-langley5
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Yahoo.
> Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
> Search APIs Find out how you can build Yahoo! directly into your own
> Applications - visit
> http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
> _______________________________________________
> Valgrind-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/valgrind-users
>


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|

RE: Failing to start valgrind

alex.ivershen
In reply to this post by alex.ivershen
Here it is:

% cat /proc/self/maps
08048000-0804a000 r-xp 00000000 08:02 210862     /bin/cat
0804a000-0804b000 rw-p 00002000 08:02 210862     /bin/cat
0804b000-0804c000 rwxp 00000000 00:00 0
15556000-1556a000 r-xp 00000000 08:02 323984     /lib/ld-2.3.2.so
1556a000-1556b000 rw-p 00014000 08:02 323984     /lib/ld-2.3.2.so
1556b000-1569c000 r-xp 00000000 08:02 323939     /lib/libc-2.3.2.so
1569c000-156a1000 rw-p 00130000 08:02 323939     /lib/libc-2.3.2.so
156a1000-156a4000 rw-p 00000000 00:00 0
3fffe000-40000000 rwxp fffff000 00:00 0

Alex

-----Original Message-----
From: Nicholas Nethercote [mailto:[hidden email]]
Sent: Friday, May 27, 2005 9:28 PM
To: Ivershen, Alex
Cc: [hidden email]
Subject: Re: [Valgrind-users] Failing to start valgrind

On Fri, 27 May 2005 [hidden email] wrote:

> We've been using Valgrind here for quite a while, and I have never
> seen this problem ... I have built Valgrind on a Linux box and
> whenever I try to run it, I get this:
>
> %valgrind --version
> Executable range 0xb0000000-0xb01eafc0 is outside the acceptable range

> 0x80d4000-0x3ffff000
> valgrind: failed to load /usr/lib/valgrind/stage2: Cannot allocate
> memory

What's the output of 'cat /proc/self/maps' ?

N


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|

Re: Failing to start valgrind

John Reiser
> % cat /proc/self/maps
> 08048000-0804a000 r-xp 00000000 08:02 210862     /bin/cat
> 0804a000-0804b000 rw-p 00002000 08:02 210862     /bin/cat
> 0804b000-0804c000 rwxp 00000000 00:00 0
> 15556000-1556a000 r-xp 00000000 08:02 323984     /lib/ld-2.3.2.so
> 1556a000-1556b000 rw-p 00014000 08:02 323984     /lib/ld-2.3.2.so
> 1556b000-1569c000 r-xp 00000000 08:02 323939     /lib/libc-2.3.2.so
> 1569c000-156a1000 rw-p 00130000 08:02 323939     /lib/libc-2.3.2.so
> 156a1000-156a4000 rw-p 00000000 00:00 0
> 3fffe000-40000000 rwxp fffff000 00:00 0
> %

> MontaVista(R) Linux(R) Carrier Grade Edition 3.1
>> Linux/i686 2.4.20_mvlcge31_p2-langley5

It seems that the kernel configuration parameter TASK_SIZE in this
Linux kernel is 0x40000000 (1GB), because the stack ends there:
    3fffe000-40000000 rwxp fffff000 00:00 0
This means that the user virtual address space is restricted
to 1GB (0 to 0x40000000) per process.  Probably this kernel is
targeted to supporting a very large number of medium- to small-sized
simultaneous processes, using a large amount of physical RAM
(many GB).  The kernel and each process share address space;
the more physical RAM, the more the kernel needs address space
to keep track of it, and to supervise many simultaneous I/O streams.

Valgrind assumes that the user virtual address space is at least
11/4 GB (0xb0000000), plus a little more.  The kernel TASK_SIZE is
typically 0xc0000000 or 0xf0000000.  This is common in many
desktop and small server configurations with at most a
few GB of physical RAM.

--


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|

Re: Failing to start valgrind

njn (Bugzilla)-2
On Wed, 1 Jun 2005, John Reiser wrote:

> It seems that the kernel configuration parameter TASK_SIZE in this
> Linux kernel is 0x40000000 (1GB), because the stack ends there:
>   3fffe000-40000000 rwxp fffff000 00:00 0
>
> Valgrind assumes that the user virtual address space is at least
> 11/4 GB (0xb0000000), plus a little more.  The kernel TASK_SIZE is
> typically 0xc0000000 or 0xf0000000.  This is common in many
> desktop and small server configurations with at most a
> few GB of physical RAM.

That's exactly right, so basically Valgrind won't work with this kernel
configuration -- there's just not enough address space.

N


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|

RE: Failing to start valgrind

alex.ivershen
In reply to this post by alex.ivershen
Guys, thanks for your input! I'll try to investigate why the kernel is
configured that way and take it from there.
Cheers!
Alex

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of John
Reiser
Sent: Wednesday, June 01, 2005 5:37 PM
To: [hidden email]
Subject: Re: [Valgrind-users] Failing to start valgrind

> % cat /proc/self/maps
> 08048000-0804a000 r-xp 00000000 08:02 210862     /bin/cat
> 0804a000-0804b000 rw-p 00002000 08:02 210862     /bin/cat
> 0804b000-0804c000 rwxp 00000000 00:00 0
> 15556000-1556a000 r-xp 00000000 08:02 323984     /lib/ld-2.3.2.so
> 1556a000-1556b000 rw-p 00014000 08:02 323984     /lib/ld-2.3.2.so
> 1556b000-1569c000 r-xp 00000000 08:02 323939     /lib/libc-2.3.2.so
> 1569c000-156a1000 rw-p 00130000 08:02 323939     /lib/libc-2.3.2.so
> 156a1000-156a4000 rw-p 00000000 00:00 0 3fffe000-40000000 rwxp
> fffff000 00:00 0 %

> MontaVista(R) Linux(R) Carrier Grade Edition 3.1
>> Linux/i686 2.4.20_mvlcge31_p2-langley5

It seems that the kernel configuration parameter TASK_SIZE in this Linux
kernel is 0x40000000 (1GB), because the stack ends there:
    3fffe000-40000000 rwxp fffff000 00:00 0 This means that the user
virtual address space is restricted to 1GB (0 to 0x40000000) per
process.  Probably this kernel is targeted to supporting a very large
number of medium- to small-sized simultaneous processes, using a large
amount of physical RAM (many GB).  The kernel and each process share
address space; the more physical RAM, the more the kernel needs address
space to keep track of it, and to supervise many simultaneous I/O
streams.

Valgrind assumes that the user virtual address space is at least
11/4 GB (0xb0000000), plus a little more.  The kernel TASK_SIZE is
typically 0xc0000000 or 0xf0000000.  This is common in many desktop and
small server configurations with at most a few GB of physical RAM.

--


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit
http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users