-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
jhsdb does not work with coredump #2579
Comments
I checked the core file, memory segments for
However there are other memory segments which starts with same address of
|
In Linux, native image would call In my case, I can see following symbols in libjvmcicompiler.so in upstream:
According to hs_err log, libjvmcicompiler.so was loaded to following addresses:
From core (
I guess ImageHeapLayoutInfo.java would have incorrect value for writable sections because NativeBootImage::build uses it for setting |
I found out the cause. Substrate VM expects to contain sections both RO and RW. Thus
Of couse we can control it via
|
From Substrate VM-side, the mapping of the image heap looks fine. It is true that |
I don't think it is a bug on jhsdb. jhsdb attempt to parse all PT_LOAD segment in the core and binaries. Linux kernel would load PT_LOAD segments in shared libraries (ELF). If you don't want to make the whole image heap writable, it should be separated as another segments. |
Does It is not a bug on jhsdb, but I think we can avoid it if we apply following patch to LabsJDK:
I will send PR to LabsJDK if it is ok. |
I've sent PR for SA side fix in graalvm/labs-openjdk-11#9 . I will close this issue if it is merged. |
@zakkak do you have an opinion on graalvm/labs-openjdk-11#9 (comment)? |
I fixed this issue in both jdk/jdk and jdk-update/jdk11u-dev. I believe this 11u change will be backported to Labs JDK, so I close this issue. |
I played Truffle NFI on GraalVM, but I cannot get Java stacks from coredump via jhsdb.
I saw DebuggerException on the console:
Steps to reproduce the issue
Describe GraalVM and your environment:
More details
I added
LIBSAPROC_DEBUG=1
when I ran jhsdb, I saw the debug messages as below.AFAICS 0x7f1bba69f000 seems to be
.svm_heap
section.The text was updated successfully, but these errors were encountered: