Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-23207

Uninstalling Karaf feature fails because Quartz scheduler does not shut down

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • fuse-7.11.1-GA
    • Camel
    • None
    • False
    • None
    • False
    • % %
    • Todo
    • Important
    • Very Likely

      Fuse 7 on Karaf. When trying to do 'feature:uninstall' on an application feature that uses camel-quartz, the operation never completes. Looking at the thread dump reveals that the uninstall operation is stuck in the Quartz shutdown() method.

      shutdown() is calling halt() on the various scheduler threads, and this halt() method just waits in a join() for the thread to be interrupted. But one Quartz thread is waiting in JobStoreSupport.retryExecuteInNonManagedTXLock(). This is a method that just sleeps repeatedly until a database transaction has finished. So when we look at successive thread dumps, all we see in this thread – which never changes – are calls to Thread.sleep().

      There is no database transaction in progress, so far as I can see. In fact, there's no activity on the database at all. As a result, the halt() method never finishes, and nor does the shutdown() method. This, I think, is simply broken shut-down logic. I note that a bug quite similar to this was raised against Quartz a couple of years ago:

      https://github.com/quartz-scheduler/quartz/issues/448

      The last comment is particularly relevant, since it has the same thread stack as we see in this instance. However, that comment seems to have been added after the bug was closed, and I don't think anybody opened a new bug. So my guess is that the problem described in that comment still exists.

      I have attached a thread dump. We recorded several, but they are all exactly the same.

              Unassigned Unassigned
              rhn-support-kboone Kevin Boone
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: