Re: [Valgrind-users] Extreme memory growth with Valgrind 3.6.0 and 3.7.0

2012-01-23 Thread WAROQUIERS Philippe
Unfortunally you have the last valgrind message below, just before the crash. If Valgrind cannot get more memory while the client is requesting some, it will (silently) return NULL to the client. If Valgrind cannot get more memory while it requests itself some memory (e.g. for the tool arena),

Re: [Valgrind-users] failure to run on armv6 following the armv6 legacypatches suggested by bug 276897

2011-12-30 Thread WAROQUIERS Philippe
It is not clear to me why the mmap fails. A guess : it might be because the /tmp file system does not allow shared memory files to be put on this fs ? You could try to run with -d -d -d -v -v -v to have more details. Otherwise, you can bypass this particular problem by disabling the Valgrind

Re: [Valgrind-users] Conditional jump or move depends on uninitialised value and its reason

2011-12-16 Thread WAROQUIERS Philippe
I still get errors from puts(). You could try --track-origins=yes to see where this uninit value comes from. (maybe it might be some optimisation of string handling in libc which should be ignored by the libc suppression file not exactly up to date for your system ?)   This message and

Re: [Valgrind-users] memcheck does not display leak information unless program terminates

2011-12-09 Thread WAROQUIERS Philippe
If you modify the source i think you can Look at VALGRIND_DO_LEAK_CHECK in link below http://valgrind.org/docs/manual/mc-manual.html http://valgrind.org/docs/manual/mc-manual.html to be able to call incremental leak check Incremental leak check (i.e. showing the new or changed leaks since

Re: [Valgrind-users] get useful information out of valgrind

2011-12-09 Thread WAROQUIERS Philippe
I have a big program for Valgrind to just do memory check, but right now all I get from valgrind after one run is that all the reference to my NEW object declaration, which is not what I really want. Could some one please show me way to config Valgrind so that it only show to those unused

Re: [Valgrind-users] How to boost application under Callgrind control?

2011-12-02 Thread WAROQUIERS Philippe
Valgrind can run multi-threaded processes, but can only run one thread at the same time. So, when running a single process under Valgrind on a multi-cpu system, you will not use more than 1 CPU at the same time. This explains the 12.5% (1/8) that you have observed. Note that this serialised

Re: [Valgrind-users] Memcheck and on-the-fly memory leak detection.

2011-12-02 Thread WAROQUIERS Philippe
That is correct. Memcheck is not a garbage collection system and does not count memory references dynamically. That would slow down your program even more. There are many ways in which references to memory can be lost, such as storing a new value in a pointer variable, and without

Re: [Valgrind-users] 2 Q's: Can more than 1 Valgrind tool be run at once? and has anyone used iogrind to profile a multi-threaded app?

2011-11-23 Thread WAROQUIERS Philippe
I'm profiling a multi-component embedded system on Ubuntu. The components are in multiple languages (c++, java, javascript tied in using lein and cmake), thus I chose Valgrind (also using perf and YourKit to qualify the valgrind results). I am wondering, will Valgrind work properly if

Re: [Valgrind-users] Does Valgrind support Android emulator?

2011-11-14 Thread WAROQUIERS Philippe
I have successfully compiled and run Valgrind for the Android emulator delivered with the Android SDK. However, as this emulator emulates an ARMv5 and as Valgrind does not support ARMv5, I had to put some patches to make it compiling and running on the Android SDK emulator. If you can make

Re: [Valgrind-users] Valgrind on Android (Gingerbread)

2011-11-11 Thread WAROQUIERS Philippe
# . /valgrind --leak-check=yes testapp .: Can't open /valgrind # ./valgrind --leak-check=yes testapp ./valgrind: not found # . valgrind --leak-check=yes testapp /system/bin/valgrind: 1: Syntax error: word unexpected (expecting )) # valgrind --leak-check=yes ./system/bin/testapp valgrind: not found

Re: [Valgrind-users] Valgrind on Android (Gingerbread)

2011-11-11 Thread WAROQUIERS Philippe
According to the output below, your valgrind seems to be at least located in /android/external/valgrind-3.7.0/coregrind and so you might try: /android/external/valgrind-3.7.0/coregrind/valgrind But this looks like this Valgrind has not been installed and/or compiled according to the official

Re: [Valgrind-users] Valgrind on Android (Gingerbread)

2011-11-11 Thread WAROQUIERS Philippe
But here's what it is: android sdk is on my VM. the rootfs is on the board. there is no /external/valgrind/coregrind/valgrind on the board, it's just /system/bin/valgrind. Every other app I put there becomes visible instantly as i work with a live NFS. I really don't know why valgrind is acting

