clang #2

Closed
DarkCat09 wants to merge 2 commits from dev/dc09 into main
Owner
No description provided.
DarkCat09 added 2 commits 2025-03-14 16:22:06 +03:00
disable optimizations to fix segfault
Some checks failed
Docker Image CI / build-and-push (map[build-args:[] context:./ dockerfile:Dockerfile.piped image_name:piped]) (push) Successful in 11s
Docker Image CI / build-and-push (map[build-args:[WITH_JDK=false] context:./ dockerfile:Dockerfile.openj9 image_name:openj9]) (push) Failing after 8m44s
8b0c793c98
a
Some checks failed
Docker Image CI / build-and-push (map[build-args:[] context:./ dockerfile:Dockerfile.piped image_name:piped]) (push) Successful in 10s
Docker Image CI / build-and-push (map[build-args:[WITH_JDK=false] context:./ dockerfile:Dockerfile.openj9 image_name:openj9]) (push) Failing after 2m41s
Docker Image CI / build-and-push (map[build-args:[] context:./ dockerfile:Dockerfile.piped image_name:piped]) (pull_request) Successful in 7s
Docker Image CI / build-and-push (map[build-args:[WITH_JDK=false] context:./ dockerfile:Dockerfile.openj9 image_name:openj9]) (pull_request) Failing after 17s
842b23b553
DarkCat09 closed this pull request 2025-03-14 16:22:17 +03:00
Author
Owner

OpenJ9 gives segfault (even on java --version) when built with clang-20.

OpenJ9 gives segfault (even on `java --version`) when built with clang-20.
Author
Owner

I gave up after two days of investigating the issue, do not think that i didn't even tried lldb

I gave up after two days of investigating the issue, do not think that i didn't even tried lldb
Author
Owner

Btw, why not share the backtrace

(cflags/cxxflags are -O0 -g -no-flto -Wno-error=nontrivial-memcall)

(lldb) r
Process 193 launched: '/build/src/build/linux-x86_64-server-slowdebug/jdk/bin/java' (x86_64)
Process 193 stopped
* thread #2, name = 'java', stop reason = signal SIGSEGV: address not mapped to object (fault address=0x58027e08)
    frame #0: 0x00007f915d9c2b4a libj9hookable29.so`J9HookRegisterWithCallSitePrivate(hookInterface=0x00007f9158025730, taggedEventNum=0, function=(libj9vm29.so`hookRegistrationEvent at vmhook.c:94), callsite="/build/src/openj9/runtime/vm/vmhook.c:65", userData=0x00007f91580233c0, agentID=1) at hookable.cpp:0
   368  }
   369
   370  static intptr_t
-> 371  J9HookRegisterWithCallSitePrivate(struct J9HookInterface **hookInterface, uintptr_t taggedEventNum, J9HookFunction function, const char *callsite, void *userData, uintptr_t agentID)
   372  {
   373          J9CommonHookInterface *commonInterface = (J9CommonHookInterface *)hookInterface;
   374          J9HookRegistrationEvent eventStruct;
note: This address is not associated with a specific line of code. This may be due to compiler optimizations.
(lldb) p
error: 'dwim-print' takes a variable or expression
(lldb) p hookInterface
(J9HookInterface **) 0x00007f9158025730
(lldb) p eventStruct
(J9HookRegistrationEvent) {
  eventNum = 140262223380528
  function = 0x00007f915d96dd10 (libj9prt29.so`omrmem_categories_increment_counters + 64 [inlined] omrmem_categories_increment_bytes at omrmemcategories.c:80:2
libj9prt29.so`omrmem_categories_increment_counters + 64 at omrmemcategories.c:69:2)
  userData = 0x00007f915dffdea8
  isRegistration = 140262223572288
  agentID = 4096
}
(lldb) bt
* thread #2, name = 'java', stop reason = signal SIGSEGV: address not mapped to object (fault address=0x58027e08)
  * frame #0: 0x00007f915d9c2b4a libj9hookable29.so`J9HookRegisterWithCallSitePrivate(hookInterface=0x00007f9158025730, taggedEventNum=0, function=(libj9vm29.so`hookRegistrationEvent at vmhook.c:94), callsite="/build/src/openj9/runtime/vm/vmhook.c:65", userData=0x00007f91580233c0, agentID=1) at hookable.cpp:0
    frame #1: 0x00007f915d9c2813 libj9hookable29.so`J9HookRegisterWithCallSite(hookInterface=<unavailable>, taggedEventNum=<unavailable>, function=<unavailable>, callsite=<unavailable>, userData=<unavailable>) at hookable.cpp:517:9
    frame #2: 0x00007f915da8420f libj9vm29.so`initializeVMHookInterface(vm=0x00007f91580233c0) at vmhook.c:65:6
    frame #3: 0x00007f915da4b890 libj9vm29.so`protectedInitializeJavaVM(portLibrary=0x00007f915dfff2c0, userData=0x00007f915e0808e8) at jvminit.c:7549:11
    frame #4: 0x00007f915d974645 libj9prt29.so`omrsig_protect(portLibrary=0x00007f915dfff2c0, fn=(libj9vm29.so`protectedInitializeJavaVM at jvminit.c:7272), fn_arg=0x00007f915e0808e8, handler=(libj9vm29.so`structuredSignalHandlerVM at gphandle.c:596), handler_arg=0x00007f91580233c0, flags=506, result=<unavailable>) at omrsignal.c:425:12
    frame #5: 0x00007f915da49b8e libj9vm29.so`initializeJavaVM(osMainThread=<unavailable>, vmPtr=0x00007f915dfff2b0, createParams=0x00007f915e080a50) at jvminit.c:1265:11
    frame #6: 0x00007f915da407dc libj9vm29.so`J9_CreateJavaVM(p_vm=0x00007f915dfff2b0, p_env=0x00007f915e081e40, createParams=0x00007f915e080a50) at jniinv.c:152:16
    frame #7: 0x00007f915dfd14ec libjvm.so`JNI_CreateJavaVM_impl(pvm=0x00007f915e081e48, penv=0x00007f915e081e40, vm_args=0x00007f9158000b70, isJITServer=0) at jvm.c:2400:11
    frame #8: 0x00007f915e08eb4a libjvm.so`JNI_CreateJavaVM(pvm=0x00007f915e081e48, penv=0x00007f915e081e40, vm_args=<unavailable>) at redirector.c:806:11
    frame #9: 0x00007f915e2c06a9 libjli.so`InitializeJVM(pvm=0x00007f915e081e48, penv=0x00007f915e081e40, ifn=0x00007f915e081e50) at java.c:1591:9
    frame #10: 0x00007f915e2bf1b0 libjli.so`JavaMain(_args=0x00007ffe40ec4f28) at java.c:488:10
    frame #11: 0x00007f915e2c3e85 libjli.so`ThreadJavaMain(args=0x00007ffe40ec4f28) at java_md.c:691:29
    frame #12: 0x00007f915e13bcb3 libc.so.6`___lldb_unnamed_symbol3690 + 723
    frame #13: 0x00007f915e1cd0c4 libc.so.6`__clone + 68
Btw, why not share the backtrace (cflags/cxxflags are `-O0 -g -no-flto -Wno-error=nontrivial-memcall`) ``` (lldb) r Process 193 launched: '/build/src/build/linux-x86_64-server-slowdebug/jdk/bin/java' (x86_64) Process 193 stopped * thread #2, name = 'java', stop reason = signal SIGSEGV: address not mapped to object (fault address=0x58027e08) frame #0: 0x00007f915d9c2b4a libj9hookable29.so`J9HookRegisterWithCallSitePrivate(hookInterface=0x00007f9158025730, taggedEventNum=0, function=(libj9vm29.so`hookRegistrationEvent at vmhook.c:94), callsite="/build/src/openj9/runtime/vm/vmhook.c:65", userData=0x00007f91580233c0, agentID=1) at hookable.cpp:0 368 } 369 370 static intptr_t -> 371 J9HookRegisterWithCallSitePrivate(struct J9HookInterface **hookInterface, uintptr_t taggedEventNum, J9HookFunction function, const char *callsite, void *userData, uintptr_t agentID) 372 { 373 J9CommonHookInterface *commonInterface = (J9CommonHookInterface *)hookInterface; 374 J9HookRegistrationEvent eventStruct; note: This address is not associated with a specific line of code. This may be due to compiler optimizations. (lldb) p error: 'dwim-print' takes a variable or expression (lldb) p hookInterface (J9HookInterface **) 0x00007f9158025730 (lldb) p eventStruct (J9HookRegistrationEvent) { eventNum = 140262223380528 function = 0x00007f915d96dd10 (libj9prt29.so`omrmem_categories_increment_counters + 64 [inlined] omrmem_categories_increment_bytes at omrmemcategories.c:80:2 libj9prt29.so`omrmem_categories_increment_counters + 64 at omrmemcategories.c:69:2) userData = 0x00007f915dffdea8 isRegistration = 140262223572288 agentID = 4096 } ``` ``` (lldb) bt * thread #2, name = 'java', stop reason = signal SIGSEGV: address not mapped to object (fault address=0x58027e08) * frame #0: 0x00007f915d9c2b4a libj9hookable29.so`J9HookRegisterWithCallSitePrivate(hookInterface=0x00007f9158025730, taggedEventNum=0, function=(libj9vm29.so`hookRegistrationEvent at vmhook.c:94), callsite="/build/src/openj9/runtime/vm/vmhook.c:65", userData=0x00007f91580233c0, agentID=1) at hookable.cpp:0 frame #1: 0x00007f915d9c2813 libj9hookable29.so`J9HookRegisterWithCallSite(hookInterface=<unavailable>, taggedEventNum=<unavailable>, function=<unavailable>, callsite=<unavailable>, userData=<unavailable>) at hookable.cpp:517:9 frame #2: 0x00007f915da8420f libj9vm29.so`initializeVMHookInterface(vm=0x00007f91580233c0) at vmhook.c:65:6 frame #3: 0x00007f915da4b890 libj9vm29.so`protectedInitializeJavaVM(portLibrary=0x00007f915dfff2c0, userData=0x00007f915e0808e8) at jvminit.c:7549:11 frame #4: 0x00007f915d974645 libj9prt29.so`omrsig_protect(portLibrary=0x00007f915dfff2c0, fn=(libj9vm29.so`protectedInitializeJavaVM at jvminit.c:7272), fn_arg=0x00007f915e0808e8, handler=(libj9vm29.so`structuredSignalHandlerVM at gphandle.c:596), handler_arg=0x00007f91580233c0, flags=506, result=<unavailable>) at omrsignal.c:425:12 frame #5: 0x00007f915da49b8e libj9vm29.so`initializeJavaVM(osMainThread=<unavailable>, vmPtr=0x00007f915dfff2b0, createParams=0x00007f915e080a50) at jvminit.c:1265:11 frame #6: 0x00007f915da407dc libj9vm29.so`J9_CreateJavaVM(p_vm=0x00007f915dfff2b0, p_env=0x00007f915e081e40, createParams=0x00007f915e080a50) at jniinv.c:152:16 frame #7: 0x00007f915dfd14ec libjvm.so`JNI_CreateJavaVM_impl(pvm=0x00007f915e081e48, penv=0x00007f915e081e40, vm_args=0x00007f9158000b70, isJITServer=0) at jvm.c:2400:11 frame #8: 0x00007f915e08eb4a libjvm.so`JNI_CreateJavaVM(pvm=0x00007f915e081e48, penv=0x00007f915e081e40, vm_args=<unavailable>) at redirector.c:806:11 frame #9: 0x00007f915e2c06a9 libjli.so`InitializeJVM(pvm=0x00007f915e081e48, penv=0x00007f915e081e40, ifn=0x00007f915e081e50) at java.c:1591:9 frame #10: 0x00007f915e2bf1b0 libjli.so`JavaMain(_args=0x00007ffe40ec4f28) at java.c:488:10 frame #11: 0x00007f915e2c3e85 libjli.so`ThreadJavaMain(args=0x00007ffe40ec4f28) at java_md.c:691:29 frame #12: 0x00007f915e13bcb3 libc.so.6`___lldb_unnamed_symbol3690 + 723 frame #13: 0x00007f915e1cd0c4 libc.so.6`__clone + 68 ```
DarkCat09 deleted branch dev/dc09 2025-03-14 16:28:36 +03:00
Some checks failed
Docker Image CI / build-and-push (map[build-args:[] context:./ dockerfile:Dockerfile.piped image_name:piped]) (push) Successful in 10s
Docker Image CI / build-and-push (map[build-args:[WITH_JDK=false] context:./ dockerfile:Dockerfile.openj9 image_name:openj9]) (push) Failing after 2m41s
Docker Image CI / build-and-push (map[build-args:[] context:./ dockerfile:Dockerfile.piped image_name:piped]) (pull_request) Successful in 7s
Docker Image CI / build-and-push (map[build-args:[WITH_JDK=false] context:./ dockerfile:Dockerfile.openj9 image_name:openj9]) (pull_request) Failing after 17s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: DarkCat09/docker-openj9-piped#2
No description provided.