[jira] [Updated] (IGNITE-21083) Java thin 3.0: Sporadic IllegalReferenceCountException when reading jdbc messages

2023-12-15 Thread Pavel Tupitsyn (Jira)


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

Pavel Tupitsyn updated IGNITE-21083:

Ignite Flags:   (was: Docs Required,Release Notes Required)

> Java thin 3.0: Sporadic IllegalReferenceCountException when reading jdbc 
> messages
> -
>
> Key: IGNITE-21083
> URL: https://issues.apache.org/jira/browse/IGNITE-21083
> Project: Ignite
>  Issue Type: Bug
>  Components: thin client
>Reporter: Maksim Zhuravkov
>Assignee: Pavel Tupitsyn
>Priority: Major
>  Labels: ignite-3
> Fix For: 3.0.0-beta2
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Some jdbc test fail  with IllegalReferenceCountException refCnt 0 
> (`org.apache.ignite.jdbc.ItJdbcResultSetSelfTest.testFindColumn`).
> This issue maybe caused by the following code in `TcpClientChannel` , because 
> a buffer is sent to another thread w/o calling `ByteBuf::retain`:
> {code:java}
> /** {@inheritDoc} */
> @Override
> public void onMessage(ByteBuf buf) {
> asyncContinuationExecutor.execute(() -> {
> try {
> processNextMessage(buf);
> } catch (Throwable t) {
> close(t, false);
> } finally {
> buf.release();
> }
> });
> }
> {code}
> Error:
> {code:java}
> java.sql.SQLException: Unable to close result set.
>   at 
> org.apache.ignite.internal.jdbc.JdbcResultSet.close0(JdbcResultSet.java:296)
>   at 
> org.apache.ignite.internal.jdbc.JdbcStatement.closeResults(JdbcStatement.java:717)
>   at 
> org.apache.ignite.internal.jdbc.JdbcStatement.close(JdbcStatement.java:259)
>   at 
> org.apache.ignite.jdbc.AbstractJdbcSelfTest.tearDownBase(AbstractJdbcSelfTest.java:130)
>   at jdk.internal.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
>   at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>   at 
> org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
>   at 
> org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
>   at 
> org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
>   at 
> org.junit.jupiter.engine.extension.SameThreadTimeoutInvocation.proceed(SameThreadTimeoutInvocation.java:45)
>   at 
> org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
>   at 
> org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:128)
>   at 
> org.junit.jupiter.engine.extension.TimeoutExtension.interceptAfterEachMethod(TimeoutExtension.java:110)
>   at 
> org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
>   at 
> org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
>   at 
> org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
>   at 
> org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
>   at 
> org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
>   at 
> org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
>   at 
> org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
>   at 
> org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
>   at 
> org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeMethodInExtensionContext(ClassBasedTestDescriptor.java:520)
>   at 
> org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$synthesizeAfterEachMethodAdapter$24(ClassBasedTestDescriptor.java:510)
>   at 
> org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAfterEachMethods$10(TestMethodTestDescriptor.java:243)
>   at 
> org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAllAfterMethodsOrCallbacks$13(TestMethodTestDescriptor.java:276)
>   at 
> org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
>   at 
> org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAllAfterMethodsOrCallbacks$14(TestMethodTestDescriptor.java:276)
>   at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
>   at 
> 

[jira] [Updated] (IGNITE-21083) Java thin 3.0: Sporadic IllegalReferenceCountException when reading jdbc messages

2023-12-14 Thread Pavel Tupitsyn (Jira)


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

Pavel Tupitsyn updated IGNITE-21083:

Summary: Java thin 3.0: Sporadic IllegalReferenceCountException when 
reading jdbc messages  (was: Sporadic IllegalReferenceCountException when 
reading jdbc messages.)

> Java thin 3.0: Sporadic IllegalReferenceCountException when reading jdbc 
> messages
> -
>
> Key: IGNITE-21083
> URL: https://issues.apache.org/jira/browse/IGNITE-21083
> Project: Ignite
>  Issue Type: Bug
>  Components: thin client
>Reporter: Maksim Zhuravkov
>Assignee: Pavel Tupitsyn
>Priority: Major
>  Labels: ignite-3
> Fix For: 3.0.0-beta2
>
>
> Some jdbc test fail  with IllegalReferenceCountException refCnt 0 
> (`org.apache.ignite.jdbc.ItJdbcResultSetSelfTest.testFindColumn`).
> This issue maybe caused by the following code in `TcpClientChannel` , because 
> a buffer is sent to another thread w/o calling `ByteBuf::retain`:
> {code:java}
> /** {@inheritDoc} */
> @Override
> public void onMessage(ByteBuf buf) {
> asyncContinuationExecutor.execute(() -> {
> try {
> processNextMessage(buf);
> } catch (Throwable t) {
> close(t, false);
> } finally {
> buf.release();
> }
> });
> }
> {code}
> Error:
> {code:java}
> java.sql.SQLException: Unable to close result set.
>   at 
> org.apache.ignite.internal.jdbc.JdbcResultSet.close0(JdbcResultSet.java:296)
>   at 
> org.apache.ignite.internal.jdbc.JdbcStatement.closeResults(JdbcStatement.java:717)
>   at 
> org.apache.ignite.internal.jdbc.JdbcStatement.close(JdbcStatement.java:259)
>   at 
> org.apache.ignite.jdbc.AbstractJdbcSelfTest.tearDownBase(AbstractJdbcSelfTest.java:130)
>   at jdk.internal.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
>   at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>   at 
> org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
>   at 
> org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
>   at 
> org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
>   at 
> org.junit.jupiter.engine.extension.SameThreadTimeoutInvocation.proceed(SameThreadTimeoutInvocation.java:45)
>   at 
> org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
>   at 
> org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:128)
>   at 
> org.junit.jupiter.engine.extension.TimeoutExtension.interceptAfterEachMethod(TimeoutExtension.java:110)
>   at 
> org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
>   at 
> org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
>   at 
> org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
>   at 
> org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
>   at 
> org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
>   at 
> org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
>   at 
> org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
>   at 
> org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
>   at 
> org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeMethodInExtensionContext(ClassBasedTestDescriptor.java:520)
>   at 
> org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$synthesizeAfterEachMethodAdapter$24(ClassBasedTestDescriptor.java:510)
>   at 
> org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAfterEachMethods$10(TestMethodTestDescriptor.java:243)
>   at 
> org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAllAfterMethodsOrCallbacks$13(TestMethodTestDescriptor.java:276)
>   at 
> org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
>   at 
> org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAllAfterMethodsOrCallbacks$14(TestMethodTestDescriptor.java:276)
>   at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
>   at 
>