Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-24078

ConsoleHandler corrupts the standard output used by Surefire

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None
    • Logging
    • None
    • False
    • None
    • False
    • Workaround Exists
    • Hide

      Use FILE based log handler instead of the console one

      Show
      Use FILE based log handler instead of the console one
    • Hide

      Run the Elytron JUnit test suite with the logging.properties file configured to use the CONSOLE logging

      Show
      Run the Elytron JUnit test suite with the logging.properties file configured to use the CONSOLE logging

    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
       

      Attachments

        Activity

          People

            Unassigned Unassigned
            yborgess1@redhat.com Yeray Borges Santana
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: