[ https://issues.apache.org/jira/browse/GEODE-10196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17531773#comment-17531773 ]
Geode Integration commented on GEODE-10196: ------------------------------------------- Seen in [distributed-test-openjdk17 #7|https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-develop-main/jobs/distributed-test-openjdk17/builds/7] ... see [test results|http://files.apachegeode-ci.info/builds/apache-develop-main/1.15.0-build.1145/test-results/distributedTest/1651629968/] or download [artifacts|http://files.apachegeode-ci.info/builds/apache-develop-main/1.15.0-build.1145/test-artifacts/1651629968/distributedtestfiles-openjdk17-1.15.0-build.1145.tgz]. > Multiple geode-for-redis DUnitTests fail to ignore expected exceptions on JDK > 17 > -------------------------------------------------------------------------------- > > Key: GEODE-10196 > URL: https://issues.apache.org/jira/browse/GEODE-10196 > Project: Geode > Issue Type: Improvement > Components: tests > Affects Versions: 1.15.0 > Reporter: Dale Emery > Assignee: Darrel Schneider > Priority: Major > Labels: Java17, pull-request-available > Fix For: 1.15.0 > > > The {{HashesAndCrashesDUnitTest.executeUntilSuccess()}} method (called by all > of the test in the class) expects exceptions with the message "Connection > reset by peer", logs them, and retries the operation. > > The source of the exception is {{{}SocketChannel.read(){}}}. On JDK 17, the > exception message is "Connection reset". This is not the expected message, > and so {{executeUntilSuccess()}} rethrows it instead of ignoring it, causing > the test to fail. > > Incidentally, the type of the exception on JDK 17 {{{}SocketException{}}}, > but on JDK 8 and 11 is {{{}IOException{}}}. This does not affect the test, > which inspects only the exception message, not the type. > > On JDK 17, the stack trace of the exception is: > {noformat} > io.lettuce.core.RedisException: java.net.SocketException: Connection reset > at io.lettuce.core.internal.Exceptions.bubble(Exceptions.java:83) > at io.lettuce.core.internal.Futures.awaitOrCancel(Futures.java:250) > at > io.lettuce.core.cluster.ClusterFutureSyncInvocationHandler.handleInvocation(ClusterFutureSyncInvocationHandler.java:130) > at > io.lettuce.core.internal.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:80) > at jdk.proxy3/jdk.proxy3.$Proxy53.set(Unknown Source) > at > org.apache.geode.redis.internal.commands.executor.hash.HashesAndCrashesDUnitTest.lambda$setPerformAndVerify$14(HashesAndCrashesDUnitTest.java:257) > at > org.apache.geode.redis.internal.commands.executor.hash.HashesAndCrashesDUnitTest.executeUntilSuccess(HashesAndCrashesDUnitTest.java:274) > at > org.apache.geode.redis.internal.commands.executor.hash.HashesAndCrashesDUnitTest.setPerformAndVerify(HashesAndCrashesDUnitTest.java:257) > at > org.apache.geode.redis.internal.commands.executor.hash.HashesAndCrashesDUnitTest.lambda$modifyDataWhileCrashingVMs$11(HashesAndCrashesDUnitTest.java:161) > at > java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) > at > java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) > at > java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) > at java.base/java.lang.Thread.run(Thread.java:833) > Caused by: java.net.SocketException: Connection reset > at > java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:394) > at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:426) > at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:258) > at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132) > at > io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350) > at > io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151) > at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722) > at > io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658) > at > io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584) > at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496) > at > io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) > at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) > at > io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) > ... 1 more > {noformat} > > On JDK 11, the stack trace of the exception is: > {noformat} > io.lettuce.core.RedisException: java.io.IOException: Connection reset by peer > at io.lettuce.core.internal.Exceptions.bubble(Exceptions.java:83) > at io.lettuce.core.internal.Futures.awaitOrCancel(Futures.java:250) > at > io.lettuce.core.cluster.ClusterFutureSyncInvocationHandler.handleInvocation(ClusterFutureSyncInvocationHandler.java:130) > at > io.lettuce.core.internal.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:80) > at com.sun.proxy.$Proxy52.set(Unknown Source) > at > org.apache.geode.redis.internal.commands.executor.hash.HashesAndCrashesDUnitTest.lambda$setPerformAndVerify$14(HashesAndCrashesDUnitTest.java:257) > at > org.apache.geode.redis.internal.commands.executor.hash.HashesAndCrashesDUnitTest.executeUntilSuccess(HashesAndCrashesDUnitTest.java:274) > at > org.apache.geode.redis.internal.commands.executor.hash.HashesAndCrashesDUnitTest.setPerformAndVerify(HashesAndCrashesDUnitTest.java:257) > at > org.apache.geode.redis.internal.commands.executor.hash.HashesAndCrashesDUnitTest.lambda$modifyDataWhileCrashingVMs$8(HashesAndCrashesDUnitTest.java:158) > at > java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736) > at > java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) > at > java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) > at java.base/java.lang.Thread.run(Thread.java:829) > Caused by: java.io.IOException: Connection reset by peer > at java.base/sun.nio.ch.FileDispatcherImpl.read0(Native Method) > at java.base/sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) > at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:276) > at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:233) > at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:223) > at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:356) > at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:258) > at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132) > at > io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350) > at > io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151) > at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722) > at > io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658) > at > io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584) > at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496) > at > io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) > at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) > at > io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) > ... 1 more > {noformat} > -- This message was sent by Atlassian Jira (v8.20.7#820007)