commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (POOL-196) PooledObject.getActiveTimeMillis() does not synch. access to lastReturnTime and lastBorrowTime
Date Wed, 31 Dec 2014 16:30:18 GMT

     [ https://issues.apache.org/jira/browse/POOL-196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Phil Steitz closed POOL-196.
----------------------------

> PooledObject.getActiveTimeMillis() does not synch. access to lastReturnTime and lastBorrowTime
> ----------------------------------------------------------------------------------------------
>
>                 Key: POOL-196
>                 URL: https://issues.apache.org/jira/browse/POOL-196
>             Project: Commons Pool
>          Issue Type: Bug
>            Reporter: Sebb
>             Fix For: 2.0
>
>
> The method PooledObject.getActiveTimeMillis() compares lastReturnTime and lastBorrowTime,
but is not synchronised; nor are the variables volatile.
> There are two possible thread issues here: safe publication of the variables, and possible
window error when comparing the values.
> The method needs to be synch. and the fields need to be volatile (or the getters need
to be synch.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message