Issue Details (XML | Word | Printable)

Key: HADOOP-4924
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Devaraj Das
Reporter: Devaraj Das
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Hadoop Common

Race condition in re-init of TaskTracker

Created: 21/Dec/08 03:37 PM   Updated: 30/Jan/09 08:14 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 0.18.3, 0.19.1

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works 4924.patch 2008-12-21 06:31 PM Devaraj Das 1 kB

Hadoop Flags: Reviewed
Resolution Date: 22/Dec/08 01:13 PM


 Description  « Hide
The taskReportServer is stopped in the TaskTracker.close() method in a thread. The race condition is:
1) TaskTracker.close() is invoked - this starts a thread to stop the taskReportServer
2) TaskTracker.initialize is invoked - this tries to create a new taskReportServer
Assume that the thread started to stop the taskReportServer gets to start its work after (2) above. The thread will end up stopping the newly created taskReportServer.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Devaraj Das added a comment - 21/Dec/08 06:31 PM
In the attached patch, I removed the thread doing the taskReportServer.stop(). Instead the TaskTracker.close() stops the taskReportServer inline (this is anyway required for the case where the config for the TaskTracker specifies the RPC port as some non-zero number).

Arun C Murthy added a comment - 22/Dec/08 07:00 AM
+1

Devaraj Das added a comment - 22/Dec/08 01:13 PM
All tests including test-patch passed on my machine. Committed this.

dhruba borthakur added a comment - 24/Dec/08 06:45 PM
It would be nice if somebody can comment if this affects 0.17 and 0.18 as well.

Devaraj Das added a comment - 25/Dec/08 04:26 AM
Yes it does affect those versions as well.

dhruba borthakur added a comment - 25/Dec/08 03:31 PM
Hi Devaraj, If this affects 0.19 as well, does it need to be commtted into that branch as well?

Devaraj Das added a comment - 29/Dec/08 11:26 AM
Ok I committed this to 0.19 branch too..

dhruba borthakur added a comment - 29/Dec/08 04:11 PM
Thanks Devaraj, for committing this into 0.19.

Devaraj Das added a comment - 21/Jan/09 07:29 AM
I committed this to the 0.18 branch too.