Hi,

we are running Jenkins v1.515 and occasionally have problems with hanging 
builds. After all tests run with success and build is over from the test 
runner perspective Jenkins will go into hudson.tasks.MailSender class and 
will spend there dozens of minutes. The build will eventually complete and 
will be marked as successful. Looking at /threadDump I can see that it 
works hard to complete its task (it consumes CPU, stack trace changes) and 
does not hang on any lock or similar. This part of stack trace is 
consistent throughout whole 'hanging' period:

        at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:222)
        at 
hudson.model.AbstractProject.hasParticipant(AbstractProject.java:1580)
        at hudson.model.User.getProjects(User.java:449)
        at 
hudson.scm.SubversionMailAddressResolverImpl.findMailAddressFor(SubversionMailAddressResolverImpl.java:20)
        at 
hudson.tasks.MailAddressResolver.resolve(MailAddressResolver.java:101)
        at hudson.tasks.Mailer$UserProperty.getAddress(Mailer.java:532)
        at hudson.tasks.MailSender.buildCulpritList(MailSender.java:408)
        at hudson.tasks.MailSender.createEmptyMail(MailSender.java:368)
        at hudson.tasks.MailSender.createUnstableMail(MailSender.java:188)
        at hudson.tasks.MailSender.getMail(MailSender.java:159)
        at hudson.tasks.MailSender.execute(MailSender.java:100)
        at 
hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.cleanUp(MavenModuleSetBuild.java:978)
        at hudson.model.Run.execute(Run.java:1620)
        at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:486)
        at hudson.model.ResourceController.execute(ResourceController.java:88)
        at hudson.model.Executor.run(Executor.java:241)


The problem is with AbstractProject::hasParticipant:

 /**
* Returns true if this user has made a commit to this project.
*
* @since 1.191
*/
    public boolean hasParticipant(User user) {
        for( R build = getLastBuild(); build!=null; build=build.
getPreviousBuild())
            if(build.hasParticipant(user))
                return true;
        return false;
    }

It goes through all the builds on disk (unpacks them? parses them?) and it 
takes a lot of time. Frankly I do not know what this functionality is for - 
we have just a simple mail notification set up. Forgive me if this issue 
was already discussed - I did not found any open bugs matching this problem.

Thanks for listening and please advise.

--
Regards,
Tomasz Kowalczewski

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to