Exception upon build failure in parallel builds
-----------------------------------------------

                 Key: MNG-4682
                 URL: http://jira.codehaus.org/browse/MNG-4682
             Project: Maven 2 & 3
          Issue Type: Bug
    Affects Versions: 3.0-beta-1
            Reporter: Kristian Rosenvold


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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to