From issues-return-99456-apmail-maven-issues-archive=maven.apache.org@maven.apache.org Sat Jan 3 20:54:08 2015 Return-Path: X-Original-To: apmail-maven-issues-archive@minotaur.apache.org Delivered-To: apmail-maven-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B663C10F6A for ; Sat, 3 Jan 2015 20:54:08 +0000 (UTC) Received: (qmail 59239 invoked by uid 500); 3 Jan 2015 20:54:09 -0000 Delivered-To: apmail-maven-issues-archive@maven.apache.org Received: (qmail 59189 invoked by uid 500); 3 Jan 2015 20:54:09 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 59178 invoked by uid 99); 3 Jan 2015 20:54:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Jan 2015 20:54:05 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [199.193.192.100] (HELO codehaus01.managed.contegix.com) (199.193.192.100) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Jan 2015 20:54:00 +0000 Received: from codehaus01 (localhost.localdomain [127.0.0.1]) by codehaus01.managed.contegix.com (Postfix) with ESMTP id 736C9B10A3 for ; Sat, 3 Jan 2015 14:53:10 -0600 (CST) Date: Sat, 3 Jan 2015 14:53:10 -0600 (CST) From: "Alexander Ashitkin (JIRA)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] (SUREFIRE-1132) Surefire: regular isolated classloader failures in parallelbuild MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 22cf62d5d84cf5bea94eb3b65e0ebd09 X-Virus-Checked: Checked by ClamAV on apache.org [ https://jira.codehaus.org/browse/SUREFIRE-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=360590#comment-360590 ] Alexander Ashitkin commented on SUREFIRE-1132: ---------------------------------------------- Jdk 8u25 build runs for 24, 2 class not found has happened: {code} 17:02:02 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project streaming-bb-server: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: There was an error in the forked process 17:02:02 [ERROR] java.lang.NoClassDefFoundError: org/junit/runner/notification/RunListener 17:02:02 [ERROR] at java.lang.Class.getDeclaredConstructors0(Native Method) 17:02:02 [ERROR] at java.lang.Class.privateGetDeclaredConstructors(Class.java:2663) 17:02:02 [ERROR] at java.lang.Class.getConstructor0(Class.java:3067) 17:02:02 [ERROR] at java.lang.Class.getConstructor(Class.java:1817) 17:02:02 [ERROR] at org.apache.maven.surefire.util.ReflectionUtils.getConstructor(ReflectionUtils.java:76) 17:02:02 [ERROR] at org.apache.maven.surefire.util.ReflectionUtils.instantiateOneArg(ReflectionUtils.java:129) 17:02:02 [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.createProviderInCurrentClassloader(ForkedBooter.java:230) 17:02:02 [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:199) 17:02:02 [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155) 17:02:02 [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) 17:02:02 [ERROR] Caused by: java.lang.ClassNotFoundException: org.junit.runner.notification.RunListener 17:02:02 [ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:372) 17:02:02 [ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:361) 17:02:02 [ERROR] at java.security.AccessController.doPrivileged(Native Method) 17:02:02 [ERROR] at java.net.URLClassLoader.findClass(URLClassLoader.java:360) 17:02:02 [ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) 17:02:02 [ERROR] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) 17:02:02 [ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) 17:02:02 [ERROR] ... 10 more 17:02:02 [ERROR] -> [Help 1] {code} In this sporadic failures 'java.lang.NoClassDefFoundError: org/junit/runner/notification/RunListener' is almost determenistic. I need to implement some classloading debug facilities to trace this down. Atthe moment it looks like some class which accepts RunListener as ctr arg is loaded itself, but failed to load junit: {code} public static Object instantiateOneArg( ClassLoader classLoader, String className, Class param1Class, Object param1 ) { try { Class aClass = loadClass( classLoader, className ); //ok Constructor constructor = ReflectionUtils.getConstructor( aClass, new Class[]{ param1Class } ); //exception return constructor.newInstance( param1 ); } catch ( InvocationTargetException e ) { throw new SurefireReflectionException( e.getTargetException() ); } catch ( InstantiationException e ) { throw new SurefireReflectionException( e ); } catch ( IllegalAccessException e ) { throw new SurefireReflectionException( e ); } } {code} Please help with 2 questions: * is there any built in debugging for classloading in surefire? * forked booter trying to find ctr with parameter ProviderParameters.class which results in junit exception. Could you please give some insight on waht is happenening here? thanks in advance > 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 > 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 > 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} > > 0 > false > false > > {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)