Re: [Valgrind-users] Mac OS X 10.7 Hello World Leak

2011-11-09 Thread WAROQUIERS Philippe
Hi! I just compiled a 64bit Valgrind 3.7 on OS X 10.7 hoping to use it for a new project. Wanting to try it out, I ran it on a project I just started that just allocated and de-allocated a matrix (correctly) and it said that there are weird leaks somewhere in the ImageLoader namespace/class

Re: [Valgrind-users] --free-list-vol limit

2011-10-14 Thread WAROQUIERS Philippe
I think it is not possible (or at least without significant work) to overcome the 32Gb limit. An alternative solution might be: if you have a mixture of big allocations and small allocations in your application, and your double free is of a small size, then you could take a 3.7.0 from SVN

Re: [Valgrind-users] --free-list-vol limit

2011-10-14 Thread WAROQUIERS Philippe
[mailto:meir.yeshu...@intel.com] Sent: Friday 14 October 2011 16:18 To: WAROQUIERS Philippe; valgrind-users@lists.sourceforge.net Subject: RE: [Valgrind-users] --free-list-vol limit Thanks. Sounds like a nice way to allow a bigger free list volume and it would have helped in my

Re: [Valgrind-users] --free-list-vol limit

2011-10-14 Thread WAROQUIERS Philippe
In fact, it is trivial to go over 32GB (including for the freelist volume). Here are the changes: In memcheck/mc_main.c, insert '10*' to obtain: else if VG_BINT_CLO(arg, --freelist-vol, MC_(clo_freelist_vol), 0, 10*10*1000*1000*1000LL) {} in

Re: [Valgrind-users] getting backtraces for multiplethreads with--db-attach

2011-10-06 Thread WAROQUIERS Philippe
... 2243 GST_OBJECT_UNLOCK (pad); 2244 result = GST_PAD_GETCAPSFUNC (pad) (pad); 2245 GST_OBJECT_LOCK (pad); The first two snippets use the same lock order and the third snipped temporarily releases a lock. As line 2243 unlocks pad, there must be another place where pad is locked. This

Re: [Valgrind-users] Are valgrind leak-check results valid if target allocates a block larger than 4G?

2011-08-31 Thread WAROQUIERS Philippe
With valgrind, the memory footprint is increased, and the allocation does eventually fail. The footprint increase is caused, as I understand it, by valgrind keeping alive blocks that would normally be freed during realloc, so that it can check for accesses to those blocks. In any case, the only

Re: [Valgrind-users] excluding cost of valgrind hooks fromcallgrind/cachegrind

2011-08-30 Thread WAROQUIERS Philippe
However, the cost seems to include overhead from valgrind itself, such as malloc other hooks. (I see in the call graph that malloc calls malloc_hook_ini once with a cost of around 60,000 Ir. Having only one a few mallocs in a particluar algorithm this overhead greatly distorts test results.

Re: [Valgrind-users] Helgind print out stack trace for all threads

2011-08-30 Thread WAROQUIERS Philippe
Thanks for the answer. In the meantime I have found a partial solution to this problem. I set ulimit -c ulimited run my program under helgrind and then kill it with SIGABRT when it hangs. Using gdb I can then get the stack trace from the vgcore. file generated. Still it would be a nice feature

Re: [Valgrind-users] massif snapshot at given time?

2011-08-02 Thread WAROQUIERS Philippe
If you want to have a snapshot at a specific point in your application, you can do that with the last (not yet released) SVN version. If your application is waiting before exiting (e.g. waiting to click on a quit button), then you can use vgdb snapshot (or vgdb detailed_snapshot) from a shell

Re: [Valgrind-users] Helgrind assertion failed

2011-07-28 Thread WAROQUIERS Philippe
Helgrind: hg_main.c:2298 (evh__HG_PTHREAD_COND_WAIT_POST): Assertion 'cvi-nWaiters 0' failed. It looks like a bug in valgrind/helgrind. As Julian has improved a lot helgrind in 3.7.0, an easy thing to try is to get the last version from svn, recompile and see if it works better. See

Re: [Valgrind-users] gdb and valgrind - the elf-x86-64 errror

2011-07-07 Thread WAROQUIERS Philippe
As part of Valgrind 3.7.0 SVN (not yet released so), a gdbserver has been integrated in Valgrind. With this gdbserver, the process running under Valgrind can be fully debugged (e.g. it is possible to use break/next/info thread/). This functionality has been tested on multiple platforms

Re: [Valgrind-users] VG_N_SEGMENTS is too low error

2011-07-07 Thread WAROQUIERS Philippe
Those are parts of the address space (of both Valgrind and your program) You can refer to coregrind/m_aspacemgr/aspacemgr-linux.c for details. Now what could cause such an error? My program can create/destroy threads very quickly. I assume there's something strange with the stack? Any hints

Re: [Valgrind-users] mremap still broken in 3.6.1?

2011-07-04 Thread WAROQUIERS Philippe
I will work on that this evening, and if confirmed, will prepare a patch and file a bug in bugzilla. https://bugs.kde.org/show_bug.cgi?id=276993 filed in bugzilla (with patch containing a test case and a fix for 3.7.0 SVN) Philippe   This message and any files transmitted with it are

Re: [Valgrind-users] mremap still broken in 3.6.1?

2011-07-01 Thread WAROQUIERS Philippe
Checked with 3.7.0 SVN and the problem is still there. But I think I know what it is (wrong check of segment state in the implementation of the mremap). I will work on that this evening, and if confirmed, will prepare a patch and file a bug in bugzilla. Philippe   This message and any

Re: [Valgrind-users] suppress uninitialised errors

2011-06-30 Thread WAROQUIERS Philippe
Perhaps the best that you can do is modify the custom allocator using something like: - #include valgrind.h if (RUNNING_ON_VALGRIND) *p = 0; else if (*p) *p = 0; I wonder if the above if-s are really needed. I think that on many modern cpu (with

Re: [Valgrind-users] suppress uninitialised errors

2011-06-30 Thread WAROQUIERS Philippe
However, the question is globally: if the lower-level allocator (lower than this one) returns mmap(,,,MAP_ANONYMOUS,,) then the unconditional store of 0 causes an immediate dirtying of a page (all MAP_ANONYMOUS pages initially refer to the _same_ single, zeroed physical page) with the associated

Re: [Valgrind-users] valgrind fails to execute program which runs fine on its own

2011-06-27 Thread WAROQUIERS Philippe
I tried a similar test case like yours and it works ok. Unfortunately my program is extremely large and complicated. In fact I get other errors like conditional jump depends on uninitialized value but these errors exist in another part of the code entirely. If the other errors

Re: [Valgrind-users] strace valgrind on x86

2011-05-06 Thread WAROQUIERS Philippe
Why there is a Segmentation fault ? And why it doesn't display Segmentation fault when I run dmesg ? IIUC, Valgrind is using the SIGSEGV signal to e.g. track the need to increase the stack. As it properly traps and handles SIGSEGV, you see no crash (and so, no indication of an error anywhere).

Re: [Valgrind-users] Memcheck not behave as expected : Overlapping src and dst pointers in memcpy

2011-04-12 Thread WAROQUIERS Philippe
(David: memcpy does not do an overlap check, but Valgrind is there to do these missing checks :). I confirm that the memcpy overlap error is not reported anymore by Valgrind : I have tried at work with a 3.7.0 SVN, and it looks like the memcpy overlap check is broken. Investigating a little bit,

Re: [Valgrind-users] Are valgrind leak-check results valid if target allocates a block larger than 4G?

2011-04-01 Thread WAROQUIERS Philippe
I digged a little bit at your problem (using a valgrind patched with gdbserver): I put a break at line 83, then searched the leaks and examined the value of m14. Then did next, and again searched leaks and examined value of m14. And then the same for the next line. You will see then that the

Re: [Valgrind-users] Are valgrind leak-check results valid if target allocates a block larger than 4G?

2011-04-01 Thread WAROQUIERS Philippe
If nothing else, then when the first huge block is detected give a warning: huge block detected (%lu bytes); consider adjusting --freelist-vol Note that in this case, the problem is not the free list. The default value of the free list is quite small (20Mb). See my other mail(s) for a

Re: [Valgrind-users] Are valgrind leak-check results valid if target allocates a block larger than 4G?

2011-04-01 Thread WAROQUIERS Philippe
Recorded for tracking purposes at: https://bugs.kde.org/show_bug.cgi?id=269884 I believe this one should be marked as a duplicate of https://bugs.kde.org/show_bug.cgi?id=250101 (which also contains a patch fixing the problem). Philippe   This message and any files transmitted with it are

Re: [Valgrind-users] Are valgrind leak-check results valid iftarget allocates a block larger than 4G?

2011-04-01 Thread WAROQUIERS Philippe
1. integrate the patch https://bugs.kde.org/show_bug.cgi?id=250101 I have voted +10 for this patch. [Why did it not appear in 3.6.x?] It was a candidate for 3.6.0, but I understand there was too much work, and too little effort available. For 3.6.1, this patch was not taken, as this is not

Re: [Valgrind-users] Valgrind Feature Query: Storage Driver Testing

2011-03-30 Thread WAROQUIERS Philippe
Try to do a web search using your favourite search engine on the words valgrind user mode linux. Apart of this, I have some doubts you can tell GRUB to start Valgrind on the kernel :). Philippe From: Skindell, David [mailto:david.pat.skind...@hp.com]

