Skip to content

Failed to leave the current IsolateThread context and to detach the current thread. (code 12) with Micronaut and LDAP #3305

Open
@ilopmar

Description

@ilopmar

Describe the issue

We have in Micronaut a test application for Micronaut Security and LDAP. To make it work as a native image we've used the tracing agent to add the following reflection configuration that we've already included in Micronaut Security. The test application works as a native image using Java 11:

[
  {
    "name":"com.sun.jndi.ldap.LdapCtxFactory",
    "methods":[{"name":"<init>","parameterTypes":[] }]
  }
]

For Java 8 this doesn't work. Using the tracing agent again we've discovered a missing reflection configuration that I've added to the test application described below:

[
  {
    "name":"com.sun.jndi.ldap.VersionHelper12",
    "methods":[{"name":"<init>","parameterTypes":[] }]
  }
]

Steps to reproduce the issue

  • git clone https://github.com/micronaut-graal-tests/micronaut-security-ldap-graal
  • cd micronaut-security-ldap-graal
  • git checkout jdk8-issue
  • Use GraalVM for Java 8
  • ./build-native-image.sh
  • ./build/native-image/security-ldap
  • curl -s -X POST -H 'Content-Type:application/json' -d '{"username":"euler","password":"password"}' localhost:8080/login

The native image process finishes with the error:

Fatal error: Failed to leave the current IsolateThread context and to detach the current thread. (code 12)

Describe GraalVM and your environment:

  • GraalVM version: 21.0.0.2 Java 8. Also tried with master branch ac8a4ff
  • JDK major version: 8
  • OS: Linux Mint 20.1
  • Architecture: AMD64

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions