harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse Wilson (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-6312) Concurrency problems in NIO
Date Mon, 17 Aug 2009 20:49:14 GMT
Concurrency problems in NIO

                 Key: HARMONY-6312
                 URL: https://issues.apache.org/jira/browse/HARMONY-6312
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: SVN Revision: 801399
            Reporter: Jesse Wilson

There's several potential concurrency problems in our NIO implementation...
 - Charset#isSupported isn't synchronized, but it accesses mutable member cachedCharsetTable.
 - In SelectionKeyImpl, stHash++ is a non-atomic operation so multiple SelectionKey instances
may receive the same hash code. (Why not use the default hash code?)
 - In SelectorImpl, the unmodifiableKeys member is never synchronized on. But the documentation
specifies that clients can synchronize on that set to guard against changes

These are the obvious problems; I suspect there are more subtle concurrency defects at play
here. I'll prepare a patch to address the major issues, and we should consider a rigorous
approach (Findbugs?) to discover concurrency problems.


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

View raw message