Re: [Valgrind-users] Intercepts all returns of functions

2011-02-28 Thread WAROQUIERS Philippe
With my rather poor knowledge of all this, I think that detecting function calls and return is a tricky problem (when it has to be handled properly in all cases). To my knowledge, callgrind has done this work of detecting function calls. So, you might see how to modify callgrind to fullfil your

Re: [Valgrind-users] Valgrind-3.6.1 valgrind the impossible happened main() signal was supposed to be fatal

2011-02-25 Thread WAROQUIERS Philippe
On Centos, apart of the 'signal was supposed to be fatal', do you see any other error message reported before by Valgrind ? For what concerns the 'signal was supposed to be fatal', here are a few questions/things to look at: 1. when you had this message, was the --vgdb=yes argument given to

Re: [Valgrind-users] Process terminating with default action of signal 14 (SIGALRM)

2011-02-10 Thread WAROQUIERS Philippe
Who is sending this SIGALRM to the process ? If this is another process (e.g. a supervision process), then as your process starts under valgrind a lot slower, the timer used by the supervision process might need to be made bigger. Philippe -Original Message- From: ppmoore

Re: [Valgrind-users] Using the Valgrind debugger to step through a C++program without multithreading

2011-02-09 Thread WAROQUIERS Philippe
Currently, such usage is not supported. But you might try to use the gdbserver patch . See http://bugs.kde.org/show_bug.cgi?id=214909 This patch gives a fully debuggable process under valgrind (so, continue, next, step, break, info threads, ... commands are supported). The patch is not (yet)

Re: [Valgrind-users] Debugging a GC with valgrind

2011-01-21 Thread WAROQUIERS Philippe
8 #define RZ_SZB (128) char *sp = /* stack pointer value */; char vbits[RZ_SZB] = {0}; VALGRIND_GET_VBITS(sp-RZ_SZB, vbits, RZ_SZB); VALGRIND_MAKE_MEM_DEFINED(sp-RZ_SZB, RZ_SZB); /* ... scan the red zone here ... */ VALGRIND_SET_VBITS(sp-RZ_SZB, vbits, RZ_SZB); 8 I can

Re: [Valgrind-users] Run native code?

2011-01-11 Thread WAROQUIERS Philippe
But similarly to the previous comment of Tom, your application code you would integrate and link in valgrind tool code will need to ensure all writes are properly recorded. So, it looks the same kind of work to do it in your own code, or do it inside valgrind. So, if your often called function

Re: [Valgrind-users] valgrind 3.6.0 doesn't detect memory allocations

2010-11-15 Thread WAROQUIERS Philippe
int main(void) { char buf[1000] = malloc(1000; buf[0] = 0; return 0; } The above program is slightly strange (does not compile here). But a slightly updated version does also not report a leak. This is explained by the fact that valgrind does the equivalent of an optimistic garbage

Re: [Valgrind-users] valgrind --db-attach=yes does not work un ubuntu10.10

2010-10-25 Thread WAROQUIERS Philippe
Does anybody have suggestion how to fix the problem in user space? I can easily imagine scenario where I would need to use valgrind with debugger on a machine, where I have no root access. You might try the gdbserver patch (http://bugs.kde.org/show_bug.cgi?id=214909) With this patch, if you

Re: [Valgrind-users] questions regarding --xml=yes mode

2010-10-19 Thread WAROQUIERS Philippe
3) Similar to 2) I wonder why it's not possible to create suppressions or attach a debugger in xml mode. Basically this would also mean: valgrind asks some server via socket whether to attach debugger or create suppression at given position. Is it simply not implemented or was there a reason

Re: [Valgrind-users] Discrepancy with top and g-s-m

2010-10-18 Thread WAROQUIERS Philippe
Have you tried running your app under Massif? That has helped me recently to track down a memory leak which was not visible in Valgrind/Memcheck but became clearly visible in Valgrind/Massif (the leak was caused by repeated setenv() calls, which apparently don't free any memory even if the env

Re: [Valgrind-users] Discrepancy with top and g-s-m

2010-10-13 Thread WAROQUIERS Philippe
of the leak is using valgrind, but valgrind only sees 24MB of possibly lost memory. For what concerns the possibly lost, a bug has been recently fixed in 3.6.0 SVN. Before this fix, memcheck was giving a lot of false possibly lost. See http://bugs.kde.org/show_bug.cgi?id=206600 leaking), how

Re: [Valgrind-users] Valgrind cannot start

2010-10-07 Thread WAROQUIERS Philippe
At work, we encountered 'not enough memory' crashes of our big application under valgrind due to the way the superblocks are managed (see bug http://bugs.kde.org/show_bug.cgi?id=250101 (there is a proposed patch to solve this bug) However, in your case, not being able to even allocate about 20

Re: [Valgrind-users] Valgrind cannot start

2010-10-07 Thread WAROQUIERS Philippe
mmap(0x402001000, 4194304, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, 0, 0) = -1 EPERM (Operation not permitted) getpid()= 27233 This is probably due to grsecurity kernel but I am not sure why, it has worked before on a 32 bit system.

Re: [Valgrind-users] Debug message

2010-08-12 Thread WAROQUIERS Philippe
You can give one or more -v arguments and/or one or mode -d arguments. This will produce more verbose valgrind output and/or produce debug output. There are also other debug switches, which you can find by : valgrind --help-debug Philippe From:

Re: [Valgrind-users] Execute tests in Valgrind

2010-08-11 Thread WAROQUIERS Philippe
In the valgrind directory, do make regtest You can also do make perf see README_DEVELOPPERS in valgrind directory for more info. -Original Message- From: Alessandro Biasci [mailto:a.bia...@evidence.eu.com] Sent: Wednesday 11 August 2010 09:50 To:

Re: [Valgrind-users] Execute tests in Valgrind

2010-08-11 Thread WAROQUIERS Philippe
From: Alessandro Biasci [mailto:a.bia...@evidence.eu.com] ... It is possible to compile only the C test and not C++? Not that I know of. But you can try to cheat by either redefining a gcc hiding the standard gcc, and that would create a dummy .o when it compiles a .cpp extension or replace all

Re: [Valgrind-users] Execute tests in Valgrind

2010-08-11 Thread WAROQUIERS Philippe
This is the report: == 511 tests, 474 stderr failures, 1 stdout failure, 0 post failures == The test fails for stderr but if I execute a test (es: memcheck/tests$ ./addressable) it pass. To run one test, you must do something like: perl tests/vg_regtest memcheck/tests/addressable (the

Re: [Valgrind-users] Accessing contents of registers

2010-07-29 Thread WAROQUIERS Philippe
I am working on a patch that makes a valgrind process fully debuggable (so, you can put breaks, look variables or registers, continue, next, step, query leaks interactively, etc ...). So, to obtain the below, you could just start your executable under the patched valgrind, put breaks at the

Re: [Valgrind-users] How to debug segfault that only occurrs whenrunning in valgrind with callgrind?

2010-04-15 Thread WAROQUIERS Philippe
itself. How does one debug that? gdb - valgrind - app? That segfaults even earlier and gives a totally useless backtrace without any debug info... Hints? From my recent experience debugging valgrind (I am busy working on having gdb able to properly debug a process which is running under

Re: [Valgrind-users] diffs between VALGRIND_DO_LEAK_CHECKs?

2009-11-19 Thread WAROQUIERS Philippe
Do anyone have a script which reports only new leaks/allocations since last VALGRIND_DO_LEAK_CHECK? It's probably easy to write, once one knows all the variants of the 128 bytes in 1 blocks are still reachable in loss record 16 of 19 lines and which variants can move between loss

Re: [Valgrind-users] Opt: --show-reachable=yes

2009-09-24 Thread WAROQUIERS Philippe
I need it off, and in fact I turn even more off, see https://bugs.kde.org/show_bug.cgi?id=201170 I build with that patch and use --show-possible=no to avoid generating gigabytes of warnings of questionable utility. So, the short answer is: big apps that are trying to stamp out all their memory

Re: [Valgrind-users] Fw: Massif for LWP

2009-09-14 Thread WAROQUIERS Philippe
-Original Message- From: Nicholas Nethercote [mailto:n.netherc...@gmail.com] Sent: Friday 11 September 2009 00:17 To: Cristian Todor Cc: valgrind-users@lists.sourceforge.net Subject: Re: [Valgrind-users] Fw: Massif for LWP On Thu, Sep 10, 2009 at 11:34 PM, Cristian Todor