Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-4682

Exception upon build failure in parallel builds

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0-beta-1
    • Fix Version/s: 3.0-beta-2
    • Component/s: None
    • Labels:
      None

      Description

      Arnaud Héritier reports seeing the following stacktrace upon (a failing) parallel build. The build was failing due to some other cause, and the race condition is due to a problem in the fail logic:

      >
      > Exception in thread "pool-1-thread-4" java.lang.NullPointerException
      > at java.io.DeleteOnExitHook.add(DeleteOnExitHook.java:34)
      > at java.io.File.deleteOnExit(File.java:939)
      > at org.apache.maven.repository.legacy.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:293)
      > at org.apache.maven.repository.legacy.DefaultWagonManager.getArtifact(DefaultWagonManager.java:99)
      > at org.apache.maven.repository.legacy.DefaultWagonManager.getArtifact(DefaultWagonManager.java:150)
      > at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:251)
      > at org.apache.maven.artifact.resolver.DefaultArtifactResolver.access$000(DefaultArtifactResolver.java:73)
      > at org.apache.maven.artifact.resolver.DefaultArtifactResolver$ResolveTask.run(DefaultArtifactResolver.java:689)
      > at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      > at java.lang.Thread.run(Thread.java:637)

      The race condition is believed to be caused because MavenCli calls System.exit(), even though other parallel-build modules may still be actively downloading artifacts; the check for isHalted (LifecycleThreadedBuilder line 69 (2x?!)) and similar in Weave mode needs to wait for all started modules to catch up with the "abort" status.

        Attachments

          Activity

            People

            • Assignee:
              krosenvold Kristian Rosenvold
              Reporter:
              krosenvold Kristian Rosenvold
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: