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

Quarkus 3.0.0.CR2: Jib fails to build container on Ubuntu #32477

Closed
andreas-eberle opened this issue Apr 6, 2023 · 9 comments
Closed

Quarkus 3.0.0.CR2: Jib fails to build container on Ubuntu #32477

andreas-eberle opened this issue Apr 6, 2023 · 9 comments
Labels
area/container-image kind/bug Something isn't working

Comments

@andreas-eberle
Copy link
Contributor

andreas-eberle commented Apr 6, 2023

Describe the bug

When I try to create a JVM container image with jib on ubuntu, it fails with the following error.

Container entrypoint set to [java, -Djava.util.logging.manager=org.jboss.logmanager.LogManager, -jar, quarkus-run.jar]
Created container image aeberle/code-with-quarkus:1.0.0-SNAPSHOT (sha256:76895e04c1c388a769576e2d1f46606a0b1427abff211f3e13d71035f23fb973)


> Task :quarkusAppPartsBuild
Quarkus augmentation completed in 53731ms
AugmentResult.nativeResult = null

> Task :quarkusAppPartsBuild FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':quarkusAppPartsBuild'.
> There was a failure while executing work items
   > A failure occurred while executing io.quarkus.gradle.tasks.worker.BuildWorker
      > java.lang.NullPointerException (no error message)



I attached a simple reproducer which is just a project created from code.quarkus.io with gradle, kotlin, reaseasy reactive and jib.

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

Reproducer:
2023-04-06-quarkus-3-jib-broken.zip

  1. Download & Unzip the reproducer on an Ubuntu (tested with WSL & Github actions)
  2. Run ./gradlew clean assemble -D"quarkus.container-image.build=true"
  3. see the error in the console

Output of uname -a or ver

5.15.90.1-microsoft-standard-WSL2 and github actions ubuntu runner

Output of java -version

JDK17

GraalVM version (if different from Java)

No response

Quarkus version or git rev

3.0.0.CR2

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

gradle

Additional information

No response

@quarkus-bot
Copy link

quarkus-bot bot commented Apr 6, 2023

/cc @evanchooly (kotlin), @geoand (jib,kotlin)

@geoand
Copy link
Contributor

geoand commented Apr 6, 2023

Is there no more information in the build output?

It will be extrelemely hard to fix anything based only on a NPE :(

@geoand geoand removed the area/kotlin label Apr 6, 2023
@geoand
Copy link
Contributor

geoand commented Apr 6, 2023

Please disregard my comment above, I can reproduce the problem locally.

@geoand
Copy link
Contributor

geoand commented Apr 6, 2023

@aloubyansky @glefloch I am seeing (by adding --stacktrace to the build invocation):

Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing io.quarkus.gradle.tasks.worker.BuildWorker
        at org.gradle.workers.internal.DefaultWorkerExecutor$WorkItemExecution.waitForCompletion(DefaultWorkerExecutor.java:283)
        at org.gradle.internal.work.DefaultAsyncWorkTracker.lambda$waitForItemsAndGatherFailures$2(DefaultAsyncWorkTracker.java:130)
        at org.gradle.internal.Factories$1.create(Factories.java:31)
        at org.gradle.internal.work.DefaultWorkerLeaseService.withoutLocks(DefaultWorkerLeaseService.java:321)
        at org.gradle.internal.work.DefaultWorkerLeaseService.withoutLocks(DefaultWorkerLeaseService.java:304)
        at org.gradle.internal.work.DefaultWorkerLeaseService.withoutLock(DefaultWorkerLeaseService.java:309)
        at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForItemsAndGatherFailures(DefaultAsyncWorkTracker.java:126)
        at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForItemsAndGatherFailures(DefaultAsyncWorkTracker.java:88)
        at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForAll(DefaultAsyncWorkTracker.java:78)
        at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForCompletion(DefaultAsyncWorkTracker.java:72)
        at org.gradle.workers.internal.DefaultWorkerExecutor.await(DefaultWorkerExecutor.java:210)
        at org.gradle.workers.internal.DefaultWorkerExecutor.access$100(DefaultWorkerExecutor.java:58)
        at org.gradle.workers.internal.DefaultWorkerExecutor$DefaultWorkQueue.await(DefaultWorkerExecutor.java:308)
        at io.quarkus.gradle.tasks.QuarkusBuildTask.generateBuild(QuarkusBuildTask.java:170)
        at io.quarkus.gradle.tasks.QuarkusBuildCacheableAppParts.fastJarBuild(QuarkusBuildCacheableAppParts.java:122)
        at io.quarkus.gradle.tasks.QuarkusBuildCacheableAppParts.performQuarkusBuild(QuarkusBuildCacheableAppParts.java:81)

and later down the line:

Caused by: java.lang.NullPointerException
        at io.quarkus.gradle.tasks.worker.BuildWorker.execute(BuildWorker.java:62)

Do you have any idea what is going on or what has changed that leads to the problem?

@andreas-eberle
Copy link
Contributor Author

I wanted to add the full log, but I think its easier if you debug anyways. Thanks for your support @geoand !

@andreas-eberle
Copy link
Contributor Author

It looks like it still worked in Beta1 but stopped with CR1. Maybe that helps to narrow it down.

@iocanel
Copy link
Contributor

iocanel commented Apr 7, 2023

I have hit this myself and I think its not limited to jib but it affects all container image builds. The weird part is that the build does complete succesfully yet the gradle build fails.

@geoand
Copy link
Contributor

geoand commented Apr 7, 2023

I guess it has somethign to do with Gradle refactoring. We also have #32465 which I guess is similar to what you have seen @iocanel

@aloubyansky
Copy link
Member

It should be fixed by #32490

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

No branches or pull requests

4 participants