Skip to content

Commit

Permalink
Explicit initialization config could be quite interesting for
Browse files Browse the repository at this point in the history
Yolean/kubernetes-kafka#310
because when I investigated the timeouts there I found reports
that similar errors had been fixed by cleaning up (or trashing) persisted state.

> Detected a direct/mapped ByteBuffer in the image heap.
> A direct ByteBuffer has a pointer to unmanaged C memory,
> and C memory from the image generator is not available at image run time.
> A mapped ByteBuffer references a file descriptor,
> which is no longer open and mapped at run time.

Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Detected a direct/mapped ByteBuffer in the image heap. A direct ByteBuffer has a pointer to unmanaged C memory, and C memory from the image generator is not available at image run time.A mapped ByteBuffer references a file descriptor, which is no longer open and mapped at run time.   To see how this object got instantiated use -H:+TraceClassInitialization. The object was probably created by a class initializer and is reachable from a static field. You can request class initialization at image run time by using the option --initialize-at-run-time=<class-name>. Or you can write your own initialization methods and call them explicitly from your main entry point.
Detailed message:
Trace:
	at parsing org.apache.zookeeper.server.persistence.FilePadding.padFile(FilePadding.java:78)
Call path from entry point to org.apache.zookeeper.server.persistence.FilePadding.padFile(FileChannel):
	at org.apache.zookeeper.server.persistence.FilePadding.padFile(FilePadding.java:76)
  • Loading branch information
solsson committed Aug 16, 2020
1 parent 695f84f commit f4dfdf9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions native/zookeeper-server-start.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ RUN native-image \
-H:+ReportExceptionStackTraces \
--no-fallback \
-H:ConfigurationFileDirectories=/home/nonroot/native-config \
--initialize-at-build-time \
--initialize-at-run-time=org.apache.zookeeper.server.persistence.FileTxnLog \
--initialize-at-run-time=org.apache.zookeeper.server.persistence.TxnLogToolkit \
--initialize-at-run-time=org.apache.zookeeper.server.persistence.FilePadding \
# Added because of org.apache.zookeeper.common.X509Util, org.apache.zookeeper.common.ZKConfig, javax.net.ssl.SSLContext ...
--allow-incomplete-classpath \
# -D options from entrypoint
Expand Down

0 comments on commit f4dfdf9

Please sign in to comment.