keycloak / keycloak

Open Source Identity and Access Management For Modern Applications and Services

Home Page:https://www.keycloak.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build of 24.0.4 fails on NFS when deleting lib/quarkus

natechols opened this issue · comments

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

dist/quarkus

Describe the bug

I am trying to run bin/kc.sh build in Keycloak 24.0.4 on various NFS volumes on Linux, and it consistently fails trying to delete the directory lib/quarkus, due to the presence of .nfsXXXX... files that usually indicate another process using the same directory. This was reproducible on multiple nodes and filesystems including in fresh directories - there's definitely nothing else using that directory, so we suspect there's a race condition somewhere in the build logic. Once this error occurs, subsequent attempts to run the build also fail due to the missing files in that directory, since the build already wiped them out without a backup. (I have observed the latter failure before, starting with Keycloak 17, but in that case the root cause was a system glitch - it still broke the Keycloak install though.)

Version

24.0.4

Regression

  • The issue is a regression

Expected behavior

  1. Build command succeeds on NFS volumes
  2. Failure of build command does not leave installation in an unusable state

Actual behavior

First error output (with sanitized paths):
ERROR: io.quarkus.builder.BuildException: Build failure: Build failed due to errors [error]: Build step io.quarkus.deployment.pkg.steps.JarResultBuildStep#buildRunnerJar threw an exception: java.lang.IllegalStateException: java.nio.file.FileSystemException: /nfs/home/nat/keycloak/keycloak-24.0.4/lib/quarkus/.nfs804a7a64040362c3000c81f2: Device or resource busy
After re-running:
Exception in thread "main" java.nio.file.NoSuchFileException: /nfs/home/nat/keycloak/keycloak-24.0.4/lib/quarkus/quarkus-application.dat

How to Reproduce?

Aside from setting up the Java 17 environment from Oracle, the only command I'm running is this:
rm -rf keycloak-24.0.4* && wget https://github.com/keycloak/keycloak/releases/download/24.0.4/keycloak-24.0.4.tar.gz && tar zxf keycloak-24.0.4.tar.gz && ./keycloak-24.0.4/bin/kc.sh build
This works on local filesystems, but has failed on every NFS mount that I've tried.

Anything else?

I tried building on a local volume and relocating to NFS, but it looks like the change in path is enough to trigger the build.