Ngone51 commented on pull request #30062:
URL: https://github.com/apache/spark/pull/30062#issuecomment-722196568


   > I ran an end-to-end test. One of the bugs was:
   > 
   > ```
   > Caused by: java.lang.IndexOutOfBoundsException
   >     at java.nio.ByteBuffer.wrap(ByteBuffer.java:375)
   >     at 
org.sparkproject.io.netty.buffer.UnpooledHeapByteBuf.nioBuffer(UnpooledHeapByteBuf.java:306)
   >     at 
org.apache.spark.network.protocol.Encoders$Bitmaps.encode(Encoders.java:65)
   >     at 
org.apache.spark.network.shuffle.RemoteBlockPushResolver$AppShufflePartitionInfo.writeChunkTracker(RemoteBlockPushResolver.java:871)
   >     at 
org.apache.spark.network.shuffle.RemoteBlockPushResolver$AppShufflePartitionInfo.updateChunkInfo(RemoteBlockPushResolver.java:845)
   >     at 
org.apache.spark.network.shuffle.RemoteBlockPushResolver$PushBlockStreamCallback.onComplete(RemoteBlockPushResolver.java:653)
   >     at 
org.apache.spark.network.server.TransportRequestHandler$3.onComplete(TransportRequestHandler.java:230)
   > ```
   > 
   > Fix this by adding `buf.ensureWritable(encodedLength)` in 
`Encoders.Bitmaps.encode`.
   
   Why would the error happen? Does it mean we calculate the wrong message 
length when allocating the buffer somewhere?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to