harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Timoshenko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-3817) [drlvm][jit] size == 1 and illegal address reported to jvmti for inlined methods causes a crash
Date Tue, 08 May 2007 09:51:15 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-3817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494230
] 

George Timoshenko commented on HARMONY-3817:
--------------------------------------------

the patch fixes the problem of assert in debug mode.

but there are still regions with size==1.

They are caused by that code patching fix.

In code patching solution OPT emits several NOPs before each direct call that may require
patching at runtime.

there are 3 nops on ia32 and 13 nops on em64t.
The problem is only one nop is emitted as a common inst all the others are emitted directly
and nobody knows about them.
So this first nop can be reported as a separate region of size ==1byte.

I am working on the solution

> [drlvm][jit] size == 1 and illegal address reported to jvmti for inlined methods causes
a crash
> -----------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3817
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3817
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: at least win32 and linux64
>            Reporter: Rustem Rafikov
>         Attachments: HARMONY-3817.patch
>
>
> Starting on r528408 (after H-3189 commit; April, Friday 13 :)) method size == 1 and illegal
address are reported for inlined methods. 
> Look at the stack traces:
> 1. Release build
> Right after crashing:
> SIGSEGV in VM code.
> Stack trace:
>   0: DumpMethodLoad (jvmtisym/src/jvmtisym.c:871)
>   1: jvmti_send_region_compiled_method_load_event (??:-1)
>   2: java/lang/EMThreadSupport.onTimeout()V (EMThreadSupport.java:-2)
>   3: java/lang/EMThreadSupport.run()V (EMThreadSupport.java:68)
>   4: java/lang/EMThreadSupport$1.run()V (EMThreadSupport.java:44)
>   5: java/lang/Thread.run()V (Thread.java:-1)
>   6: java/lang/Thread.runImpl()V (Thread.java:-1)
> <end of stack trace>
> Using gdb:
> gdb -c core ./java:
> [...]
> (gdb) bt
> #0  0x00002aab0cb73cfe in DumpMethodLoad (jvmti_env=0x5d43e0, functionID=0x1263b50, meth_sz=1,
address=0x2aab2ec41c61,
>     map_length=1, map=0x2aab0e35a500, compile_info=0x0) at jvmtisym.c:871
> #1  0x00002aaaaac63209 in jvmti_send_region_compiled_method_load_event ()
>    from /home/lab_perfstat/rrafikov/spec/platform/r528408-2/bin/default/libharmonyvm.so
> #2  0x00002aaaaac35856 in compiled_method_load ()
>    from /home/lab_perfstat/rrafikov/spec/platform/r528408-2/bin/default/libharmonyvm.so
> #3  0x00002aaaacfc14b4 in Jitrino::CompilationInterface::sendCompiledMethodLoadEvent
()
>    from /home/lab_perfstat/rrafikov/spec/platform/r528408-2/bin/default//libjitrino.so
> #4  0x00002aaaacfe7d09 in Jitrino::Ia32::CodeEmitter::reportInlinedMethod ()
>    from /home/lab_perfstat/rrafikov/spec/platform/r528408-2/bin/default//libjitrino.so
> #5  0x00002aaaacfe7f8e in Jitrino::Ia32::CodeEmitter::reportCompiledInlinees ()
>    from /home/lab_perfstat/rrafikov/spec/platform/r528408-2/bin/default//libjitrino.so
> #6  0x00002aaaacfe545d in Jitrino::Ia32::CodeEmitter::runImpl ()
> [...]
> (gdb) disass 0x2aab2ec41c61 0x2aab2ec41c62
> Dump of assembler code from 0x2aab2ec41c61 to 0x2aab2ec41c62:
> 0x00002aab2ec41c61:     Cannot access memory at address 0x2aab2ec41c61
> [...]
> Adding 'printf's shows a lot of methods are reported with meth_sz=1. 
> The crash can be workarounded by commenting reportCompiledInlinees call in codegenerator/ia32/Ia32CodeEmitter.cpp.
> 2. Debug build
> Debug build fails on assertion:
> java: platform/r528408/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp:175:
void Jitrino::Ia32::CompiledMethodInfo::includeInst(Jitrino::Ia32::Inst*, long long unsigned
int): Assertion `!locationMap.has(instStartAddr)' failed.
> SIGABRT in VM code.
> Stack trace:
>   0: raise (??:-1)
>   1: ?? (??:-1)
>   2: java/lang/EMThreadSupport.onTimeout()V (EMThreadSupport.java:-2)
>   3: java/lang/EMThreadSupport.run()V (EMThreadSupport.java:68)
>   4: java/lang/EMThreadSupport$1.run()V (EMThreadSupport.java:44)
>   5: java/lang/Thread.run()V (Thread.java:-1)
>   6: java/lang/Thread.runImpl()V (Thread.java:-1)
> <end of stack trace>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message