Closed GoogleCodeExporter closed 9 years ago
It looks like the deadlock is caused by the underlying problem, which is the
assertion failure. The stacktrace shows that BeginRegionLocked is calling exit,
which is because of the failed check(regions_ != NULL). So the question is,
why is
that happening? I'll see if I can reproduce it locally.
Does this happen for every python script you run, or just some? Do you still
see the
check failure if you run something like
env HEAPCHECK=normal python -c pass
?
Original comment by csilv...@gmail.com
on 21 Dec 2008 at 2:08
Sorry for a late reply.
The scenario discussed is reproducible by all the scripts I have. But as these
are a
little different from the usual scripts(C code is invoked), I can not comment
about
the usual python scripts.
I executed "env HEAPCHECK=normal python -c pass", it went fine. There was no
output
or any visible problem.
Original comment by Aaditya....@gmail.com
on 30 Dec 2008 at 1:52
Hmm, I'm not sure I can solve this without being able to reproduce it. Is
there an
example of a python script + C file you can share, that triggers the problem
for you?
I'll try compiling it all here, to see if I can reproduce it locally.
Original comment by csilv...@gmail.com
on 7 Jan 2009 at 10:33
I'm closing this bug CannotReproduce. If you can provide any source code that
triggers the problem for you, I'll be glad to look into it.
Original comment by csilv...@gmail.com
on 6 Mar 2009 at 8:13
Thanks for the reproducible test case; that's been very helpful.
This is definitely different from the way heap-checker is intended to be used,
where it's started at program-begin time (rather than at a dlopen time, like
happens here). I don't know if that's the cause of the trouble, though.
The fact that regions_ is NULL means that the tcmalloc hooks were never called
for mmap or sbrk. This indicates to me that python (maybe?) is controlling the
memory access, and that the heap-checker wouldn't show anything interesting
anyway. Of course, this may just be because your program doesn't allocate any
memory. (Though I tried adding a random malloc() to the .cpp file, and it
didn't seem to make a difference.)
I tried running things so that python was under tcmalloc as well:
env LD_PRELOAD=/home/csilvers/opensource/google-perftools/.libs/libtcmalloc.so HEAPCHECK=strict python
That seemed to work fine. So even though I don't normally recommend using
LD_PRELOAD, I think it may be the only way to go here (unless you want to
recompile python so it links in tcmalloc).
I'm closing this WontFix, because I think there's an intrinsic problem with
trying to start the heap-checker from a dynamic library, and there seems to be
a workable workaround. If the workaround doesn't work for you, feel free to
reopen, but I can't promise how much we'll be able to fix things. (We can
probably avoid the assertion failure, but I'm not sure we can replace it by
something useful...)
Original comment by csilv...@gmail.com
on 26 Jan 2011 at 12:57
Original issue reported on code.google.com by
Aaditya....@gmail.com
on 16 Dec 2008 at 6:11