Previously, wa.contextDestroyed(null) interrupts the Jenkins.<init>
thread, and it was the 2nd reactor call that was throwing InterruptedException
from this call. Now that I removed that 2nd reactor call, the init
thread never actually fails.
The intent of the test case is to make sure the boot failure hook is
invoked, so even with this change it covers the original intent.
ReverseBuildTrigger autocompletes lists of jobs by delimiters when you select items, so sometimes you get the "Jib1, Job2, " in the form submission. Then ReverseBuildTrigger invokes Items::fromNameList() in order to resolve the dependency graph.
In this method Jenkins splits the string, trims it and then tries to resolve jobs. In such case an empty string is being passed to the resolution code. It may be unsafe since items (e.g. folders) may somehow override and mishandle the logic.
It would be useful to avoid such resolution attempts.
As a part of PR 1847, 3b5424e507 introduced a second invocation to
executeReactor. This is causing a problem in that it exectes
InitMilestone progression twice. If you are looking at
Jenkins.getInitLevel() it will go through STARTED ... COMPLETED once,
then it goes back to STARTED and then go to COMPLETED again.
And this code looks bit odd anyway. Why execute a whole reactor
just to make one method invocation? But I didn't see any discussion of
this in PR 1847.
This change fixes this oddity by making this a part of the main
(and sole) initialization reactor session. It's not clear what
milestone should be the pre-requisite, but given that it's only looking
at dependency chain, PLUGINS_PREPARED should be adequate.
... or else it'll keep running. This can be seen as a large number of zombie threads like the following in the unit test:
"NioChannelHub keys=0 gen=0: Computer.threadPoolForRemoting [#250]" daemon prio=10 tid=0x00007f793d841000 nid=0x3cc1 runnable [0x00007f78e2665000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:228)
at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:81)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:87)
- locked <0x00000000c50d46d8> (a sun.nio.ch.Util$2)
- locked <0x00000000c50d46e8> (a java.util.Collections$UnmodifiableSet)
- locked <0x00000000c50d4690> (a sun.nio.ch.EPollSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:98)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:102)
at org.jenkinsci.remoting.nio.NioChannelHub.run(NioChannelHub.java:542)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Fix the width & height of the icon via CSS.
Previously, we were relying on the actual image being served as a
correct size. This is fine for icons we ship in Jenkins, but when
plugins use avatars as icons, those images might not come in the correct
size.
Using the new feature introduced in Maven 3.3.1.
See
https://maven.apache.org/docs/3.3.1/release-notes.html#JVM_and_Command_Line_Options
for more details.
Possibly a long term better solution/first encounter for newcomers. When
people can't build Jenkins because of wrong default memory settings.
Like https://goo.gl/Co9kye
The "Xmx800m" was chosen after looking at last successful ci.j.o builds.
Max memory displayed by Maven being ~730MB. So putting 800 to leave the
build some room so that the GC has less chance to have to chime in too
often.