|
From: Dave N. <dc...@us...> - 2006-09-28 15:49:12
|
I thought it might be indicative of some assumptions about how stack/heap is positioned in memory. Maybe these assumptions no longer apply to RHEL5. I was hoping for some tips on how to debug this. Maybe some sort of Valgrind switch to trace memory allocations. Andrew Lamb wrote: > Doesn't this simply mean that you ran out of memory? > > > > > > > Re: [Valgrind-developers] valgrind 3.2.0 on RHEL5 beta 1 > > Dave Nomura > to: > valgrind-developers > 09/27/06 03:00 PM > > > > > Bcc: > Andrew Lamb > Please respond to dc...@us... > > > > > > > > > > I forgot to mention that this happens on a PPC970 running RHEL5 beta 1 > > uname -a: > Linux elm3b148 2.6.17-1.2519.4.21.el5 #1 SMP Wed Aug 30 18:29:48 EDT 2006 > ppc64 > ppc64 ppc64 GNU/Linux > > Dave Nomura wrote: > >> I got the following *.stderr.out on all of the memcheck tests in the >> > valgrind > >> testsuite. >> >> Valgrind's memory management: out of memory: >> newSuperblock's request for 1048576 bytes failed. >> 14286848 bytes have already been allocated. >> Valgrind cannot continue. Sorry. >> >> Can anyone give me an idea of what this error message might mean, or >> > where I > >> might look to determine why valgrind is failing in this way? >> >> ------------------------------------------------------------------------- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to share >> > your > >> opinions on IT & business topics through brief surveys -- and earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> _______________________________________________ >> Valgrind-developers mailing list >> Val...@li... >> https://lists.sourceforge.net/lists/listinfo/valgrind-developers >> > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers > > > |
|
From: Julian S. <js...@ac...> - 2006-09-28 15:57:09
|
> >> Valgrind's memory management: out of memory: > >> newSuperblock's request for 1048576 bytes failed. > >> 14286848 bytes have already been allocated. > >> Valgrind cannot continue. Sorry. We need details. Is it able to run a simple hello-world program? In 32-bit or 64-bit mode? With --tool=none? If you can make a really simple test case fail, also send the result of running it with '-d -d -v -v'. J |
|
From: Dave N. <dc...@us...> - 2006-10-09 22:40:51
|
This happens on valgrind initialization irrespective of client program/32K or
64K mode. I tracked this down to the fact that on RHEL5 some PPCs can have 64K
pages. Valgrind hardwires the pagesize to be 4K and so the first call to mmap()
fails because the address is not a multiple of 64K.
Initially I thought I could get ./configure to generate a program to invoke
sysconf() and if it returned 64K setup some #define that can be used to
select the correct VKI_PAGE_SHIFT. However, after talking to a colleague I
learned that the valgrind executable (both 32K or 64K mode) has to be able to
handle both page sizes (because this will be compiled into a Red Hat release),
so the check needs to be dynamic.
Here is what I tried in include/vki-ppc{64,32}-linux.h:
#include <unistd.h>
...
/* PAGE_SHIFT determines the page size. On RHEL5 allows 64K page size */
static long __vki_page_shift = 0;
static inline long get_vki_page_shift() {
long page = sysconf(_SC_PAGESIZE);
while (!(page & 1)) {
__vki_page_shift++;
page >>= 1;
}
return __vki_page_shift;
}
#define VKI_PAGE_SHIFT \
(__vki_page_shift == 0 ? get_vki_page_shift() : __vki_page_shift)
This didn't link because the linker couldn't find sysconf(). I know that you
try to limit your dependence on system libraries so I assumed that it must be
from one of those libraries.
Any suggestions on how to proceed?
Julian Seward wrote:
>>>> Valgrind's memory management: out of memory:
>>>> newSuperblock's request for 1048576 bytes failed.
>>>> 14286848 bytes have already been allocated.
>>>> Valgrind cannot continue. Sorry.
>
> We need details. Is it able to run a simple hello-world program?
> In 32-bit or 64-bit mode? With --tool=none? If you can make a really
> simple test case fail, also send the result of running it with '-d -d -v -v'.
>
> J
|
|
From: Paul M. <pa...@sa...> - 2006-10-09 22:59:46
|
Dave Nomura writes: > This didn't link because the linker couldn't find sysconf(). I know that you > try to limit your dependence on system libraries so I assumed that it must be > from one of those libraries. > > Any suggestions on how to proceed? You could look at the AT_PAGESIZE entry in the ELF auxiliary table. Valgrind already looks through the auxiliary table in setup_client_stack(). Paul. |