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

org.apache.activemq.thread.PooledTaskRunner.wakeup() doesn't handle errors

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Abandoned
    • 5.x
    • NEEDS_REVIEW
    • Pool
    • SUSE Linux Enterprise Server 11 (x86_64)
      VERSION = 11
      PATCHLEVEL = 3

    Description

      We were getting below error in logs only once, but once this error comes OnMessage was not getting called in my listener class. We found that in org.apache.activemq.thread.PooledTaskRunner.wakeup() , if some Error is thrown on line "executor.execute(runable)", like the one below, no further messages will be processed by the PooledTaskRunner.wakeup() since the flag queued will be set to true and

      if (queued || shutdown)

      { return; }

      will make any future call to be returned without being processed.

      14:26:04,676 ERROR [stderr] (ActiveMQ Session Task-14) Exception in thread "ActiveMQ Session Task-14" java.lang.OutOfMemoryError: unable to create new native thread
      14:26:04,677 ERROR [stderr] (ActiveMQ Session Task-14) at java.lang.Thread.start0(Native Method)
      14:26:04,677 ERROR [stderr] (ActiveMQ Session Task-14) at java.lang.Thread.start(Thread.java:691)
      14:26:04,677 ERROR [stderr] (ActiveMQ Session Task-14) at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:943)
      14:26:04,677 ERROR [stderr] (ActiveMQ Session Task-14) at java.util.concurrent.ThreadPoolExecutor.processWorkerExit(ThreadPoolExecutor.java:992)
      14:26:04,677 ERROR [stderr] (ActiveMQ Session Task-14) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      14:26:04,677 ERROR [stderr] (ActiveMQ Session Task-14) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      14:26:04,678 ERROR [stderr] (ActiveMQ Session Task-14) at java.lang.Thread.run(Thread.java:722)

      The issue can be reproduced by injecting java.lang.Error after line queued = true is executed.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tapanjaggi Tapan Jaggi
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: