Java Chromium Embedded Framework (JCEF). A simple framework for embedding Chromium-based browsers in other applications using the Java programming language.
Describe the bug
When a java-application with embedded jcef tries to create a subprocess then it sometimes crashes (with SIGABRT).
This crash is observed only in OSX Sonoma with x64 architecture.
Stacktrace (part):
Checkout latest jcef master. Open tests.simple.MainFrame.java and replace method main with next code:
public static void main(String[] args) {
if (!CefApp.startup(args))
return;
new MainFrame("http://www.google.com", true, false);
Thread.sleep(5000);
Runnable testFork = () -> {
int count = 10000;
for (int c = 0; c < count; c++) {
ProcessBuilder pb = new ProcessBuilder("echo");
pb.command().add(String.format("Hello %d", c));
pb.redirectOutput(ProcessBuilder.Redirect.INHERIT);
pb.redirectError(ProcessBuilder.Redirect.INHERIT);
try {
Process p = pb.start();
int res = p.waitFor();
if (res != 0)
System.err.printf("test subprocess returns %d\n", res);
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
};
Thread t1 = new Thread(testFork);
Thread t2 = new Thread(testFork);
t1.start();
t2.start();
}
Compile and run java on OSX Sonoma x64 with next arguments:
java -Djdk.lang.Process.launchMechanism=fork -classpath COMPILED_PATH tests.simple.MainFrame
See crash.
NOTE: if some 'modular' problems observed then next VM-options will be usefull:
--add-exports java.desktop/sun.awt=ALL-UNNAMED,jcef --add-exports java.desktop/java.awt.peer=ALL-UNNAMED,jcef --add-exports java.desktop/sun.lwawt.macosx=ALL-UNNAMED,jcef --add-exports java.desktop/sun.lwawt=ALL-UNNAMED,jcef
Expected behavior
Expected: test will not fail.
Observed: crash (at some iteration).
Versions (please complete the following information):
Describe the bug When a java-application with embedded jcef tries to create a subprocess then it sometimes crashes (with SIGABRT). This crash is observed only in OSX Sonoma with x64 architecture. Stacktrace (part):
To Reproduce Steps to reproduce the behavior:
NOTE: if some 'modular' problems observed then next VM-options will be usefull: --add-exports java.desktop/sun.awt=ALL-UNNAMED,jcef --add-exports java.desktop/java.awt.peer=ALL-UNNAMED,jcef --add-exports java.desktop/sun.lwawt.macosx=ALL-UNNAMED,jcef --add-exports java.desktop/sun.lwawt=ALL-UNNAMED,jcef
Expected behavior Expected: test will not fail. Observed: crash (at some iteration).
Versions (please complete the following information):