Skip to content

Fix ENOENT with TestProcessSpawn on Debian#7975

Merged
enebo merged 1 commit intojruby:masterfrom
jcharaoui:fix-testprocess-spawn-debian
Oct 24, 2023
Merged

Fix ENOENT with TestProcessSpawn on Debian#7975
enebo merged 1 commit intojruby:masterfrom
jcharaoui:fix-testprocess-spawn-debian

Conversation

@jcharaoui
Copy link
Contributor

On Debian, possibly because of some OpenJDK hardening, TestProcessSpawn consistently fails:

[INFO] Running org.jruby.test.TestProcessSpawn
2023-10-24T00:19:47.130Z [main] WARN FilenoUtil : Native subprocess control requires open access to the JDK IO subsystem
Pass '--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED' to enable.
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.889 s <<< FAILURE! - in org.jruby.test.TestProcessSpawn
[ERROR] testSpawnAndDetach(org.jruby.test.TestProcessSpawn)  Time elapsed: 1.867 s  <<< ERROR!
org.jruby.exceptions.SystemCallError: (ENOENT) No such file or directory - echo

Adding --add-opens to the java options envvar fixes the problem.

On Debian, possibly because of some OpenJDK hardening, TestProcessSpawn
consistently fails:

```
[INFO] Running org.jruby.test.TestProcessSpawn
2023-10-24T00:19:47.130Z [main] WARN FilenoUtil : Native subprocess control requires open access to the JDK IO subsystem
Pass '--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED' to enable.
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.889 s <<< FAILURE! - in org.jruby.test.TestProcessSpawn
[ERROR] testSpawnAndDetach(org.jruby.test.TestProcessSpawn)  Time elapsed: 1.867 s  <<< ERROR!
org.jruby.exceptions.SystemCallError: (ENOENT) No such file or directory - echo
```

Adding --add-opens to the java options envvar fixes the problem.
@enebo enebo added this to the JRuby 9.4.5.0 milestone Oct 24, 2023
@enebo enebo merged commit eeef795 into jruby:master Oct 24, 2023
@enebo
Copy link
Member

enebo commented Oct 24, 2023

@jcharaoui thanks for the contribution. It likely is from more restricitive module settings in later JDKs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants