double free or corruption
Tom Rodriguez
tom.rodriguez at oracle.com
Tue Jul 22 18:15:16 UTC 2014
In the past valgrind hasn’t worked well with hotspot because of various tricks it plays with storage management but the error below doesn’t look unreasonable. At a guess I’d say this code is pointing at line 217 in icBuffer.cpp where the CompiledICHolder is being freed.
while (holder != NULL) {
CompiledICHolder* next = holder->next();
delete holder;
I don’t think any particularly clever tricks are being played here so I don’t know why it would be reporting a problem. It could just be valgrind getting confused.
Have you tried running with the debug options of GNU malloc? Setting MALLOC_CHECK_=1 in your environment will enable some debug code which reports the errors it detects. The value 2 causes it to abort immediately instead It can’t detect everything valgrind does but double frees and other basic errors are caught.
tom
On Jul 22, 2014, at 11:03 AM, Deneau, Tom <tom.deneau at amd.com> wrote:
> I tried valgrind on a fairly simple mx unittest run for which the list of unittests was basically 32 copies of com.oracle.graal.jtt.bytecode.BC_aload_1
> com.oracle.graal.jtt.bytecode.BC_aload_0
> com.oracle.graal.jtt.bytecode.BC_aload_3
> com.oracle.graal.jtt.bytecode.BC_aload_2
>
> I get some valgrind errors of the following form. Is this expected?
> I seem to only see this on the product build, not fastdebug or debug.
>
> ==11432== Address 0x206c0ed8 is 8 bytes inside a block of size 24 free'd
> ==11432== at 0x4C2B60C: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==11432== by 0x61E5810: InlineCacheBuffer::update_inline_caches() (allocation.inline.hpp:83)
> ==11432== by 0x64EFF9F: SafepointSynchronize::do_cleanup_tasks() (safepoint.cpp:527)
> ==11432== by 0x64F0914: SafepointSynchronize::begin() (safepoint.cpp:403)
> ==11432== by 0x65FCFB9: VMThread::loop() (vmThread.cpp:496)
> ==11432== by 0x65FD411: VMThread::run() (vmThread.cpp:274)
> ==11432== by 0x6459EC1: java_start(Thread*) (os_linux.cpp:860)
>
>
> -- Tom
>
>
> -----Original Message-----
> From: graal-dev [mailto:graal-dev-bounces at openjdk.java.net] On Behalf Of Deneau, Tom
> Sent: Tuesday, July 22, 2014 11:33 AM
> To: graal-dev at openjdk.java.net
> Subject: double free or corruption
>
> What is the best technique to debug an error like the following (after having made some hotspot changes)...
>
> -- Tom
>
> *** Error in `/home/user1/SumatraDemos/graal/jdk1.8.0-internal/product/bin/java': double free or corruption (!prev): 0x00002b80e8517a30 ***
>
More information about the graal-dev
mailing list