[JBoss JIRA] (AG-140) Connection leak caused by failed transaction integration
by Dmitry Telegin (Jira)
[ https://issues.redhat.com/browse/AG-140?page=com.atlassian.jira.plugin.sy... ]
Dmitry Telegin updated AG-140:
------------------------------
Description:
If the following conditions are met:
- transaction integration is installed;
- connection checkout has been successful;
- {{transactionIntegration.associate(...)}} (ConnectionPool.java:222) throws an exception,
then the code that called {{getConnection()}} will have no reference to the connection object, hence no ability to close it and return to the pool. The connection won't be reaped or GCed, thus staying in the checked-out state forever, which in turn can lead to connection pool exhaustion.
The following snippet demonstrates the issue (assuming that Hibernate uses Agroal+Narayana and the transaction is active):
{code:java}
Foo foo = new Foo();
try {
em.merge(foo); // org.hibernate.id.IdentifierGenerationException due to missing ID, transaction aborted
} catch (Exception e) {
// suppress exception
LOG.log(Level.WARNING, "merge", e);
}
// continue using the same EntityManager
em.find(Foo.class, 0L); // java.sql.SQLException: Exception in association of connection to existing transaction, connection leaked
{code}
Obviously, the usage pattern is invalid (must handle the exception properly and must not use EntityManager afterwards), but it shouldn't lead to connection leaks either.
The compete PoC: https://github.com/dteleguin/agroal-connection-leak-poc
was:
If the following conditions are met:
- transaction integration is installed;
- connection checkout has been successful;
- {{transactionIntegration.associate(...)}} (ConnectionPool.java:222) throws an exception,
then the code that called {{getConnection()}} will have no reference to the connection object, hence no ability to close it and return to the pool. The connection won't be reaped or GCed, thus staying in the checked-out state forever, which in turn can lead to connection pool exhaustion.
The following snippet demonstrates the issue (assuming that Hibernate uses Agroal+Narayana and the transaction is active):
{code:java}
Foo foo = new Foo();
try {
em.merge(foo); // org.hibernate.id.IdentifierGenerationException due to missing ID, transaction aborted
} catch (Exception e) {
// suppress exception
LOG.log(Level.WARNING, "merge", e);
}
// continue using the same EntityManager
em.find(Foo.class, 0L); // java.sql.SQLException: Exception in association of connection to existing transaction, connection leaked
{code}
Obviously, the usage pattern is invalid (must handle the exception properly and must not use EntityManager), but it shouldn't lead to connection leaks.
The compete PoC: https://github.com/dteleguin/agroal-connection-leak-poc
> Connection leak caused by failed transaction integration
> --------------------------------------------------------
>
> Key: AG-140
> URL: https://issues.redhat.com/browse/AG-140
> Project: Agroal
> Issue Type: Bug
> Components: narayana, pool
> Affects Versions: 1.8
> Reporter: Dmitry Telegin
> Assignee: Luis Barreiro
> Priority: Major
>
> If the following conditions are met:
> - transaction integration is installed;
> - connection checkout has been successful;
> - {{transactionIntegration.associate(...)}} (ConnectionPool.java:222) throws an exception,
> then the code that called {{getConnection()}} will have no reference to the connection object, hence no ability to close it and return to the pool. The connection won't be reaped or GCed, thus staying in the checked-out state forever, which in turn can lead to connection pool exhaustion.
> The following snippet demonstrates the issue (assuming that Hibernate uses Agroal+Narayana and the transaction is active):
> {code:java}
> Foo foo = new Foo();
> try {
> em.merge(foo); // org.hibernate.id.IdentifierGenerationException due to missing ID, transaction aborted
> } catch (Exception e) {
> // suppress exception
> LOG.log(Level.WARNING, "merge", e);
> }
>
> // continue using the same EntityManager
> em.find(Foo.class, 0L); // java.sql.SQLException: Exception in association of connection to existing transaction, connection leaked
> {code}
> Obviously, the usage pattern is invalid (must handle the exception properly and must not use EntityManager afterwards), but it shouldn't lead to connection leaks either.
> The compete PoC: https://github.com/dteleguin/agroal-connection-leak-poc
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 2 months
[JBoss JIRA] (AG-140) Connection leak caused by failed transaction integration
by Dmitry Telegin (Jira)
Dmitry Telegin created AG-140:
---------------------------------
Summary: Connection leak caused by failed transaction integration
Key: AG-140
URL: https://issues.redhat.com/browse/AG-140
Project: Agroal
Issue Type: Bug
Components: narayana, pool
Affects Versions: 1.8
Reporter: Dmitry Telegin
Assignee: Luis Barreiro
If the following conditions are met:
- transaction integration is installed;
- connection checkout has been successful;
- {{transactionIntegration.associate(...)}} (ConnectionPool.java:222) throws an exception,
then the code that called {{getConnection()}} will have no reference to the connection object, hence no ability to close it and return to the pool. The connection won't be reaped or GCed, thus staying in the checked-out state forever, which in turn can lead to connection pool exhaustion.
The following snippet demonstrates the issue (assuming that Hibernate uses Agroal+Narayana and the transaction is active):
{code:java}
Foo foo = new Foo();
try {
em.merge(foo); // org.hibernate.id.IdentifierGenerationException due to missing ID, transaction aborted
} catch (Exception e) {
// suppress exception
LOG.log(Level.WARNING, "merge", e);
}
// continue using the same EntityManager
em.find(Foo.class, 0L); // java.sql.SQLException: Exception in association of connection to existing transaction, connection leaked
{code}
Obviously, the usage pattern is invalid (must handle the exception properly and must not use EntityManager), but it shouldn't lead to connection leaks.
The compete PoC: https://github.com/dteleguin/agroal-connection-leak-poc
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 2 months
[JBoss JIRA] (DROOLS-3685) [DMN Designer] Boxed expressions - Decision Table - Output clause - Show Data Type fields automatically
by Guilherme Gomes (Jira)
[ https://issues.redhat.com/browse/DROOLS-3685?page=com.atlassian.jira.plug... ]
Guilherme Gomes updated DROOLS-3685:
------------------------------------
Description: When users select a "Structured" Data Type in a Decision Table output clause, the Data Type fields should be automatically shown as "sub-cells". (was: When users select a "Structured" Data Type in a Decision Table output clause, the Data Type fields should be automatically shown as "sub-cells".
⚠️ Notice: Before starting this issue, check about a possible limitation for the number of automatically created columns.)
> [DMN Designer] Boxed expressions - Decision Table - Output clause - Show Data Type fields automatically
> -------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-3685
> URL: https://issues.redhat.com/browse/DROOLS-3685
> Project: Drools
> Issue Type: Enhancement
> Components: DMN Editor
> Affects Versions: 7.18.0.Final
> Reporter: Guilherme Gomes
> Assignee: Guilherme Gomes
> Priority: Major
> Labels: drools-tools
>
> When users select a "Structured" Data Type in a Decision Table output clause, the Data Type fields should be automatically shown as "sub-cells".
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 2 months
[JBoss JIRA] (WFLY-9856) [JDK9+] org.jboss.security.negotiation package is exported by two jars
by Darran Lofthouse (Jira)
[ https://issues.redhat.com/browse/WFLY-9856?page=com.atlassian.jira.plugin... ]
Darran Lofthouse resolved WFLY-9856.
------------------------------------
Resolution: Won't Do
> [JDK9+] org.jboss.security.negotiation package is exported by two jars
> ----------------------------------------------------------------------
>
> Key: WFLY-9856
> URL: https://issues.redhat.com/browse/WFLY-9856
> Project: WildFly
> Issue Type: Bug
> Components: Security
> Reporter: Tomaž Cerar
> Assignee: Darran Lofthouse
> Priority: Major
>
> Currently if you have
> jboss-negotiation-common-3.0.4.Final.jar and jboss-negotiation-extras-3.0.4.Final.jar
> on your module path, jvm complains as both jars export package org.jboss.security.negotiation package
> which violates the modules contract where only one module (jar) can provide single package.
> example error that jvm prints
> {noformat}
> Error: Modules jboss.negotiation.common and jboss.negotiation.extras export package org.jboss.security.negotiation to module wildfly.clustering.common
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 2 months