harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregory Shimansky <gshiman...@gmail.com>
Subject Re: [drlvm][build-alert] do I need to rollback H3413?
Date Tue, 27 Mar 2007 10:53:59 GMT
Pavel Rebriy wrote:
> I created a JIRA HARMONY-3504 [1] about ThreadGroupTest failure and 
> attached
> a fixing patch.

I looked at the patch in HARMONY-3504 and I don't quite like it. It 
changes the following assertion

assert(tm_native_thread->request > 0);

to

assert(tm_native_thread->request > 0 || 
tm_native_thread->safepoint_callback == NULL);

The first version check the condition atomically, and doesn't contain a 
race condtion. But the 2nd version may contain a race condition. You 
need to check that either 1st or 2nd condition is true.

But it may happen that while checking 1st condition only the 2nd is 
true, and while checking the 2nd condition, only 1st is true. So this 
assertion will fail while the whole condition stays true all the time. 
If it is not possible to check the whole condition atomically, probably 
it is necessary to remove this assertion entirely.

> [1] https://issues.apache.org/jira/browse/HARMONY-3504
> 
> On 27/03/07, Vladimir Ivanov <ivavladimir@gmail.com> wrote:
>>
>> On 3/27/07, Peter Novodvorsky <peter.novodvorsky@gmail.com> wrote:
>> > Hello,
>> >
>> > Thanks for the log, Vladimir, I'll look at the bug. From my point of
>> > view we shouldn't rollback  3413, but we should try to fix it right
>> > now instead.
>>
>> Of cause, it is match better than rollback if it requires not too match
>> time...

-- 
Gregory


Mime
View raw message