Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-10456

Ambari Server Deadlock When Mapping Hosts

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.0.0
    • 2.0.1, 2.1.0
    • None
    • None

    Description

      When mapping hosts concurrently with reading information from a cluster, there was a deadlock between the building the cluster health report and mapping the new hosts.

      A few changes to note here:

      • ClustersImpl uses concurrent maps; there's really no need to keep the internal lock. I removed it in several places where the cluster is guaranteed to be available (such as when using the ID to retrieve the cluster). The concurrent maps guard against concurrent modifications.
      • The Ambari Event Publisher was actually synchronous. This not only caused bottlenecks, but also contributed to a secondary deadlock detected while fixing the original issue. It was changed into a single-threaded asynchronous bus. Consumers of this bus should never rely on it to perform its actions in order to perform their own logic, so changing the behavior seemed correct

      Attachments

        1. dump.txt
          568 kB
          Jonathan Hurley
        2. AMBARI-10456.patch
          35 kB
          Jonathan Hurley

        Issue Links

          Activity

            People

              jonathanhurley Jonathan Hurley
              jonathanhurley Jonathan Hurley
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: