eclipse-vertx / eclipse-vertx/vertx-sql-client

"Needed to have 6 in buffer but only had 0"

オープン
#899 コメント 17 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug help wanted module:db2
主要言語
Java
スター
912
フォーク
214
平均マージ
3日 18時間
マージ済み PR(30日)
4

説明

In the HR test suite I had to disable a test, as seen here:

https://github.com/hibernate/hibernate-reactive/blob/2ff95a963d18c863853f6258490d4ace341eb00c/hibernate-reactive-core/src/test/java/org/hibernate/reactive/OrderedEmbeddableCollectionTest.java#L32

because of an intermittent error that only occurred on DB2 when running the whole test suite (and not the single test).

From the error message it looks like this is something y'all know about already.

ERROR errors [vert.x-eventloop-thread-0] failed to execute statement [select orderedemb0_.id as id1_0_0_, orderedemb0_.title as title2_0_0_ from EAuthor orderedemb0_ where orderedemb0_.id=?]
ERROR errors [vert.x-eventloop-thread-0] could not load an entity: [org.hibernate.reactive.OrderedEmbeddableCollectionTest$Author#1]
java.util.concurrent.CompletionException: java.lang.IllegalStateException: Needed to have 6 in buffer but only had 0. In JDBC we would normally block here but need to find a non-blocking solution
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:331) ~[?:?]
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:346) ~[?:?]
	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:632) ~[?:?]
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[?:?]
	at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088) ~[?:?]
	at org.hibernate.reactive.pool.impl.Handlers.lambda$toCompletionStage$0(Handlers.java:29) ~[main/:?]
	at io.vertx.sqlclient.impl.SqlResultHandler.fail(SqlResultHandler.java:103) ~[vertx-sql-client-3.9.5.jar:3.9.5]
	at io.vertx.sqlclient.impl.SqlResultHandler.handle(SqlResultHandler.java:89) ~[vertx-sql-client-3.9.5.jar:3.9.5]
	at io.vertx.sqlclient.impl.SqlResultHandler.handle(SqlResultHandler.java:33) ~[vertx-sql-client-3.9.5.jar:3.9.5]
	at io.vertx.sqlclient.impl.TransactionImpl.lambda$null$3(TransactionImpl.java:181) ~[vertx-sql-client-3.9.5.jar:3.9.5]
	at io.vertx.sqlclient.impl.TransactionImpl.lambda$rollback$2(TransactionImpl.java:140) ~[vertx-sql-client-3.9.5.jar:3.9.5]
	at io.vertx.sqlclient.impl.SocketConnectionBase.handleMessage(SocketConnectionBase.java:241) ~[vertx-sql-client-3.9.5.jar:3.9.5]
	at io.vertx.sqlclient.impl.SocketConnectionBase.lambda$init$0(SocketConnectionBase.java:88) ~[vertx-sql-client-3.9.5.jar:3.9.5]
	at io.vertx.core.net.impl.NetSocketImpl.lambda$new$2(NetSocketImpl.java:101) ~[vertx-core-3.9.5.jar:3.9.5]
	at io.vertx.core.streams.impl.InboundBuffer.handleEvent(InboundBuffer.java:237) ~[vertx-core-3.9.5.jar:3.9.5]
	at io.vertx.core.streams.impl.InboundBuffer.write(InboundBuffer.java:127) ~[vertx-core-3.9.5.jar:3.9.5]
	at io.vertx.core.net.impl.NetSocketImpl.handleMessage(NetSocketImpl.java:357) ~[vertx-core-3.9.5.jar:3.9.5]
	at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:366) ~[vertx-core-3.9.5.jar:3.9.5]
	at io.vertx.core.impl.EventLoopContext.execute(EventLoopContext.java:43) ~[vertx-core-3.9.5.jar:3.9.5]
	at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:229) ~[vertx-core-3.9.5.jar:3.9.5]
	at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:163) ~[vertx-core-3.9.5.jar:3.9.5]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.49.Final.jar:4.1.49.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.49.Final.jar:4.1.49.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.49.Final.jar:4.1.49.Final]
	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436) ~[netty-transport-4.1.49.Final.jar:4.1.49.Final]
	at io.vertx.db2client.impl.codec.DB2Encoder.lambda$write$0(DB2Encoder.java:72) ~[vertx-db2-client-3.9.5.jar:3.9.5]
	at io.vertx.db2client.impl.codec.DB2Decoder.decodePayload(DB2Decoder.java:97) [vertx-db2-client-3.9.5.jar:3.9.5]
	at io.vertx.db2client.impl.codec.DB2Decoder.decode(DB2Decoder.java:53) [vertx-db2-client-3.9.5.jar:3.9.5]
	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:501) [netty-codec-4.1.49.Final.jar:4.1.49.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:440) [netty-codec-4.1.49.Final.jar:4.1.49.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276) [netty-codec-4.1.49.Final.jar:4.1.49.Final]
	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) [netty-transport-4.1.49.Final.jar:4.1.49.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.49.Final.jar:4.1.49.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.49.Final.jar:4.1.49.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.49.Final.jar:4.1.49.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [netty-transport-4.1.49.Final.jar:4.1.49.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.49.Final.jar:4.1.49.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.49.Final.jar:4.1.49.Final]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [netty-transport-4.1.49.Final.jar:4.1.49.Final]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [netty-transport-4.1.49.Final.jar:4.1.49.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714) [netty-transport-4.1.49.Final.jar:4.1.49.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) [netty-transport-4.1.49.Final.jar:4.1.49.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) [netty-transport-4.1.49.Final.jar:4.1.49.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) [netty-transport-4.1.49.Final.jar:4.1.49.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [netty-common-4.1.49.Final.jar:4.1.49.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.49.Final.jar:4.1.49.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.49.Final.jar:4.1.49.Final]
	at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.IllegalStateException: Needed to have 6 in buffer but only had 0. In JDBC we would normally block here but need to find a non-blocking solution
	at io.vertx.db2client.impl.drda.DRDAResponse.ensureALayerDataInBuffer(DRDAResponse.java:1462) ~[vertx-db2-client-3.9.5.jar:3.9.5]
	at io.vertx.db2client.impl.drda.DRDAResponse.readDssHeader(DRDAResponse.java:878) ~[vertx-db2-client-3.9.5.jar:3.9.5]
	at io.vertx.db2client.impl.drda.DRDAResponse.startSameIdChainParse(DRDAResponse.java:52) ~[vertx-db2-client-3.9.5.jar:3.9.5]
	at io.vertx.db2client.impl.drda.DRDAQueryResponse.readDescribeInput(DRDAQueryResponse.java:81) ~[vertx-db2-client-3.9.5.jar:3.9.5]
	at io.vertx.db2client.impl.drda.DRDAQueryResponse.readPrepareDescribeInputOutput(DRDAQueryResponse.java:53) ~[vertx-db2-client-3.9.5.jar:3.9.5]
	at io.vertx.db2client.impl.codec.PrepareStatementCodec.decodePayload(PrepareStatementCodec.java:76) ~[vertx-db2-client-3.9.5.jar:3.9.5]
	at io.vertx.db2client.impl.codec.DB2Decoder.decodePayload(DB2Decoder.java:80) ~[vertx-db2-client-3.9.5.jar:3.9.5]
	... 21 more

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

参照されている OrderedEmbeddableCollectionTest.java テストから始め、単独で実行した場合と、DB2 に対して Hibernate Reactive の完全なスイートを実行した場合を比較します。スタックトレースにある DRDAResponse.ensureALayerDataInBuffer()、readDssHeader()、PrepareStatementCodec.decodePayload() を通じて失敗を追跡します。断続的に発生するバッファエラーの原因を特定し、DB2 のテスト実行が失敗しないようにできれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java, sql
領域
backend, databases
issue の種類
バグ
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。