mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jake Mannix (JIRA)" <>
Subject [jira] Commented: (MAHOUT-409) Find bugs finds some bugs in our code
Date Thu, 03 Jun 2010 23:39:58 GMT


Jake Mannix commented on MAHOUT-409:

So as the creator of the not-correctly-synchronizing bug, the original intention of it is
actually improperly used in o.a.m.math.decomposer.AsyncEigenVerifier, which sync's on an EigenStatus:
one thread is doing computation, and another thread is doing computation in a loop.  The latter
thread after each iteration, checks the EigenStatus to see if it's still "inProgress()", which
the first thread sets to false when it's done.  Unfortunately, I don't think even that is
being done correctly, if you look at how it's done, it's not synchronizing on a proper final
lock object.  

So while yes, removing the lock on the boolean is correct, it reminds me that the way thread
synchronization was coded (by me), it appears to have been done completely  unsafely.  As
it turns out, the synchronization in practice is between two different threads who only make
checks once every couple 10's of seconds up to once every 10's of minutes (depending on the
data set), and so collisions on updating a single reference are basically infinitessimal.
 Doesn't make it any more correct, but fairly innocuous, at least.

> Find bugs finds some bugs in our code
> -------------------------------------
>                 Key: MAHOUT-409
>                 URL:
>             Project: Mahout
>          Issue Type: Bug
>            Reporter: Ted Dunning
>         Attachments: MAHOUT-409.patch, MAHOUT-409.patch
> I will produce a patch shortly that fixes some low hanging fruit highlighted by findbugs.
> Notably this:
> and
> and
> and

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message