Re: Bad concurrency bug in 0.12.3?

2007-06-05 Thread Calvin Yu
Here's a thread dump of the problem. When I kicked off a job this weekend, it actually completed. I kicked off another one yesterday and get the problem. Calvin On 6/1/07, Doug Cutting [EMAIL PROTECTED] wrote: Calvin Yu wrote: public class Test { public static void main(String[] args) {

RE: Bad concurrency bug in 0.12.3?

2007-06-01 Thread Devaraj Das
Looks like you have a good point! I think you are right. Let me raise a jira to handle this issue more generally, i.e., fix all places wherever this kind of check needs to be done. -Original Message- From: Calvin Yu [mailto:[EMAIL PROTECTED] Sent: Friday, June 01, 2007 8:50 PM To:

Re: Bad concurrency bug in 0.12.3?

2007-06-01 Thread Doug Cutting
Calvin Yu wrote: The problem seems to be with the MapTask's (MapTask.java) sort progress thread (line #196) not stopping after the sort is completed, and hence the call to join() (line# 190) never returns. This is because that thread is only catching the InterruptedException, and not checking

Re: Bad concurrency bug in 0.12.3?

2007-06-01 Thread Calvin Yu
You're right Doug, I ran a simple test to verify that interrupt() will result in a InterruptedException on a call to sleep(), so my hang up problem is something else. I'm going to rerun my job and post a thread dump of the hang up. Calvin On 6/1/07, Doug Cutting [EMAIL PROTECTED] wrote:

Re: Bad concurrency bug in 0.12.3?

2007-06-01 Thread Doug Cutting
Are you certain that interrupt() is called before sleep()? If interrupt() is called during the sleep() then it should clearly throw the InterruptedException. The question is whether it is thrown if the call to interrupt() precedes the call to sleep(). Please feel free to post your test

Re: Bad concurrency bug in 0.12.3?

2007-06-01 Thread Owen O'Malley
I've looked over the code and it looks right. I like the InteruptedException for telling threads to stop. The only gotcha is that a lot of the old Hadoop code ignores InterruptedException. But looking at the code in that thread, there is only one handler and it re-interrupts the thread. So

Re: Bad concurrency bug in 0.12.3?

2007-06-01 Thread Calvin Yu
public class Test { public static void main(String[] args) { System.out.println(interrupting..); Thread.currentThread().interrupt(); try { Thread.sleep(100); System.out.println(done.); } catch (InterruptedException e) { e.printStackTrace(); } } } Granted, this is