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

aarch64 asserts and crashes - Target address is out of range #18626

Closed
pshipton opened this issue Dec 14, 2023 · 5 comments
Closed

aarch64 asserts and crashes - Target address is out of range #18626

pshipton opened this issue Dec 14, 2023 · 5 comments

Comments

@pshipton
Copy link
Member

https://openj9-jenkins.osuosl.org/job/Test_openjdk21_j9_sanity.openjdk_aarch64_mac_Nightly_testList_0/73

08:41:43  Assertion failed at /Users/****/workspace/Build_JDK21_aarch64_mac_Nightly/openj9/runtime/compiler/aarch64/runtime/Recomp.cpp:44: distance <= TR::Compiler->target.cpu.maxUnconditionalBranchImmediateForwardOffset() && distance >= TR::Compiler->target.cpu.maxUnconditionalBranchImmediateBackwardOffset()
08:41:43  	Target address is out of range
08:41:43  
08:41:43  Unhandled exception
08:41:43  Type=Unhandled trap vmState=0x00040000
08:41:43  J9Generic_Signal_Number=00000108 Signal_Number=00000005 Error_Value=00000000 Signal_Code=00000000
08:41:43  Handler1=0000000100C3C4CC Handler2=0000000100A6A068
08:41:43  x0=0000000000000000 x1=0000000000000000 x2=0000000000000E03 x3=0000000000000000
08:41:43  x4=000000010222B3D5 x5=000000016F88DE90 x6=0000000000000065 x7=0000000000000000
08:41:43  x8=C6A92A18A04D0702 x9=C6A92A19CFC5F702 x10=000000016F7BD5A0 x11=FFFFFFFFFFFFFFE9
08:41:43  x12=FFFFFFFFFFFFFFE9 x13=000000010224D1AB x14=0000000000000055 x15=0000000000000054
08:41:43  x16=0000000000000148 x17=00000001FEAAB678 x18=0000000000000001 x19=0000000000000005
08:41:43  x20=000000016F88F000 x21=0000000000000E03 x22=000000016F88F0E0 x23=000000011072B95C
08:41:43  x24=0000600000976528 x25=0000600000260860 x26=0000000000000000 x27=0000000000000003
08:41:43  x28=000000013282BD78 x29(FP)=000000016F88DE20 x30(LR)=00000001A497FEE0 x31(SP)=000000016F88DE00
08:41:43  PC=00000001A494AD78 SP=000000016F88DE00
08:41:43  v0 0000000000000000 (f: 0.000000, d: 0.000000e+00)
08:41:43  v1 0000000000000000 (f: 0.000000, d: 0.000000e+00)
08:41:43  v2 0000000000000000 (f: 0.000000, d: 0.000000e+00)
08:41:43  v3 0000000000000000 (f: 0.000000, d: 0.000000e+00)
08:41:43  v4 523813a0204cbde5 (f: 541900288.000000, d: 1.197388e+88)
08:41:43  v5 00000000c14daaa8 (f: 3243092736.000000, d: 1.602301e-314)
08:41:43  v6 94446f0194446f01 (f: 2487512832.000000, d: -4.855772e-211)
08:41:43  v7 000e1781000e1781 (f: 923521.000000, d: 1.959708e-308)
08:41:43  v8 000003c10000745f (f: 29791.000000, d: 2.039238e-311)
08:41:43  v9 0000000000000000 (f: 0.000000, d: 0.000000e+00)
08:41:43  v10 0000000000000000 (f: 0.000000, d: 0.000000e+00)
08:41:43  v11 0000000000000000 (f: 0.000000, d: 0.000000e+00)
08:41:43  v12 0000000000000000 (f: 0.000000, d: 0.000000e+00)
08:41:43  v13 0000000000000000 (f: 0.000000, d: 0.000000e+00)
08:41:43  v14 0000000000000000 (f: 0.000000, d: 0.000000e+00)
08:41:43  v15 0000000000000000 (f: 0.000000, d: 0.000000e+00)
08:41:43  v16 bfd0000000000000 (f: 0.000000, d: -2.500000e-01)
08:41:43  v17 3fd55a83caded555 (f: 3403601152.000000, d: 3.336496e-01)
08:41:43  v18 bf54bd32006298a0 (f: 6461600.000000, d: -1.265811e-03)
08:41:43  v19 3fe62e42fefa39ef (f: 4277811712.000000, d: 6.931472e-01)
08:41:43  v20 03ac482603dbc037 (f: 64733240.000000, d: 5.668155e-291)
08:41:43  v21 010d5298011fb3f1 (f: 18854896.000000, d: 1.336218e-303)
08:41:43  v22 5236c8ee51f4efb0 (f: 1375006592.000000, d: 1.133145e+88)
08:41:43  v23 0000000000000000 (f: 0.000000, d: 0.000000e+00)
08:41:43  v24 02acd27d0302111e (f: 50467104.000000, d: 8.814176e-296)
08:41:43  v25 007e6c2600a68b3d (f: 10914621.000000, d: 2.707688e-306)
08:41:43  v26 53c525085347c751 (f: 1397213056.000000, d: 3.528493e+95)
08:41:43  v27 0000000000000000 (f: 0.000000, d: 0.000000e+00)
08:41:43  v28 048123c604e7b1d7 (f: 82293208.000000, d: 5.628056e-287)
08:41:43  v29 006aa88000903a75 (f: 9452149.000000, d: 1.186329e-306)
08:41:43  v30 5204976651787760 (f: 1366849408.000000, d: 1.280073e+87)
08:41:43  v31 000000003f400000 (f: 1061158912.000000, d: 5.242822e-315)
08:41:43  Module=/usr/lib/system/libsystem_kernel.dylib
08:41:43  Module_base_address=00000001A4941000 Symbol=__pthread_kill
08:41:43  Symbol_address=00000001A494AD70
08:41:43  Target=2_90_20231215_130 (Mac OS X 12.6.7)
08:41:43  CPU=aarch64 (8 logical CPUs) (0x400000000 RAM)
08:41:43  ----------- Stack Backtrace -----------
08:41:43  ---------------------------------------
@pshipton
Copy link
Member Author

Many of these in the OMR acceptance build, but the build in the description is without the OMR change.
https://openj9-jenkins.osuosl.org/job/Pipeline-OMR-Acceptance/621/
https://openj9-jenkins.osuosl.org/job/Test_openjdk21_j9_sanity.functional_aarch64_linux_OMR_testList_0/57

Triage indicates this is caused by #18269
@dylanjtuttle @0xdaryl

Unless there is a quick fix, we should revert the change.

@dylanjtuttle
Copy link
Contributor

I'm doing some investigating and if I don't make any progress in the next couple of hours, I'll revert the PR. Thanks for the heads up!

@knn-k
Copy link
Contributor

knn-k commented Dec 19, 2023

I reproduced the assertion failure locally.

distance <= TR::Compiler->target.cpu.maxUnconditionalBranchImmediateForwardOffset() && distance >= TR::Compiler->target.cpu.maxUnconditionalBranchImmediateBackwardOffset()

The distance value was 0xffffff8c when the assertion failed, and that is larger than maxUnconditionalBranchImmediateForwardOffset(), which is 0x07fffffc.
The type of distance is intptr_t, and its value must be 0xffffffffffffff8c instead for representing a negative distance on AArch64.

@hzongaro
Copy link
Member

The type of distance is intptr_t, and its value must be 0xffffffffffffff8c instead for representing a negative distance on AArch64.

Thanks, @knn-k. I believe @0xdaryl also came to the same conclusion and has opened pull request #18633 to address the problem.

@knn-k
Copy link
Contributor

knn-k commented Dec 19, 2023

I didn't notice there was a PR already. Thanks.

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

4 participants