This is funny issue I discovered recently after being pointed out by a customer.
- 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
The message should be always shown.
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 ?!?