Skip to content
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

Evaluate ImageIO compatibility with GraalVM Native Image #8605

Closed
murphye opened this issue Apr 15, 2020 · 7 comments · Fixed by #20850
Closed

Evaluate ImageIO compatibility with GraalVM Native Image #8605

murphye opened this issue Apr 15, 2020 · 7 comments · Fixed by #20850
Labels
kind/bug Something isn't working
Milestone

Comments

@murphye
Copy link

murphye commented Apr 15, 2020

Describe the bug
ImageIO is now enabled in Quarkus 1.4.0.
#8453

However, not all is good, as ImageIO has a plugin architecture and not all plugins work that are normally installed in the JRE, such as com.sun.imageio.plugins.jpeg.JPEGImageReader

According to the comment in this thread, PNGImageReader is working, however:
https://stackoverflow.com/questions/60527663/is-javax-imageio-supported-by-graalvm-native-image

Expected behavior
All ImageIO plugins work.

Actual behavior
Unknown how many plugins work by default with Native Image, or if the GraalVM is tracking.

To Reproduce
Steps to reproduce the behavior:

  1. Try using ImageIO.read on a JPEG
  2. Observe java.lang.UnsatisfiedLinkError: com.sun.imageio.plugins.jpeg.JPEGImageReader

Environment (please complete the following information):

  • Output of uname -a or ver:
  • Output of java -version: 11
  • GraalVM version (if different from Java): 20.0.0
  • Quarkus version or git rev: 1.4.0.CR1
  • Build tool (ie. output of mvnw --version or gradlew --version):

Additional context

This is a GraalVM issue, but filing at the request of George Gastaldi.

@murphye murphye added the kind/bug Something isn't working label Apr 15, 2020
@murphye
Copy link
Author

murphye commented Apr 15, 2020

Advise reaching out to GraalVM team and find out of they are tracking ImageIO compatibility.

@murphye
Copy link
Author

murphye commented Aug 12, 2020

oracle/graal#2620

@Rohit-nagbhidkar
Copy link

Rohit-nagbhidkar commented Jan 25, 2021

Still having error while calling ImageIO.read on jpeg files
using quarkus native image 20.3.1
Exception in thread "Lambda Thread" java.lang.UnsatisfiedLinkError: com.sun.imageio.plugins.jpeg.JPEGImageReader.initJPEGImageReader()J [symbol: Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initJPEGImageReader or Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initJPEGImageReader__]
at com.oracle.svm.jni.access.JNINativeLinkage.getOrFindEntryPoint(JNINativeLinkage.java:153)
at com.oracle.svm.jni.JNIGeneratedMethodSupport.nativeCallAddress(JNIGeneratedMethodSupport.java:57)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.initJPEGImageReader(JPEGImageReader.java)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.(JPEGImageReader.java:232)
at com.sun.imageio.plugins.jpeg.JPEGImageReaderSpi.createReaderInstance(JPEGImageReaderSpi.java:85)
at javax.imageio.spi.ImageReaderSpi.createReaderInstance(ImageReaderSpi.java:320)
at javax.imageio.ImageIO$ImageReaderIterator.next(ImageIO.java:532)
at javax.imageio.ImageIO$ImageReaderIterator.next(ImageIO.java:516)
at javax.imageio.ImageIO.read(ImageIO.java:1463)
at javax.imageio.ImageIO.read(ImageIO.java:1363)

@zakkak
Copy link
Contributor

zakkak commented Jan 25, 2021

This issue should be fixed by oracle/graal#3032 in GraalVM CE 21.0.

Upgrading to 21.0 is work in progress (see #14512) but you should be able to test if it solves the issue with:
-Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:21.0-java11

@Rohit-nagbhidkar
Copy link

This issue should be fixed by oracle/graal#3032 in GraalVM CE 21.0.

Upgrading to 21.0 is work in progress (see #14512) but you should be able to test if it solves the issue with:
-Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:21.0-java11

getting Error: Runtime exited with error: signal: segmentation fault (core dumped) Runtime.ExitError after using ubi-quarkus-native-image:21.0-java11

@zakkak
Copy link
Contributor

zakkak commented Jan 25, 2021

@Rohit-nagbhidkar thanks for testing.

Could you please share a reproducer and let us know whether you tried with the latest master or with 1.11.0.Final?

@Rohit-nagbhidkar
Copy link

@Rohit-nagbhidkar thanks for testing.

Could you please share a reproducer and let us know whether you tried with the latest master or with 1.11.0.Final?

i have tested with 1.11.0.Final

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants