Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-56896

Shutdown message 'INFOS: JVM is terminating. Shutting down Jetty' is shown randomly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • winstone-jetty
    • 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

            Unassigned Unassigned
            batmat Baptiste Mathus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: