Static Code Review: Inconsistent synchronization of org.apache.commons.dbcp.SakaiBasicDataSource.m_rollbackOnReturn; locked 50% of time

Description

See: http://qa1-nl.sakaiproject.org/codereview/bug_dashboard/findbugs_MT_CORRECTNESS.html

IS2_INCONSISTENT_SYNC org.apache.commons.dbcp.SakaiBasicDataSource 96 Inconsistent synchronization of org.apache.commons.dbcp.SakaiBasicDataSource.m_rollbackOnReturn; locked 50% of time

IS: Inconsistent synchronization (IS2_INCONSISTENT_SYNC)

The fields of this class appear to be accessed inconsistently with respect to synchronization. This bug report indicates that the bug pattern detector judged that

The class contains a mix of locked and unlocked accesses,
At least one locked access was performed by one of the class's own methods, and
The number of unsynchronized field accesses (reads and writes) was no more than one third of all accesses, with writes being weighed twice as high as reads
A typical bug matching this bug pattern is forgetting to synchronize one of the methods in a class that is intended to be thread-safe.

You can select the nodes labeled "Unsynchronized access" to show the code locations where the detector believed that a field was accessed without synchronization.

Note that there are various sources of inaccuracy in this detector; for example, the detector cannot statically detect all situations in which a lock is held. Also, even when the detector is accurate in distinguishing locked vs. unlocked accesses, the code in question may still be correct.

This description refers to the "IS2" version of the pattern detector, which has more accurate ways of detecting locked vs. unlocked accesses than the older "IS" detector.

Activity

Show:

Jean-François Lévêque November 13, 2008 at 2:00 AM

Cannot be found in this part of the code in trunk any more through http://qa1-nl.sakaiproject.org/codereview/bug_dashboard/findbugs_MT_CORRECTNESS.html

Jean-François Lévêque November 13, 2008 at 1:31 AM

2.5.x merge r54260

Jean-François Lévêque November 12, 2008 at 8:18 AM

Hasn't been merged in 2.5 yet

Fixed

Details

Priority

Affects versions

Fix versions

Components

Assignee

Reporter

Created February 22, 2008 at 1:48 PM
Updated November 4, 2009 at 7:59 PM
Resolved February 22, 2008 at 1:50 PM