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

Mongodb native apps built with JDK20 based GraalVM / Mandrel crash #30957

Closed
zakkak opened this issue Feb 7, 2023 · 3 comments · Fixed by #30999
Closed

Mongodb native apps built with JDK20 based GraalVM / Mandrel crash #30957

zakkak opened this issue Feb 7, 2023 · 3 comments · Fixed by #30999
Labels
area/mandrel area/mongodb env/windows Impacts Windows machines kind/bug Something isn't working
Milestone

Comments

@zakkak
Copy link
Contributor

zakkak commented Feb 7, 2023

Describe the bug

$title

cc @Karm @jerboaa

Expected behavior

Application should not crash.

Actual behavior

Application crashes with:

java.lang.NoSuchFieldException: handle
	at java.base/java.lang.Class.getDeclaredField(Class.java:2707)
	at de.flapdoodle.embed.process.runtime.Processes.windowsProcessId(Processes.java:111)
	at de.flapdoodle.embed.process.runtime.Processes.access$200(Processes.java:45)
	at de.flapdoodle.embed.process.runtime.Processes$PidHelper$3.getPid(Processes.java:242)
	at de.flapdoodle.embed.process.runtime.Processes.processId(Processes.java:80)
	at de.flapdoodle.embed.process.runtime.ProcessControl.<init>(ProcessControl.java:61)
	at de.flapdoodle.embed.process.runtime.ProcessControl.start(ProcessControl.java:177)
	at de.flapdoodle.embed.process.runtime.ProcessControl.fromCommandLine(ProcessControl.java:173)
	at de.flapdoodle.embed.process.runtime.NUMA.isNUMAOnce(NUMA.java:57)
	at de.flapdoodle.embed.process.runtime.NUMA.lambda$isNUMA$0(NUMA.java:48)
	at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1228)
	at de.flapdoodle.embed.process.runtime.NUMA.isNUMA(NUMA.java:48)
	at de.flapdoodle.embed.mongo.commands.MongodArguments.warpWithNumaSupport(MongodArguments.java:191)
	at de.flapdoodle.embed.mongo.commands.MongodArguments.asArguments(MongodArguments.java:116)
	at de.flapdoodle.embed.mongo.transitions.MongodProcessArguments.result(MongodProcessArguments.java:97)
	at de.flapdoodle.reverse.TransitionWalker.resolve(TransitionWalker.java:62)
	at de.flapdoodle.reverse.TransitionWalker.resolve(TransitionWalker.java:50)
	at de.flapdoodle.reverse.TransitionWalker.initState(TransitionWalker.java:165)
	at de.flapdoodle.reverse.TransitionWalker.initState(TransitionWalker.java:69)
	at de.flapdoodle.embed.mongo.transitions.Mongod.start(Mongod.java:90)
	at io.quarkus.test.mongodb.MongoTestResource.start(MongoTestResource.java:71)
	at io.quarkus.test.common.TestResourceManager$TestResourceEntryRunnable.run(TestResourceManager.java:481)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1623)

How to Reproduce?

  1. Build GraalVM / Mandrel using JDK 20 EA
  2. Set GRAALVM_HOME to point to the build
  3. ./mvnw clean verify -Dtest-containers -Dstart-containers -Dformat.skip -Dno-descriptor-tests -Dnative -Dquarkus.native.container-build=false -pl integration-tests/mongodb-client

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

23.0-dev based on JDK 20

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

The issue is expected to be resolved once flapdoodle adds support for JDK 20

https://github.com/flapdoodle-oss/de.flapdoodle.embed.process/blob/6075c6018cfac63bf1f9b0c8a662f773dd2cce49/src/main/java/de/flapdoodle/embed/process/runtime/Processes.java#L58-L68

@zakkak zakkak added the kind/bug Something isn't working label Feb 7, 2023
@quarkus-bot quarkus-bot bot added area/mandrel area/mongodb env/windows Impacts Windows machines labels Feb 7, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Feb 7, 2023

/cc @Karm (mandrel), @evanchooly (mongodb), @galderz (mandrel), @loicmathieu (mongodb)

@jerboaa
Copy link
Contributor

jerboaa commented Feb 7, 2023

I've filed this upstream flapdoodle issue:
flapdoodle-oss/de.flapdoodle.embed.process#137

@michaelmosmann
Copy link
Contributor

@jerboaa @zakkak .. new release ahead .. 4.4.1 should fix this.

@geoand geoand closed this as completed in 9214e60 Feb 8, 2023
@quarkus-bot quarkus-bot bot added this to the 3.0 - main milestone Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/mandrel area/mongodb env/windows Impacts Windows machines kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants