-
Notifications
You must be signed in to change notification settings - Fork 220
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
Segmentation Fault with -XX:NativeMemoryTracking=detail for 8u342 #411
Comments
Thanks for reporting, sorry about the issue. I can confirm I also see the same issue on my machine. We'll investigate this. |
The crash happens during initialization here:
It seems to be caused by #398 ("Updates for AL2022") which is specific to Corretto and not in OpenJDK 8u upstream. Specifically, #398 integrated 8207011: Remove uses of the register storage class specifier (see e704345) which removes the Without the intptr_t* _get_previous_fp() {
#ifdef SPARC_WORKS
...
#else
intptr_t **ebp __asm__ (SPELL_REG_FP);
#endif
return (intptr_t*) *ebp; // we want what it points to.
} which leads to loading from address (gdb) x /16i 'os::current_frame()'
0x7ffff6cc1030 <_ZN2os13current_frameEv>: push %rbp
0x7ffff6cc1031 <_ZN2os13current_frameEv+1>: mov %rsp,%rbp
0x7ffff6cc1034 <_ZN2os13current_frameEv+4>: push %r12
0x7ffff6cc1036 <_ZN2os13current_frameEv+6>: push %rbx
0x7ffff6cc1037 <_ZN2os13current_frameEv+7>: lea -0x40(%rbp),%r12
0x7ffff6cc103b <_ZN2os13current_frameEv+11>: mov %rdi,%rbx
0x7ffff6cc103e <_ZN2os13current_frameEv+14>: lea -0x15(%rip),%rdi # 0x7ffff6cc1030 <_ZN2os13current_frameEv>
0x7ffff6cc1045 <_ZN2os13current_frameEv+21>: sub $0x40,%rsp
0x7ffff6cc1049 <_ZN2os13current_frameEv+25>: mov %rbp,-0x48(%rbp)
0x7ffff6cc104d <_ZN2os13current_frameEv+29>: mov %rbp,-0x40(%rbp)
=> 0x7ffff6cc1051 <_ZN2os13current_frameEv+33>: movq 0x0,%xmm0 Before JDK-8207011, intptr_t* _get_previous_fp() {
#ifdef SPARC_WORKS
...
#else
register intptr_t **ebp __asm__ (SPELL_REG_FP);
#endif
return (intptr_t*) *ebp; // we want what it points to.
}```
And the generated code was:
```gdb
(gdb) x /16i 'os::current_frame()'
0x7ffff6cc17e0 <_ZN2os13current_frameEv>: push %rbp
0x7ffff6cc17e1 <_ZN2os13current_frameEv+1>: mov %rsp,%rbp
0x7ffff6cc17e4 <_ZN2os13current_frameEv+4>: push %r12
0x7ffff6cc17e6 <_ZN2os13current_frameEv+6>: push %rbx
0x7ffff6cc17e7 <_ZN2os13current_frameEv+7>: lea -0x40(%rbp),%r12
0x7ffff6cc17eb <_ZN2os13current_frameEv+11>: mov %rdi,%rbx
0x7ffff6cc17ee <_ZN2os13current_frameEv+14>: lea -0x15(%rip),%rdi # 0x7ffff6cc17e0 <_ZN2os13current_frameEv>
0x7ffff6cc17f5 <_ZN2os13current_frameEv+21>: sub $0x40,%rsp
0x7ffff6cc17f9 <_ZN2os13current_frameEv+25>: movq 0x0(%rbp),%xmm0
=> 0x7ffff6cc17fe <_ZN2os13current_frameEv+30>: mov %rsp,-0x48(%rbp)
0x7ffff6cc1802 <_ZN2os13current_frameEv+34>: movhps -0x48(%rbp),%xmm0 |
Might this bug occur in other situations than NativeMemoryTracking? |
here is a simpler reproducible.
|
We are seeing the same issue with 8u342. |
The issue has been fixed in 8.342.07.4 that is released today. |
Can confirm that the issue is solved, thanks for the quick response. |
Describe the bug
The java option -XX:NativeMemoryTracking=detail leads to a Segmentation fault in release 8.342.07.1 and 8.342.07.3.
It works with 8.332.08.1 and it also works with -XX:NativeMemoryTracking=summary and it also works in other jdk providers with 8u342, so it is very specific to Corretto.
To Reproduce
Just download the release and execute the following
amazon-corretto-8.342.07.3-linux-x64/bin/java -XX:NativeMemoryTracking=detail -version
You will immediately get a Segmentation fault
Expected behavior
No segmentation fault
Platform information
All linux platforms, also amazoncorretto:8u342 docker image
The text was updated successfully, but these errors were encountered: