[
https://issues.apache.org/jira/browse/POOL-336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16307502#comment-16307502
]
Wolfgang Glas commented on POOL-336:
------------------------------------
OK, I raised an issue against mariadb-connector-j, see
https://jira.mariadb.org/browse/CONJ-564
https://github.com/MariaDB/mariadb-connector-j/pull/119
I also found an instance of {{throw Error()}} inside
{{sun.nio.ch.DatagramChannelImpl.connect(SocketAddress)}}, which might be the
original cause of a {{java.lang.Error}} instance being raised. (This might be a
bug in the native parts of openjdk8 on Linux...)
For the commons-pool2 part I think we are finished here, because my patch only
corrects {{makeCount}} in {{GenericObjectPool.create()}} upon a catched
Throwable an does nothing more.
So, I tend to close this issue at this point.
Is this OK for you, Gary and Mark?
Regards, Wolfgang
> GenericObjectPool's borrowObject lock if create() fails with Error
> ------------------------------------------------------------------
>
> Key: POOL-336
> URL: https://issues.apache.org/jira/browse/POOL-336
> Project: Commons Pool
> Issue Type: Bug
> Affects Versions: 2.4.3, 2.5.0
> Environment: mariadb-connector-j
> Reporter: Wolfgang Glas
> Labels: patch
> Fix For: 2.5.1
>
> Attachments: 0001-Add-a-test-case-for-POOL-336.patch,
> 0002-Fix-POOL-336.patch
>
>
> We've spotted exactly the same problem as described in POOL-303 for a pool
> using mariadb-connector-j-2.1.2 with a pool configured to a size, which
> exactly reflects the normal quantity of used DB connections.
> After weeks of monitoring the situation, we were able to see the same problem
> as described in POOL-303. After some more drilldown efforts we concluded,
> that the problem is triggered, because mariadb-connector-j throws instances
> of Throwables derived from {{java.lang.Error}}, which are not instances of
> {{java.lang.Execption}}.
> This leads to a leak of {{makeCount}} in GenericObjectPool.create(), because
> {{makeCount}} is only decremented, when an instance of
> {{java.lang.Exception}} is thrown and not when an instance of
> {{java.langError}} is thrown.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)