Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash running Java application on aarch64 #2506

Open
algrant-arm opened this issue Jul 7, 2017 · 3 comments
Open

Crash running Java application on aarch64 #2506

algrant-arm opened this issue Jul 7, 2017 · 3 comments

Comments

@algrant-arm
Copy link
Contributor

Any Java program will crash on aarch64.

$ cat Hello.java
public class Hello {
   public static void main(String[] args) {
      System.out.println("Hello world!");
   }
}
$ javac Hello.java
$ ../dynamorio/build/bin64/drrun -- java Hello
<Application /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.77-1.b03.fc22.aarch64/jre/bin/java (20973).  DynamoRIO internal crash at PC 0x004553006d6f632e.  Please report this at http://dynamorio.org/issues/.  Program aborted.
Received SIGother at unknown pc 0x004553006d6f632e in thread 20973
Base: 0x000002aade560000
Registers:	eflags=0x0000000060000000
version 6.2.17347, custom build
-no_dynamic_options -code_api -stack_size 128K -max_elide_jmp 0 -max_elide_call 0 -vmm_block_size 64K -initial_heap_unit_size 192K -initial_global_heap_unit_size 192K -heap_commit_increment 64K -cache_commit_increment 0x10000 -early_inject -emulate_brk -no_inline_ignored_syscalls -native_exec_default_list '' -no_native_e
0x000003ffe3ed0ef0 0x000003ff7de47adc
0x000003ffe3ed0f60 0x000003ff7de446b0
0x000003ffe3ed1000 0x000003ff7de45038
0x000003ffe3ed10c0 0x0000000000400648
0x000003ffe3ed5200 0x000003ff7dc9f924
0x000003ffe3ed5210 0x0000000000400680>

Debug build gives more info:

$ ../dynamorio/builddeb/bin64/drrun -- java Hello
<Starting application /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.77-1.b03.fc22.aarch64/jre/bin/java (21028)>
<Paste into GDB to debug DynamoRIO clients:
set confirm off
add-symbol-file '/home/agrant/dynamorio/builddeb/lib64/debug/libdynamorio.so' 0x000002aaab0af7c0
>
<Initial options = -no_dynamic_options -code_api -stack_size 128K -max_elide_jmp 0 -max_elide_call 0 -vmm_block_size 64K -initial_heap_unit_size 192K -initial_global_heap_unit_size 192K -heap_commit_increment 64K -cache_commit_increment 0x10000 -early_inject -emulate_brk -no_inline_ignored_syscalls -native_exec_default_list '' -no_native_exec_managed_code -no_indcall2direct >
<get_memory_info mismatch! (can happen if os combines entries in /proc/pid/maps)
	os says: 0x000003ff841a0000-0x000003ff841f0000 prot=0x00000000
	cache says: 0x000003ff841a0000-0x000003ff84200000 prot=0x00000000
>
<(1+x) Handling our fault in a TRY at 0x000002aaab3902f4>
<Application /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.77-1.b03.fc22.aarch64/jre/bin/java (21028).  Internal Error: DynamoRIO debug check failure: /home/agrant/dynamorio/core/unix/signal.c:4836 syscall_signal || safe_is_in_fcache(dcontext, pc, (byte *)sc->SC_XSP)
(Error occurred @27140 frags)
version 6.2.17347, custom build
-no_dynamic_options -code_api -stack_size 128K -max_elide_jmp 0 -max_elide_call 0 -vmm_block_size 64K -initial_heap_unit_size 192K -initial_global_heap_unit_size 192K -heap_commit_increment 64K -cache_commit_increment 0x10000 -early_inject -emulate_brk -no_inline_ignored_syscalls -native_exec_default_list '' -no_native_e
0x000000005186e930 0x000002aaab1ac124
0x000000005186eac0 0x000002aaab3e3cd0
0x000000005186ed00 0x000002aaab3be5d4
0x000000005186fff0 0x000003ff86717ee8
0x000003fff0596e80 0x000003ff866b7adc
0x000003fff0596ef0 0x000003ff866b46b0
0x000003fff0596f90 0x000003ff866b5038
0x000003fff0597050 0x0000000000400648
0x000003fff059b190 0x000003ff8650f924
0x000003fff059b1a0 0x0000000000400680>
0x000003ffe3ed5200 0x000003ff7dc9f924
0x000003ffe3ed5210 0x0000000000400680>
@algrant-arm
Copy link
Contributor Author

Similar crash seen with node.js:

drrun -- node

@egrimley
Copy link
Contributor

egrimley commented Jul 7, 2017

See #2425 about Node.js. Does the patch in that issue, which let Node.js run, also work for Java?

@algrant-arm
Copy link
Contributor Author

No... and in fact it doesn't fix node for me either. I have noticed that there are sometimes differences between the crashes, even when I disable ASLR. So this may be a layout sensitive bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants