Skip to content

JNA: apps built with native-image cannot write into local Unix sockets #4282

@pshirshov

Description

@pshirshov

docker-java a popular library, fails to communicate with local docker instances when built by native-image but the same code works perfectly under JVM. It seems to be some kind of a weird problem with JNA built by NI or NI itself, at least docker-java developers think that.

Here is a simple repro: https://github.com/7mind/graalvm-native-image-jna-bad-address-bug-demo

Could you investigate please?

UPD:

  1. Doesn't cannot connect to unix://localhost:80 when compiled with GraalVM docker-java/docker-java#1820 (open)
  2. java.net.Socket fails on local Unix addresses when compiled with GraalVM native image, works well under JVM java-native-access/jna#1412 (closed, not a JNA issue according to the developer, the advice is to call the relevant APIs directly under NI, there are some additional details and diagnostics)
  3. Native builds (GraalVM) run into UnsatisfiedLinkError libjnidispatch.so docker-java/docker-java#1714 (closed, ignored)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions