-
-
Notifications
You must be signed in to change notification settings - Fork 602
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
The graalvm-example fails with graalvm 1.0.0-rc13 #1031
Comments
You could try with |
@vjovanov Thanks for reaching out to us. Indeed using Our dynamic linker should be able to handle unmodified Linux ELFs so I wonder if there is a bug on our side in it. One thing we had to change in the past to support GraalVM, was enhancing OSv linker to support non fPIC shared objects (please see #1004). Relatedly I wonder if graalvm will support at some point position independent executables (pies)? Currently OSv only supports shared libraries and pies only. But I hope to support position dependant ones at some point as well. |
This article is the best documentation:
We support a mode where you will get a shared library with a Once this is produced you can simply call into |
@vjovanov I have just committed a new version of the original example that works with A couple of questions, if you do not mind:
Lastly, I noticed the native-netty-plot example does not work with latest GraalVM (I ended up using the RC15 community edition) as the |
Cool, glad that it works. I'll answer in order:
We had to move the feature for the official release. Well, just change the feature package and it will work. |
One can easily reproduce the issue by replacing rc12 with rc13 in the Makefile of the graalvm-example app and then building the image like so (I prefer ROFS and turn networking off to limit noise):
If one goes to the ./apps/graalvm-example and runs this directly on host:
it works fine.
Also same example works just fine with graalvm 1.0.0-rc12.
I spent some time digging and here is what I have found so far:
one can see this output:
-LinuxImageHeapProvider
-CopyingImageHeapProvider
I have also discovered that LinuxImageHeapProvider is new and was introduced in rc13 probably to optimize "heap handling". I am not 100% sure but I think that something fails in this section of LinuxImageHeapProvider - this code is actually pretty easy to read and has many comments that hopefully may lead to some good hints from some more experienced OSv developers :-)
and not mmap (but I think mmap is used internally when we load ELF objects but somehow it does not get registered by relevant tracepoints). Why would it try to write to a file? To mmaped file? Is is what some comments in LinuxImageHeapProvider indicate?
The rc12 does not show any vfs_pwritev calls instead one can see one mmap:
Any idea/hints how to debug/troubleshoot it better?
Some other links:
https://github.com/oracle/graal/blob/34c6dbb3c78b48b789e44621cda3f31ecda5f2b4/substratevm/C-API.md
https://github.com/oracle/graal/blob/c90f101ff82a5f6e6840e5bb1515db7d566ef6e7/substratevm/src/org.graalvm.polyglot.nativeapi.native/src/polyglot-nativeapi/polyglot-nativeapi.c
The text was updated successfully, but these errors were encountered: