You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Hudson (Commented) (JIRA)" <ji...@apache.org> on 2012/02/01 03:08:56 UTC
[jira] [Commented] (HBASE-5290) [FindBugs] Synchronization on boxed
primitive
[ https://issues.apache.org/jira/browse/HBASE-5290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13197506#comment-13197506 ]
Hudson commented on HBASE-5290:
-------------------------------
Integrated in HBase-TRUNK #2649 (See [https://builds.apache.org/job/HBase-TRUNK/2649/])
HBASE-5290 [FindBugs] Synchronization on boxed primitive (Ben West)
tedyu :
Files :
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/CompactSelection.java
> [FindBugs] Synchronization on boxed primitive
> ---------------------------------------------
>
> Key: HBASE-5290
> URL: https://issues.apache.org/jira/browse/HBASE-5290
> Project: HBase
> Issue Type: Bug
> Affects Versions: 0.94.0
> Reporter: Liyin Tang
> Assignee: Ben West
> Priority: Minor
> Fix For: 0.94.0
>
> Attachments: 5290-v3.txt, 5290-v4.txt, HBASE-5290.patch, HBASE-5290.patch, HBASE-5290v2.patch
>
>
> This bug is reported by the findBugs tool, which is a static analysis tool.
> Bug: Synchronization on Integer in org.apache.hadoop.hbase.regionserver.compactions.CompactSelection.emptyFileList()
> The code synchronizes on a boxed primitive constant, such as an Integer.
> {code}
> private static Integer count = 0;
> ...
> synchronized(count) {
> count++;
> }
> ...
> {code}
> Since Integer objects can be cached and shared, this code could be synchronizing on the same object as other, unrelated code, leading to unresponsiveness and possible deadlock
> See CERT CON08-J. Do not synchronize on objects that may be reused for more information.
> Confidence: Normal, Rank: Troubling (14)
> Pattern: DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE
> Type: DL, Category: MT_CORRECTNESS (Multithreaded correctness)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira