You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2017/11/11 00:46:34 UTC

[GitHub] sijie opened a new issue #716: PendingAddOp accessed a released ByteBuf

sijie opened a new issue #716: PendingAddOp accessed a released ByteBuf
URL: https://github.com/apache/bookkeeper/issues/716
 
 
   
   
   **BUG REPORT**
   
   1. Please describe the issue you observed:
   
   - What did you do?
   
   run `BookKeeperApiTest`
   
   - What did you expect to see?
   
   I would like to see all the tests pass and no exceptions in the log
   
   - What did you see instead?
   
   I saw tons of NullPointerExceptions as below. The problem is we attempt to release the send buffer once it is ready for callback. However this is not correct, because the callback can return when using a small `AckQuorumSize`. This won't be a correctness, and most likely won't show up in a real environment. but we still need to address it. 
   
   ```
   2017-11-10 16:38:49,144 - ERROR - [Builder-OrderedSafeExecutor-1-0:SafeRunnable@38] - Unexpected throwable caught 
   java.lang.NullPointerException
   	at org.apache.bookkeeper.util.DoubleByteBuf.readableBytes(DoubleByteBuf.java:125)
   	at io.netty.buffer.Unpooled.copiedBuffer(Unpooled.java:433)
   	at org.apache.bookkeeper.client.MockBookKeeperTestCase.extractEntryPayload(MockBookKeeperTestCase.java:386)
   	at org.apache.bookkeeper.client.MockBookKeeperTestCase.lambda$setupBookieClientAddEntry$8(MockBookKeeperTestCase.java:410)
   	at org.mockito.internal.stubbing.StubbedInvocationMatcher.answer(StubbedInvocationMatcher.java:35)
   	at org.mockito.internal.handler.MockHandlerImpl.handle(MockHandlerImpl.java:95)
   	at org.mockito.internal.handler.NullResultGuardian.handle(NullResultGuardian.java:32)
   	at org.mockito.internal.handler.InvocationNotifierHandler.handle(InvocationNotifierHandler.java:36)
   	at org.mockito.internal.creation.bytebuddy.MockMethodInterceptor.doIntercept(MockMethodInterceptor.java:57)
   	at org.mockito.internal.creation.bytebuddy.MockMethodInterceptor.doIntercept(MockMethodInterceptor.java:43)
   	at org.mockito.internal.creation.bytebuddy.MockMethodInterceptor$DispatcherDefaultingToRealMethod.interceptSuperCallable(MockMethodInterceptor.java:119)
   	at org.apache.bookkeeper.proto.BookieClient$MockitoMock$1300928847.addEntry(Unknown Source)
   	at org.apache.bookkeeper.client.PendingAddOp.sendWriteRequest(PendingAddOp.java:129)
   	at org.apache.bookkeeper.client.PendingAddOp.safeRun(PendingAddOp.java:242)
   	at org.apache.bookkeeper.common.util.SafeRunnable.run(SafeRunnable.java:36)
   	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
   	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at java.lang.Thread.run(Thread.java:748)
   ```
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services