Skip to content

Consider using Foreign Memory API when reading .bindings #13816

@hubertp

Description

@hubertp

Our CI continues to report random IOExceptions on Windows, such as

2025-08-07T00:19:15.1493480Z  INFO ide_ci::program::command: sbt ℹ️ �[0m[�[0m�[0minfo�[0m] �[0m�[0mGenerating index for built-distribution\enso-engine-2025.2.1-dev-windows-amd64\enso-2025.2.1-dev\lib\Standard\AWS �[0m
2025-08-07T00:19:53.7738276Z  INFO ide_ci::program::command: sbt ℹ️ [WARN] [2025-08-07T02:19:53+02:00] [enso.org.enso.interpreter.runtime.SerializationPool] Serialization of bindings `Standard.AWS` failed: C:\runner\_work\enso\enso\built-distribution\enso-engine-2025.2.1-dev-windows-amd64\enso-2025.2.1-dev\lib\Standard\AWS\2025.2.1-dev\.enso\cache\bindings\2025.2.1-dev\Standard\AWS.bindings: The process cannot access the file because it is being used by another process`
2025-08-07T00:19:53.7814876Z  INFO ide_ci::program::command: sbt ℹ️ [ERROR] [2025-08-07T02:19:53+02:00] [org.enso.runner.Main] Unexpected internal error: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.nio.file.FileSystemException: C:\runner\_work\enso\enso\built-distribution\enso-engine-2025.2.1-dev-windows-amd64\enso-2025.2.1-dev\lib\Standard\AWS\2025.2.1-dev\.enso\cache\bindings\2025.2.1-dev\Standard\AWS.bindings: The process cannot access the file because it is being used by another process
2025-08-07T00:19:53.7819293Z  INFO ide_ci::program::command: sbt ℹ️ org.graalvm.polyglot.PolyglotException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.nio.file.FileSystemException: C:\runner\_work\enso\enso\built-distribution\enso-engine-2025.2.1-dev-windows-amd64\enso-2025.2.1-dev\lib\Standard\AWS\2025.2.1-dev\.enso\cache\bindings\2025.2.1-dev\Standard\AWS.bindings: The process cannot access the file because it is being used by another process
2025-08-07T00:19:53.7822154Z  INFO ide_ci::program::command: sbt ℹ️ 	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:124)

In the discussion on PR that mmapped .bindings this was mentioned as the potential source of the problem. @JaroslavTulach suggested recently that we could use Arena from new Foreign Memory Api to correctly manage the access and thus fix the problem on Windows.

Metadata

Metadata

Assignees

Labels

-compilerp-mediumShould be completed in the next few sprints

Type

No type

Projects

Status

🟢 Accepted

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions