Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-208

Zookeeper C client uses API that are not thread safe, causing crashes when multiple instances are active

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.0.0
    • 3.0.1, 3.1.0
    • c client
    • None
    • Linux

    • Reviewed

    Description

      The Zookeeper C client library uses gethostbyname and strtok, both of which are not safe to use from multiple threads.

      The problem is resolved by using getaddrinfo and strtok_r in place of the older API.

      Attachments

        1. ZOOKEEPER-208.patch
          9 kB
          Benjamin Reed
        2. zookeeper-strtok_getaddrinfo-trunk.patch
          3 kB
          Austin Bennett
        3. zookeeper-strtok_getaddrinfo-trunk.patch
          3 kB
          Chris Darroch

        Activity

          People

            austin Austin Bennett
            austin Austin Bennett
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: