Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
False
-
None
-
False
-
Workaround Exists
-
-
Description
Under some circumstances, when using ConsoleHandler with Surefire < 3.0.0, we can see in the logs the following warning:
[WARNING] Corrupted STDOUT by directly writing to native stream in forked JVM 1. See FAQ web page and the dump file /opt/buildAgent/work/4ef3020e3482d212/elytron/target/surefire-reports/2022-10-06T15-50-46_692-jvmRun1.dumpstream
The Surefire FAQ describes the possible reasons for this warning, one of them is the uses of FileDescriptor.out
We suspect that this issue could be generated by a race between how org.jboss.logmanager.LogManager initializes the StandardOutputStreams to capture the System.out and System.err, see LogManager source code
We have detected this issue by running our standard test suite, for example, running the Elytron JUnit tests with the logging.properties file configured to use the CONSOLE logging