chukwa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Yang (JIRA)" <>
Subject [jira] [Updated] (CHUKWA-743) race condition in PidFile
Date Sun, 12 Apr 2015 23:21:12 GMT


Eric Yang updated CHUKWA-743:
    Status: Patch Available  (was: Open)

> race condition in PidFile
> -------------------------
>                 Key: CHUKWA-743
>                 URL:
>             Project: Chukwa
>          Issue Type: Bug
>            Reporter: Alan Snyder
>         Attachments: CHUKWA-743.patch
> 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.

This message was sent by Atlassian JIRA

View raw message