develooper Front page | perl.perl5.porters | Postings from June 2016

Help in debugging intermittent crashes

Thread Next
From:
Father Chrysostomos
Date:
June 3, 2016 21:11
Subject:
Help in debugging intermittent crashes
Message ID:
20160603211148.10646.qmail@lists-nntp.develooper.com
This may not necessarily be on topic for p5p, unless it turns out that
perl is responsible for the crash I am getting. :-)

I have a script that uses dozens of modules and crashes every so
often, but I have to run it up to 800 times to get it to crash.  That
makes it very hard to debug.  I have reduced the script and cut the
number of modules in half, but now deleting but one line of code here
or there may make the crash go away, for seemingly no reason.  That
also makes it hard to debug.

I have tried setting a breakpoint in gdb on exit() which calls 'run',
so I can catch the crash, which I have done successfully, but it is
not helping.  I can see that memory is corrupted (a stash has had its
internal fields stomped on), but I can only catch the crash *after*
the bad code has wreaked its havoc.

If the crash were more predictable I could set a watchpoint on the
affected memory region, but that approach does not work here.

Any ideas?


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About