Plexus compiler 1.8.6 that maven-compiler-plugin 2.4 has a static field
to store a reference to the Javac class in tools.jar
In JDK that I use (6u26), Javac has a static field that stores what
appears to be a cache of jar files (ZipFileIndex.zipFileIndexCache).
And in addition, Maven instantiates a separate ClassRealm to host plugin
jar files when a project has any build extensions.
The combined result is that during a build, we end up having multiple
copies of URLClassLoader that loads tools.jar, and each ends up caching
jar files it was used. This puts a pressure to permgen (although I
couldn't pinpoint which portions of those caches use permgen), resulting
in OOME.
In Plexus compiler 1.9, Olivier added a new feature to control the
caching/reuse of Javac compiler. While this apparently was done
primarily for fixing concurrency issues in multi-threaded builds, it is
also a useful mechanism to prevent the retention of Javac classes.
So I pushed the SNAPSHOT version of maven-compiler-plugin as
2.5-jenkins-1 and tweaking POM to use it.
Until now, Jenkins.overallNodeProvisioner was tracking an inconsistent
pair of numbers. On one hand, it was tracking all the executors in the
system, but then it was also only tracking the # of free-roaming
label-unassigned jobs as the queue length.
So if all your slaves are set with Node.Mode.EXCLUSIVE and you have some
free-roaming jobs, then it'll never tickle NodePrivisioner.
In other words, the # of executors weren't reflecting the actual # of
executors that can execute what's counted as the queue length.
See the problem report at
https://groups.google.com/forum/?fromgroups#!topic/jenkinsci-dev/bUwGEgOwv4Q
To fix this, I introduced another LoadStatistics that only counts
the # of executors that can execute free-roaming jobs, and # of
free-roaming jobs as the queue length. In this way, two pairs of numbers
are consistent.
This now allows us to use overallLoadStatistics for really the entire
system, including all executors and the total queue length. This is
primarily for administrators to see the resource utilization, and it is
not useful for NodeProvisioner input because it's mixing too many
different things.
The semantics change in OverallLoadStatistics.queueLength allows us to
deprecate its totalQueueLength field.
Backward compatibility is preventing the View.READ permission to apply
correctly. It actually overrides the View.READ instead of complementing
it.
This change only applies default READ right if the View.READ is not
available, and the user has View.CONFIGURE + the view is not empty.
The previous implementation was always appending the per-configuration unique suffix, making it impossible for different configuration builds to share workspaces. In this fix, we introduce a secondary field to control the workspace of sub-builds (which can be either absolute or relative to the matrix head workspace.)
In the past JDK download site had served error message with 200 error code, making Jenkins think that the download is actually successful. Without this check, such cache polution will not be corrected.