-
Bug
-
Resolution: Unresolved
-
Minor
-
None
This is funny issue I discovered recently after being pointed out by a customer.
How to reproduce
- Start Jenkins
- Wait a bit of time until it reaches full startup (no new log shown, generally ~30 to 60 seconds, say)
- Stop it with a signal/Ctrl-C
- Doing this many times, see that the message INFOS: JVM is terminating. Shutting down Jetty is not shown consistently
Expected behavior
The message should be always shown.
Asides
This seems like this is not a big deal, given this has been this way for a long time, if not forever.
I was able to reproduce it using even an old Jenkins 2.1: docker run jenkinsci/jenkins:2.1.
Technically, after a small testing, the issue seems to be that when the ShutdownHook gets called, sometimes the launcher is null ?!?
https://github.com/jenkinsci/winstone/blob/79fb68763729c24fd70fcf6a1064c472b3a9ce66/src/main/java/winstone/ShutdownHook.java#L23