Emilie Faracci created SPARK-55290:
--------------------------------------

             Summary: `testReloadMissingTrustStore` fails with JDK 21 due to 
cross-device link error
                 Key: SPARK-55290
                 URL: https://issues.apache.org/jira/browse/SPARK-55290
             Project: Spark
          Issue Type: Bug
          Components: Tests
    Affects Versions: 4.0.0, 4.2
            Reporter: Emilie Faracci


When building and testing with JDK 21, {{testReloadMissingTrustStore}} in 
{{org.apache.spark.network.ssl.ReloadingX509TrustManagerSuite}} fails with the 
following error 


{{[ERROR] Tests run: 6, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.981 
s <<< FAILURE! -- in org.apache.spark.network.ssl.ReloadingX509TrustManagerSuite
[ERROR] 
org.apache.spark.network.ssl.ReloadingX509TrustManagerSuite.testReloadMissingTrustStore
 -- Time elapsed: 0.021 s <<< ERROR!
java.nio.file.AtomicMoveNotSupportedException: 
/var/folders/k3/w11hphls1q13hsq921zcwbqc0000gq/T/temp-key-store7512454643534556695jks
 -> testmissing.jks: Cross-device link
    at java.base/sun.nio.fs.UnixFileSystem.move(UnixFileSystem.java:871)
    at 
java.base/sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:309)
    at java.base/java.nio.file.Files.move(Files.java:1431)
    at 
org.apache.spark.network.ssl.SslSampleConfigs.saveKeyStore(SslSampleConfigs.java:233)
    at 
org.apache.spark.network.ssl.SslSampleConfigs.createTrustStore(SslSampleConfigs.java:129)
    at 
org.apache.spark.network.ssl.ReloadingX509TrustManagerSuite.testReloadMissingTrustStore(ReloadingX509TrustManagerSuite.java:195)
[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR]   ReloadingX509TrustManagerSuite.testReloadMissingTrustStore:195 ยป 
AtomicMoveNotSupported 
/var/folders/k3/w11hphls1q13hsq921zcwbqc0000gq/T/temp-key-store7512454643534556695jks
 -> testmissing.jks: Cross-device link
[INFO]
[ERROR] Tests run: 6, Failures: 0, Errors: 1, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  9.803 s
[INFO] Finished at: 2026-01-29T11:30:24-08:00
[INFO] ------------------------------------------------------------------------
}}

Verified that this fails in the same way with 4.0.0 onwards. 

+Steps to reproduce: 
+

Use JDK 21 and an environment where {{/tmp}} and the current directory are on a 
different filesystem (partition).

{{build/mvn clean install -Phive -Phive-thriftserver -DskipTests 
-Dmaven.scaladoc.skip -am -pl common/network-common

build/mvn -pl common/network-common -Dtest=ReloadingX509TrustManagerSuite 
-Pyarn -Phive test}}

Expected: Test passes (works correctly with JDK 17)

{{[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
WARNING: Using incubator modules: jdk.incubator.vector
[INFO] Running org.apache.spark.network.ssl.ReloadingX509TrustManagerSuite
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.224 s 
-- in org.apache.spark.network.ssl.ReloadingX509TrustManagerSuite
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  8.231 s
[INFO] Finished at: 2026-01-29T12:02:17-08:00
[INFO] ------------------------------------------------------------------------
}}

It should be the same with JDK 21 since support is added 
https://issues.apache.org/jira/browse/SPARK-43831.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to