Uploaded image for project: 'Chukwa (retired)'
  1. Chukwa (retired)
  2. CHUKWA-743

race condition in PidFile

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      I believe there is a race condition in org.apache.hadoop.chukwa.util.PidFile. The problem is that the creation and deletion of the file is not protected by any lock. Client A can delete the file just before Client B tries to acquire a lock. If at that moment Client C tries to create the file, it will succeed. Client B and Client C will both succeed in acquiring a lock because there are two different files (one is hidden because it was deleted after being opened). I have tested similar code on OS X and this is what happened.

      Attachments

        1. CHUKWA-743.patch
          46 kB
          Eric Yang

        Activity

          People

            eyang Eric Yang
            cbfiddle Alan Snyder
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: