Closed timja closed 8 years ago
It was caused by changes in the Update Wizard made by kzantow.
Does this issue block the startup?
Yes, the NPE stacktrace is the only thing shown in the web UI.
axelbehrens Do you remember what you did in 2.5? Did you run the upgrade wizard (installation of Pipeline plugins)? Did you dismiss it, or ignore the banner?
axelbehrens could you provide any additional information how you were able to get your Jenkins instance into this state? I was not able to reproduce it installing 2.5 and upgrading to 2.6. In any case, I've prepared a patch, which should fix this against the 2.6 codebase here.
kzantow, this is only a test instance running on my laptop (Windows 7 x64). I've installed v2.0 from scratch, added a handful of plugins and created some jobs. I automatically updated pretty much to every new release until 2.6.
This is my config.xml if that helps:
jenkins.diagnostics.SecurityIsOffMonitor 1.0 RESTART 2 NORMAL true false ${ITEM_ROOTDIR}/workspace ${ITEM_ROOTDIR}/builds 0 All false false All 0
Cheers
Copy-paste from Keith's PR: "IMHO the only realistic case of getting such state is a corrupted config file with the legacy non-transient installState due to the whatever reason (e.g. upgrade from the previous version). I would vote for handling it in InstallState#readResolve() or in Jenkins#readResolve()"
Working on this alternate solution
oleg_nenashev yeah, this
Agreed, XStream fix does not close all potential misuse cases. Created https://github.com/jenkinsci/jenkins/pull/2387 anyway
Code changed in jenkins
User: Oleg Nenashev
Path:
core/src/main/java/jenkins/install/InstallState.java
test/src/test/java/jenkins/install/InstallStateTest.java
http://jenkins-ci.org/commit/jenkins/1b2711c9578f5b34bc452fcc3f2dd055b1c0865c
Log:
JENKINS-35206 - Make the InstallState object deserialization robust against corrupted files (#2387)
Code changed in jenkins
User: Keith Zantow
Path:
core/src/main/java/jenkins/install/InstallUtil.java
core/src/main/java/jenkins/model/Jenkins.java
http://jenkins-ci.org/commit/jenkins/541641100b4a9570d72d263a12edbc1e06c987a2
Log:
JENKINS-35206 - fix potential NPE due to corrupt Jenkins.InstallState (#2385)
BTW: It's fixed now in 2.8
Code changed in jenkins
User: Keith Zantow
Path:
core/src/main/java/jenkins/install/InstallUtil.java
core/src/main/java/jenkins/model/Jenkins.java
http://jenkins-ci.org/commit/jenkins/3837f44a6f2621dde0bea59c522cc1e0464b67c2
Log:
JENKINS-35206 - fix potential NPE due to corrupt Jenkins.InstallState (#2385)
(cherry picked from commit 541641100b4a9570d72d263a12edbc1e06c987a2)
Code changed in jenkins
User: Oleg Nenashev
Path:
core/src/main/java/jenkins/install/InstallState.java
test/src/test/java/jenkins/install/InstallStateTest.java
http://jenkins-ci.org/commit/jenkins/e8467e304ba33329c1afd0fa15a8456f52711f4b
Log:
JENKINS-35206 - Make the InstallState object deserialization robust against corrupted files (#2387)
(cherry picked from commit 1b2711c9578f5b34bc452fcc3f2dd055b1c0865c)
After updating to 2.6 from 2.5 I'm getting the following NPE directly at startup:
The stacktrace didn't suggest a particular plugin so I chose 'core' as component. Please correct if necessary.
jenkins.err.log
Originally reported by axelbehrens, imported from: NullPointerException on startup after update from 2.5 to 2.6