Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-906

Sometimes get NullPointerException in forked process

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.12.3
    • 2.12.3
    • process forking
    • None
    • Arch linux

    Description

      (This is using the latest 2.13-SNAPSHOT)

      Using forkMode=perthread, the child processes sometimes abort with this exception:

      java.lang.NullPointerException
      at java.io.File.<init>(File.java:251)
      at org.apache.maven.surefire.booter.BooterDeserializer.deserialize(BooterDeserializer.java:61)
      at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:63)

      It only happens sometimes.
      Using -X keeps the temp files, and looking at the file that's supposed to pass the properties, I see that the file is truncated midway, causing the exception.

      Possibly the parent process needs to flush the file after it writes to it before is closes it.

      Attachments

        1. SUREFIRE-906-0001.patch
          1 kB
          Christopher Mosher

        Activity

          People

            krosenvold Kristian Rosenvold
            cmosher01 Christopher Mosher
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: