Nullpointer in log rotator

131 views
Skip to first unread message

Larry Shatzer, Jr.

unread,
Oct 9, 2012, 2:45:04 PM10/9/12
to jenkins...@googlegroups.com
I saw a few of these during startup, and now when a job ran, I saw this: (Using latest jenkins 1.485)

12:40:04 Waiting for Jenkins to finish collecting data
12:40:04 ERROR: Processing failed due to a bug in the code. Please report this to jenkins...@googlegroups.com
12:40:04 java.lang.NullPointerException
12:40:04 at hudson.tasks.LogRotator.perform(LogRotator.java:140)
12:40:04 at hudson.model.Job.logRotate(Job.java:338)
12:40:04 at hudson.model.Run.execute(Run.java:1581)
12:40:04 at hudson.maven.MavenBuild.access$600(MavenBuild.java:83)
12:40:04 at hudson.maven.MavenBuild$ProxyImpl2.close(MavenBuild.java:545)
12:40:04 at hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:106)
12:40:04 at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:794)
12:40:04 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:589)
12:40:04 at hudson.model.Run.execute(Run.java:1516)
12:40:04 at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
12:40:04 at hudson.model.ResourceController.execute(ResourceController.java:88)
12:40:04 at hudson.model.Executor.run(Executor.java:236)
12:40:04 project=hudson.maven.MavenModuleSet@7aa9ec03[com.company.service_service]
12:40:04 project.getModules()=[hudson.maven.MavenModule@394ed452[com.company.service_service/com.company.service:service-client][com.company.service_service/com.company.service:service-client][relativePath:client], hudson.maven.MavenModule@4d1aaeee[com.company.service_service/com.company.service:service-interfaces][com.company.service_service/com.company.service:service-interfaces][relativePath:interfaces], hudson.maven.MavenModule@66d7ba5b[com.company.service_service/com.company.service:service-services][com.company.service_service/com.company.service:service-services][relativePath:services], hudson.maven.MavenModule@21d8ee20[com.company.service_service/com.company.service:service][com.company.service_service/com.company.service:service][relativePath:]]
12:40:04 project.getRootModule()=hudson.maven.MavenModule@21d8ee20[com.company.service_service/com.company.service:service][com.company.service_service/com.company.service:service][relativePath:]
12:40:04 FATAL: null
12:40:04 java.lang.NullPointerException
12:40:04 at hudson.tasks.LogRotator.perform(LogRotator.java:140)
12:40:04 at hudson.model.Job.logRotate(Job.java:338)
12:40:04 at hudson.model.Run.execute(Run.java:1581)
12:40:04 at hudson.maven.MavenBuild.access$600(MavenBuild.java:83)
12:40:04 at hudson.maven.MavenBuild$ProxyImpl2.close(MavenBuild.java:545)
12:40:04 at hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:106)
12:40:04 at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:794)
12:40:04 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:589)
12:40:04 at hudson.model.Run.execute(Run.java:1516)
12:40:04 at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
12:40:04 at hudson.model.ResourceController.execute(ResourceController.java:88)
12:40:04 at hudson.model.Executor.run(Executor.java:236)

Larry Shatzer, Jr.

unread,
Oct 9, 2012, 2:49:59 PM10/9/12
to jenkins...@googlegroups.com
I forgot to mention, this was during a m2-release build.

Loren Keagle

unread,
Oct 9, 2012, 9:12:12 PM10/9/12
to jenkins...@googlegroups.com
Just upgraded to 1.485, and I'm seeing the same issue, but a slightly different stack trace:

Oct 09, 2012 5:59:39 PM hudson.model.Executor run
SEVERE: Executor threw an exception
java.lang.NullPointerException
	at hudson.tasks.LogRotator.perform(LogRotator.java:119)
	at hudson.model.Job.logRotate(Job.java:338)
	at hudson.model.Run.execute(Run.java:1581)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:236)

Oct 09, 2012 5:59:38 PM hudson.model.Run execute
INFO: common-cndomain-3.13.5 #1235 main build action completed: FAILURE
Oct 09, 2012 5:58:43 PM hudson.model.Executor run
SEVERE: Executor threw an exception
java.lang.NullPointerException
	at hudson.tasks.LogRotator.perform(LogRotator.java:119)
	at hudson.model.Job.logRotate(Job.java:338)
	at hudson.model.Run.execute(Run.java:1581)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:236)

Oct 09, 2012 5:58:43 PM hudson.model.Run execute
INFO: fax-trunk6 #87 main build action completed: SUCCESS
Oct 09, 2012 5:58:14 PM hudson.model.Executor run
SEVERE: Executor threw an exception
java.lang.NullPointerException
	at hudson.tasks.LogRotator.perform(LogRotator.java:119)
	at hudson.model.Job.logRotate(Job.java:338)
	at hudson.model.Run.execute(Run.java:1581)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:236)
...

I see the same output on just about every single one of our builds.  I also see other exceptions in the log, but I don't know if they're related:
Oct 09, 2012 5:50:55 PM hudson.triggers.SCMTrigger$Runner run
INFO: SCM changes detected in nexus-3.13.3. Triggering  #936
Oct 09, 2012 5:50:55 PM hudson.model.RunMap retrieve
WARNING: could not load E:\Jenkins\jobs\nexus-3.13.3\builds\934
hudson.util.IOException2: Invalid directory name E:\Jenkins\jobs\nexus-3.13.3\builds\934
	at hudson.model.Run.parseTimestampFromBuildDir(Run.java:332)
	at hudson.model.Run.<init>(Run.java:278)
	at hudson.model.AbstractBuild.<init>(AbstractBuild.java:182)
	at hudson.model.Build.<init>(Build.java:103)
	at hudson.model.FreeStyleBuild.<init>(FreeStyleBuild.java:41)
	at sun.reflect.GeneratedConstructorAccessor52.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at hudson.model.AbstractProject.loadBuild(AbstractProject.java:1061)
	at hudson.model.AbstractProject$1.create(AbstractProject.java:275)
	at hudson.model.AbstractProject$1.create(AbstractProject.java:273)
	at hudson.model.RunMap.retrieve(RunMap.java:217)
	at hudson.model.RunMap.retrieve(RunMap.java:58)
	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:596)
	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:566)
	at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:334)
	at jenkins.model.lazy.AbstractLazyLoadRunMap.getByNumber(AbstractLazyLoadRunMap.java:467)
	at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:345)
	at jenkins.model.lazy.AbstractLazyLoadRunMap.newestBuild(AbstractLazyLoadRunMap.java:287)
	at hudson.model.AbstractProject.getLastBuild(AbstractProject.java:998)
	at hudson.model.AbstractProject.poll(AbstractProject.java:1364)
	at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:420)
	at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:449)
	at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.text.ParseException: Unparseable date: "934"
	at java.text.DateFormat.parse(Unknown Source)
	at hudson.model.Run.parseTimestampFromBuildDir(Run.java:330)
	... 29 more

I see that in addition to the timestamped folders in the /builds directory, there are also links with the revision number.  i.e.:

14 <-link
15 <-link
...
2012-10-09_16-25-28 <- dir
2012-10-09_16-44-19 <- dir

parseTimestampFromBuildDir seems to be trying to read the linked directories instead of the timestamped ones.  

This Jenkins installation is running on Windows Server 2008

~Loren

Youri

unread,
Oct 10, 2012, 3:10:55 AM10/10/12
to jenkins...@googlegroups.com
I have this exception too (1.485), I've restarted the master and its working fine now

Christoph Kutzinski

unread,
Oct 10, 2012, 7:30:00 AM10/10/12
to jenkins...@googlegroups.com
I could imagine that this is related to the lazy build loading introduced in 1.485

Look e.g. https://issues.jenkins-ci.org/browse/JENKINS-15439


-------- Original-Nachricht --------
> Datum: Wed, 10 Oct 2012 00:10:55 -0700 (PDT)
> Von: Youri <you...@gmail.com>
> An: jenkins...@googlegroups.com
> Betreff: Re: Nullpointer in log rotator

> I have this exception too (1.485), I've restarted the master and its
> working fine now
>
> Le mardi 9 octobre 2012 20:45:29 UTC+2, Larry Shatzer, Jr. a écrit :
> >
> > I saw a few of these during startup, and now when a job ran, I saw this:
> > (Using latest jenkins 1.485)
> >
> > 12:40:04 Waiting for Jenkins to finish collecting data
> > 12:40:04 ERROR: Processing failed due to a bug in the code. Please
> report
> > this to jenkins...@googlegroups.com <javascript:>

Pawel

unread,
Oct 10, 2012, 8:02:51 AM10/10/12
to jenkins...@googlegroups.com
Same issue for me. I have first updated to 484, which introduced nasty bug with Maven installations being removed, so I installed 485, which makes plenty of my builds fail because of NPE. Is anyone testing the releases in some real environment before giving them to users?

Phumzile Saleni

unread,
Oct 10, 2012, 8:16:05 AM10/10/12
to jenkins...@googlegroups.com
has anyone found a solution for this?

Phumzile Saleni

unread,
Oct 10, 2012, 8:16:15 AM10/10/12
to jenkins...@googlegroups.com
has anyone found a solution for this?

On Tuesday, 9 October 2012 20:45:29 UTC+2, Larry Shatzer, Jr. wrote:

Nord, James

unread,
Oct 11, 2012, 4:12:06 AM10/11/12
to jenkins...@googlegroups.com

Thorough testing only occurs in the LTS branch.

 

If you don’t want to do some testing of your own before rolling out a Jenkins upgrade I would recommend that you switch from the bleeding edge to LTS.

 

/James





**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postm...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************

Pawel

unread,
Oct 11, 2012, 7:23:45 AM10/11/12
to jenkins...@googlegroups.com
484 was marked as LTS [or LTS candidate?] some time ago. It looks like it isn't anymore.
Reply all
Reply to author
Forward
0 new messages