Re: [Valgrind-users] system crash

2012-04-17 Thread Folkert van Heusden
I'm also not entirely sure if it indeed is a leak in my program as I have a routine in it which constantly (20 times/sec) checks the memory usage (via /proc) of my program and does an exit() when it reaches 500MB (normally it should not use more than 120MB). If it is something in Xorg,

Re: [Valgrind-users] system crash

2012-04-17 Thread Folkert van Heusden
So when this happens, my program would allocate gigabytes of ram. And since I used --malloc-fill=, valgrind would then initialize this ram (I'm speculating here) causing big time swapping. I found this out by disabling swap memory. To verify that this is the problem, you might use

Re: [Valgrind-users] system crash

2012-04-17 Thread Philippe Waroquiers
On Tue, 2012-04-17 at 20:16 +0200, Folkert van Heusden wrote: From what I read on wikipedia, Valgrind runs things in a virtual machine and from my experience (wrote an MSX (z80) emulator once, no twice) you can emulate everything, maybe a tad slow. Valgrind provides a simulated cpu, but not a

Re: [Valgrind-users] system crash

2012-04-17 Thread Folkert van Heusden
Valgrind provides a simulated cpu, but not a simulated OS and simulated mmu etc etc. In other words, Valgrind runs a unix application process on top of a virtual cpu, Valgrind does not provide a virtual machine like kvm or Xen or ... hmmm ok. it seems it can't handle corruptions that nicely:

Re: [Valgrind-users] system crash

2012-04-17 Thread Philippe Waroquiers
On Tue, 2012-04-17 at 21:02 +0200, Folkert van Heusden wrote: Valgrind provides a simulated cpu, but not a simulated OS and simulated mmu etc etc. In other words, Valgrind runs a unix application process on top of a virtual cpu, Valgrind does not provide a virtual machine like kvm or Xen

Re: [Valgrind-users] system crash

2012-04-17 Thread Folkert van Heusden
Hi Philippe, hmmm ok. it seems it can't handle corruptions that nicely: Not too sure I understand. The below msgs from Valgrind are indicating (probable/possible) bugs. Apart of reporting the error, the behaviour is (usually) not influenced too much (compared to a native execution).

Re: [Valgrind-users] system crash

2012-04-17 Thread Philippe Waroquiers
On Tue, 2012-04-17 at 21:55 +0200, Folkert van Heusden wrote: The problem I see is that the stacktraces seem to be incorrect. gdb unwinder might work better = try with the Valgrind gdbserver (give --vgdb-error=0 arg to Valgrind, and follow instructions to attach gdb, and then 'continue' your

[Valgrind-users] system crash

2012-04-15 Thread Folkert van Heusden
Hi, I'm trying to debug this (opengl) application I'm writing. Now something odd happens: when I run it in gdb, it occasionally sigsegvs which is not ok but expected, but when ran under valgrind the whole system crashes. I think it starts swapping like hell, but far more than the usual out of

Re: [Valgrind-users] system crash

2012-04-15 Thread Philippe Waroquiers
On Sun, 2012-04-15 at 19:17 +0200, Folkert van Heusden wrote: Hi, I'm trying to debug this (opengl) application I'm writing. Now something odd happens: when I run it in gdb, it occasionally sigsegvs which is not ok but expected, but when ran under valgrind the whole system crashes. I think

Re: [Valgrind-users] system crash

2012-04-15 Thread Folkert van Heusden
I'm trying to debug this (opengl) application I'm writing. Now something odd happens: when I run it in gdb, it occasionally sigsegvs which is not ok but expected, but when ran under valgrind the whole system crashes. I think it starts swapping like hell, but far more than the usual out