Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-4581

thread safe issue in NodeIdGenerator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 0.14.0
    • 0.16.0
    • impl
    • any computer with multiple cores, does not always happen since it is not a determinitic bug. The more threads and real cpu, the more chances it will happen.

    • Reviewed
    • ThreadSafe version of NodeIdGenerator

    Description

      NodeIdGenerator use an HashMap without any synchronization. In multithreaded environment it may lead to concurrent access to the HashMap which, in some case, triggers an infinite loop inside the HashMap implementation => the parsing of the pig request never ends so the job will never run + it eats a threads in the JVM that just keep burning CPU cycles.

      since it is hard to reproduce and it is not a deterministic bug it is impossible to provide a viable unit tests for it to demonstrate both the bug and the fix.

      Attachments

        1. PIG-4581.patch
          3 kB
          Remi Catherinot

        Activity

          People

            rcatherinot Remi Catherinot
            rcatherinot Remi Catherinot
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: