Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-5543

Broker logs show repeated "java.lang.IllegalSt​ateException: Timer already cancelled." lines

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 5.10.0
    • None
    • Transport
    • None

    Description

      One of our brokers running 5.10.0 spewed over 1 million of the following exceptions to the log over a 2-hour period:

      Transport Connection to: tcp://127.0.0.1:xxxxx failed: java.io.IOException: Unexpected error occurred: java.lang.IllegalStateException: Timer already cancelled.

      Clients were observed to hang on startup (which we believe means they were unable to connect to the broker) until it was rebooted, after which we haven't seen the exception again.

      Once the exceptions started, there were no stack traces or other log lines that would indicate anything else about the cause, just those messages repeating. The problems started immediately (a few milliseconds) after an EOFException in the broker logs; we see those EOFExceptions pretty often and they've never before resulted in "Timer already cancelled" exceptions, so that might indicate what got us into a bad state but then again it might be entirely unrelated.

      I searched JIRA and the mailing list archives for similar issues, and although there are a lot of incidences of "Timer already cancelled" exceptions, none of them exactly match our situation.

      The only thing that we observed that might be related was that earlier in the broker's uptime, the developer who was running it ran up against his maxProc limit and wasn't able to create new native threads. That didn't result in any issues in the broker logs at the time (we only hit these issues several hours later), so I'm skeptical that it's related given that there are lots of other things that cause "Timer already cancelled" exceptions as evidenced by the partial list above, but it could be.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tbain98 Tim Bain
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: