Re: [Valgrind-users] Hard to interpret the race

2012-03-13 Thread WAROQUIERS Philippe
> The variable "thread_id" in Thread 9 is local to its stack. > It has nothing to do with either "v->thread_id" or > "thread_id" of Thread 1. > Is this a false positive, or the drd message says something else? Can't too much comment about the above, but you could compare with the helgrind outp

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] Extreme memory growth with Valgrind 3.6.0 and 3.7.0

2012-01-23 Thread WAROQUIERS Philippe
> Next test; valgrind runs fine if I add "--show-reachable=no --show-possibly-lost=no" Not clear why this changes the behaviour. To my knowledge, the above options have no effect on the memory/no effect on the "run-time" unless you are doing a leak search. Is there any error msg reported

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

2012-01-23 Thread WAROQUIERS Philippe
leak search") to see which small blocks are released and which bigger blocks are allocated. Philippe From: Peter Toft [mailto:p...@linuxbog.dk] Sent: Sunday 22 January 2012 12:42 To: WAROQUIERS Philippe Cc: Valgrind users

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

2012-01-20 Thread WAROQUIERS Philippe
There has been some improvements in the way some client malloc patterns are managed by Valgrind in 3.7.0. (see bug 250101). In SVN 3.8.0, there has been a recent commit to further improve the memory usage (see bug 282230). To have a better idea about what is happening, it would be good to at l

Re: [Valgrind-users] Execution Manipulation using valgrind

2012-01-19 Thread WAROQUIERS Philippe
From: Vinay Chippa [mailto:vinaych...@gmail.com] Sent: Thursday 19 January 2012 13:28 To: WAROQUIERS Philippe Cc: valgrind-users@lists.sourceforge.net Subject: Re: [Valgrind-users] Execution Manipulation using valgrind Hi, Thanks for the quick

Re: [Valgrind-users] Execution Manipulation using valgrind

2012-01-19 Thread WAROQUIERS Philippe
All the Valgrind tools (except the "none" tool) are doing code manipulation. These Valgrind tools are only "augmenting" the code, trying hard to not change the semantic of the code (e.g. memcheck instruments the code to see if uninitialised values are used, helgrind instruments the code to detec

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 gdbs

Re: [Valgrind-users] exploring the memory of a leak report?

2011-12-28 Thread WAROQUIERS Philippe
> Though i've still got a missing link: I need to get to know the pointers > to the memory which is leaked. > is there a way to add the pointers to the output of > > monitor leak_check full reachable any > ? I just attached a patch to https://bugs.kde.org/show_bug.cgi?id=289939 which implement

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

2011-12-16 Thread WAROQUIERS Philippe
> > I ran with -v and it told me I use /usr/lib/valgrind/default.supp > -rw-r--r-- 1 root root 29668 14.11. 03:22 > /usr/lib/valgrind/default.supp But that's not going to help > much. And it didn't contain any version signature. This is strange. Looking at my valgrind 3.7.0 installed default.sup

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 an

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 he

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 > to be able to call incremental leak check Incremental leak check (i.e. showing the new or changed leaks s

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 with

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 threa

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

Re: [Valgrind-users] Can Valgrind work on target PID as the args input? And the how it work on ARM Phone?

2011-11-22 Thread WAROQUIERS Philippe
> As we know, the normal usage of Valgrind is: valgrind -options "program_run_command" . > Could it extended to use the PID as the args input? > For example, valgrind -pid "pidnumber". I only saw such in vgdb. This is not possible : a process has to be started under Valgrind. Valgrind cannot

Re: [Valgrind-users] Valgrind-3.7.0 compile error

2011-11-21 Thread WAROQUIERS Philippe
According to man waitpid, WIFCONTINUED is defined since linux 2.6.10. In the below, it looks like you have 2.6.18.8. So, it is supposed to be defined. The best is to file a bug on bugzilla, with the details about the distribution you are using. (the distribution you are using is not very clear: it

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 an

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

2011-11-12 Thread WAROQUIERS Philippe
>once I extracted the valgrind-3.7 tarball into android/external, i >just went into the folder and used this >$ ./configure --build i686-pc-linux-gnu --host >arm-marvell-linux-gnueabi > >Then configuration proceeded fine... once everything was >setup, it was easy >$make clean; make >Both passin

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

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
># . /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:

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

2011-11-11 Thread WAROQUIERS Philippe
># . valgrind --leak-check=yes ./system/bin/testapp >/system/bin/valgrind: 1: Syntax error: word unexpected (expecting ")") Why do you put a . in front of valgrind ? To my knowledge, this indicates that the shell has to "interpret" this "script". But valgrind is an executable. So, I guess the she

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/cl

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] --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
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] 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. Th

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

2011-10-06 Thread WAROQUIERS Philippe
> ... > valgrind with --db-aatch I can Ctrl-C and print the backtrace. the > ... > where are the other threads? > ... The --db-attach has several limitations (a.o. it only shows one thread, you can't put breaks, continue, etc). You can try the 3.7.0 SVN version : this has an integrated gdbserver a

Re: [Valgrind-users] client request for naming JITted functions

2011-09-09 Thread WAROQUIERS Philippe
>Subject: [Valgrind-users] client request for naming JITted functions > >Is there any way I can tell valgrind/callgrind that an executable >memory region belongs to a particular function "f"? (As in, I want to >provide the name of the function as a char*). And preferably, have >that information

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 o

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 f

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 r

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 s

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 http://

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? >>>

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 (incl

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

2011-07-04 Thread WAROQUIERS Philippe
> >The 0x1000 stems from my experimenting around (in particular, >0x1000 was a definitely free area in my runtime >environment); as far >as the test case is concerned, mmap should probably just be called >with NULL as first argument to pick any available address. It does not arm to use

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 l

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 fil

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 associ

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 > > 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] catching a fork() in client

2011-06-30 Thread WAROQUIERS Philippe
>> I thought anything in a pub_tool_* header was available to tools? > >Yeah .. it is. I'm not exactly clear about the architectural rationale >of having a formal core-tool interface >(include/pub_tool_tooliface.h) and >also a bunch of functions (include/pub_tool_everythingelse.h). There's >pr

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

Re: [Valgrind-users] Annoying Malloc Seg Fault

2011-06-17 Thread WAROQUIERS Philippe
>My program calls malloc(x) several times, where x is never negative nor >0. But on one particular malloc() it always crashes. > >running my program with valgrind gives me the following hints: > > >- --15446-- VALGRIND INTERNAL ERROR: Valgrind received a signal 11 >(SIGSEGV) - exiting >- --15446-

Re: [Valgrind-users] Possible Error: C​allgrind Version 3.6.1 cg_annotat​​e : Line 1 Missing command line

2011-05-31 Thread WAROQUIERS Philippe
>Hmm... vgdb only relays to one tool instance. While I see that >having a separate namespace for core commands can be useful, we >do not really do something like that for command line options, too So, the idea for the monitor commands then would be: Valgrind core commands will have a prefix v

Re: [Valgrind-users] Possible Error: C​allgrind Version 3.6.1 cg_annotat​​e : Line 1 Missing command line

2011-05-28 Thread WAROQUIERS Philippe
>> Is there a need for vgdb to stick with 2 letters? I much would prefer "clg" >> instead. Since years I use the alias clg='valgrind --tool=callgrind', and in >> the callgrind sources I use the CLG_ prefix quite often. >> > >I agree with Josef it would be best if we could drop the >2-letter-acro

Re: [Valgrind-users] Possible Error: C​allgrind Version 3.6.1 cg_annotat​​e : Line 1 Missing command line

2011-05-27 Thread WAROQUIERS Philippe
>> > > cg_annotate is the tool for cachegrind output. >> > > The naming is a little bit unfortunate. >> > Definitely. How about renaming cg_annotate to cachegrind_annotate? With the introduction of the gdbserver in Valgrind (3.7.0 svn), the 'cg' prefix (for cachegrind) versus 'ct' prefix (for ca

Re: [Valgrind-users] about tracing call

2011-05-20 Thread WAROQUIERS Philippe
I am not sure I fully understand your question, I have 2 possible interpretations. If your question is: "can we see somewhere that process X is doing an MPI call which is being 'executed' by process Y?" : To my knowledge, Valgrind can't show this but I might be very wrong (I do have only a ultra

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] Checkpoint-based comparison of two applicationinstances in runtime

2011-04-26 Thread WAROQUIERS Philippe
>I'm wondering how capable Valgrind is to perform the following task. >Consider a huge application that has two slightly different versions. >One version gives "correct" result, and another one is "invalid". The >task is to track down these two version numerical differences in >runtime. We start th

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

2011-04-13 Thread WAROQUIERS Philippe
Looking somewhat further, I see that in fact, the replacement of memcpy is not broken. I find two memcpy: one memcpy is inside ld-linux-x86-64.so.2 (which is there very early from the start of the process and so the breakpoint was place there), and then another memcpy "appears" somewhat later in th

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] diagnosing 0==malloc()

2011-04-04 Thread WAROQUIERS Philippe
>> I understand the worry, but at least in my experience, I have not seen >> much programs which effectively go to an out of memory situation and >> then check and recover. > >I'd say it's the other way around: most programs already check. ... >Calls to malloc from third-party libraries are cover

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

2011-04-04 Thread WAROQUIERS Philippe
>Bart suggest that I try --freelist-vol=0, but upon doing so I did not >see any difference (will try again to make sure). This is normal it makes (almost) no difference as the freelist-vol default value is small (20 Mb) (and the problem is rather related to the way Valgrind handles the realloc. > >

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] 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 ar

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 des

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

2011-04-01 Thread WAROQUIERS Philippe
Hello Julian, >[... mucho discussion ...] > >I'm now comprehensively confused. Is there any bug/failure in >Memcheck resulting from this, that needs to be looked at? I suggest to look at two "fixes/improvements": 1. integrate the patch https://bugs.kde.org/show_bug.cgi?id=250101 (I jus

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 rea

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 ne

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 Va

Re: [Valgrind-users] trouble building valgrind 3.6.0 from sources

2011-02-22 Thread WAROQUIERS Philippe
Before doing the configure, first do: ./autogen.sh Philippe From: Satya V. Gupta [mailto:guptasa...@netzero.net] Sent: Monday 21 February 2011 20:05 To: valgrind-users@lists.sourceforge.net Subject: [Valgrind-users] trouble bui

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 [mailto:p

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); >>

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 fun

Re: [Valgrind-users] How to determine which segment does an addresspoints to in Valgrind?

2011-01-11 Thread WAROQUIERS Philippe
You might try the gdbserver patch (which allows such an interactive query of what an address is) and/or use the code behind as an example. See http://bugs.kde.org/show_bug.cgi?id=214909 gdb server patch allows to debug a program running under valgrind, and do (some) interactive calls to some of th

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 ga

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

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

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 e

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 >leaki

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 s

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] Debug message

2010-08-12 Thread WAROQUIERS Philippe
>From: Julian Seward [mailto:jsew...@acm.org] >You can also send output to a network socket (eg, >--log-socket=127.0.0.1:1500) >and have the valgrind-listener program listen on the socket. This is >really really useful (at least I think so :-) but nobody seems to know >it exists. > >J Effectiv

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: Ales

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] 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
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: valgrind-users@lists.source

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 p

Re: [Valgrind-users] Accessing memory marked as UNDEFINED

2010-07-20 Thread WAROQUIERS Philippe
>> On Mon, Jul 19, 2010 at 6:41 PM, Bert Wesarg > wrote: >>> >>> I would have expected, that when I do a read access on a memory >>> location (ie. dereference the pointer), which was previously marked >>> with VALGRIND_MAKE_MEM_UNDEFINED(), I get an error message from the >>> memcheck tool. But

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

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 records

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

2009-09-24 Thread WAROQUIERS Philippe
>I can see where that might be useful. We approximate >that by suppressing the leaks we don't care about; >having a single client request to say "suppress >all leaks seen up to this point" could be handy >if you don't have the time to keep a suppression >list up to date, e.g. when working on a la

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 mem

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 > wro