maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Ashitkin (JIRA)" <j...@codehaus.org>
Subject [jira] (SUREFIRE-1132) Surefire: regular isolated classloader failures in parallelbuild
Date Wed, 07 Jan 2015 13:43:18 GMT

    [ https://jira.codehaus.org/browse/SUREFIRE-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=360880#comment-360880
] 

Alexander Ashitkin edited comment on SUREFIRE-1132 at 1/7/15 7:43 AM:
----------------------------------------------------------------------

{quote}
I guess it will be JUnit4Provider.
{quote}
i think so. I didnt log startup configuration but in ProviderConfiguration i can see property
'providerConfiguration=org.apache.maven.surefire.junit4.JUnit4Provider':
{code}ProviderConfiguration{dirScannerParams=org.apache.maven.surefire.testset.DirectoryScannerParameters@31befd9f,
reporterConfiguration=org.apache.maven.surefire.report.ReporterConfiguration@1c20c684, testArtifact=org.apache.maven.surefire.testset.TestArtifactInfo@1fb3ebeb,
testSuiteDefinition=org.apache.maven.surefire.testset.TestRequest@548c4f57, runOrderParameters=org.apache.maven.surefire.testset.RunOrderParameters@1218025c,
providerProperties={testClassesDirectory=D:\jenkins\work\workspace\sf-2.18.1-test\my-server\target\test-classes,
useManifestOnlyJar=false, classPathUrl.1=D:\jenkins\work\workspace\sf-2.18.1-test\my-server\target\classes,
reportsDirectory=D:\jenkins\work\workspace\sf-2.18.1-test\my-server\target\surefire-reports,
classPathUrl.0=D:\jenkins\work\workspace\sf-2.18.1-test\my-server\target\test-classes, rerunFailingTestsCount=0,
providerConfiguration=org.apache.maven.surefire.junit4.JUnit4Provider, testSuiteDefinitionTestSourceDirectory=D:\jenkins\work\workspace\sf-2.18.1-test\my-server\src\test\java,
surefireClassPathUrl.1=d:\.m2\repository\org\apache\maven\surefire\surefire-api\2.19-SNAPSHOT\surefire-api-2.19-SNAPSHOT.jar,
surefireClassPathUrl.0=d:\.m2\repository\org\apache\maven\surefire\surefire-junit4\2.19-SNAPSHOT\surefire-junit4-2.19-SNAPSHOT.jar,
runOrder=filesystem, tc.12=...Test, tc.11=...Test, useSystemClassLoader=true, tc.10=...Test,
excludes0=**/*ITest.java, tc.9=...Test, tc.8=...Test, tc.7=...Test, tc.6=...Test, tc.5=...Test,
isTrimStackTrace=true, tc.4=...Test, tc.3=...Test, tc.2=...Test, tc.1=...Test, tc.0=...Test,
includes2=**/*TestCase.java, enableAssertions=true, includes1=**/*Test.java, failIfNoTests=false,
runStatisticsFile=D:\jenkins\work\workspace\sf-2.18.1-test\my-server\.surefire-4E2BB134B213C67EDAB88B93ED52F132211C1F4A,
includes0=**/Test*.java, preferTestsFromInStream=false, childDelegation=false}, failIfNoTests=false,
forkTestSet=null, readTestsFromInStream=false{code}

{code}
Manifest manifest = new Manifest( ForkedBooter.class.getResourceAsStream( "/META-INF/MANIFEST.MF"
) );
System.out.println( "CLASS PATH:" + manifest.getMainAttributes().getValue( "Class-Path" ));
{code}
this returns 'CLASS PATH:null'. Actually we use useManifestOnlyJar=false so i dont expect
to see something here (and what about jars ordering?)

Please notice, when i run build sucessfully, is see all jars in the output, including all
dependencies unlike of the reported case. So classloader is set up incorrectly. Forked booter
starts with incomplete classpath and issue comes to bootstrapping logic - how classpath is
created and passed to the fork. incorrectly shared files or system properties could result
in such failures in parallel env.

thank you



was (Author: alex_ashitkin):
{quote}
I guess it will be JUnit4Provider.
{quote}
i think so. I didnt log startup configuration but in ProviderConfiguration i can see property
'providerConfiguration=org.apache.maven.surefire.junit4.JUnit4Provider':
{code}ProviderConfiguration{dirScannerParams=org.apache.maven.surefire.testset.DirectoryScannerParameters@31befd9f,
reporterConfiguration=org.apache.maven.surefire.report.ReporterConfiguration@1c20c684, testArtifact=org.apache.maven.surefire.testset.TestArtifactInfo@1fb3ebeb,
testSuiteDefinition=org.apache.maven.surefire.testset.TestRequest@548c4f57, runOrderParameters=org.apache.maven.surefire.testset.RunOrderParameters@1218025c,
providerProperties={testClassesDirectory=D:\jenkins\work\workspace\sf-2.18.1-test\my-server\target\test-classes,
useManifestOnlyJar=false, classPathUrl.1=D:\jenkins\work\workspace\sf-2.18.1-test\my-server\target\classes,
reportsDirectory=D:\jenkins\work\workspace\sf-2.18.1-test\my-server\target\surefire-reports,
classPathUrl.0=D:\jenkins\work\workspace\sf-2.18.1-test\my-server\target\test-classes, rerunFailingTestsCount=0,
providerConfiguration=org.apache.maven.surefire.junit4.JUnit4Provider, testSuiteDefinitionTestSourceDirectory=D:\jenkins\work\workspace\sf-2.18.1-test\my-server\src\test\java,
surefireClassPathUrl.1=d:\.m2\repository\org\apache\maven\surefire\surefire-api\2.19-SNAPSHOT\surefire-api-2.19-SNAPSHOT.jar,
surefireClassPathUrl.0=d:\.m2\repository\org\apache\maven\surefire\surefire-junit4\2.19-SNAPSHOT\surefire-junit4-2.19-SNAPSHOT.jar,
runOrder=filesystem, tc.12=...Test, tc.11=...Test, useSystemClassLoader=true, tc.10=...Test,
excludes0=**/*ITest.java, tc.9=...Test, tc.8=...Test, tc.7=...Test, tc.6=...Test, tc.5=...Test,
isTrimStackTrace=true, tc.4=...Test, tc.3=...Test, tc.2=...Test, tc.1=...Test, tc.0=...Test,
includes2=**/*TestCase.java, enableAssertions=true, includes1=**/*Test.java, failIfNoTests=false,
runStatisticsFile=D:\jenkins\work\workspace\sf-2.18.1-test\my-server\.surefire-4E2BB134B213C67EDAB88B93ED52F132211C1F4A,
includes0=**/Test*.java, preferTestsFromInStream=false, childDelegation=false}, failIfNoTests=false,
forkTestSet=null, readTestsFromInStream=false{code}

{code}
Manifest manifest = new Manifest( ForkedBooter.class.getResourceAsStream( "/META-INF/MANIFEST.MF"
) );
System.out.println( "CLASS PATH:" + manifest.getMainAttributes().getValue( "Class-Path" ));
{code}
this returns 'CLASS PATH:null'. Actually we use useManifestOnlyJar=false so i dont expect
to see something here (and what about jars ordering?)

Please notice, when i run build sucessfully, is see all jars in the output, including all
dependencies unlike of the reported case. So classloader is set up incorrectly. Forked booter
starts with incomplete classpath and issue comes to bootstrapping logic - how classpath is
created and passed to the fork. incorrectly shared files or system properties could result
in such failures in parallel env.

thank you

thank you


> Surefire: regular isolated classloader failures in parallelbuild
> ----------------------------------------------------------------
>
>                 Key: SUREFIRE-1132
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-1132
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: classloading
>    Affects Versions: 2.17, 2.18.1
>         Environment: SLES 3.0.80-0.7-default SMP x86_64 GNU/Linux
> windows server 2008 x64
> Maven 3.2.2, 3.2.3, 3.2.5
> Oracle HotSpot JDK 7u25/7u65/8u25
>            Reporter: Alexander Ashitkin
>         Attachments: consoleText-1.txt, consoleText-2.txt, consoleText-3.txt
>
>
> We have a large project of 300+ modules which regularly fails with different kind of
classloading issues in different places in surefire plugin. The issue is reproduced only with
parallel build and is not reproduced in single threaded. This is a main contributor in build
instability for us. All the not loaded dependnecies are actually present in dependency tree.
I attached 3 different samples of how build fails.
> Surefire config:
> {code}
>                     <configuration>
>                         <forkCount>0</forkCount>
>                         <!--doesnt work in parrallel build. Causes build failures
with error java.io.IOException: Stream Closed-->                      <redirectTestOutputToFile>false</redirectTestOutputToFile>
>                         <useManifestOnlyJar>false</useManifestOnlyJar>
>                     </configuration>
> {code}
> maven cmd is like install -T 10
>  Please advise how to sort this out - ready to run any provided diagnostic and evaluate
any options.
> Thanks in advance, Alexander



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Mime
View raw message