New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReadEntryCallback in ReadLedgerEntriesCmd shouldn't release buffer. #1736
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- ReadEntryCallback in ReadLedgerEntriesCmd shouldn't release buffer, which is not owned by the callback.
@ivankelly related to your change 8d048ab |
eolivelli
approved these changes
Oct 4, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch
+1
Please cherry pick to branch-4.8
#shipit
sijie
approved these changes
Oct 5, 2018
run integration tests |
2 similar comments
run integration tests |
run integration tests |
dlg99
approved these changes
Oct 5, 2018
run integration tests |
1 similar comment
run integration tests |
sijie
pushed a commit
that referenced
this pull request
Oct 9, 2018
Descriptions of the changes in this PR: - ReadEntryCallback in ReadLedgerEntriesCmd shouldn't release buffer, which is not owned by the callback. ### Motivation with the following change, Per channel bookie clients owns the buffer for read responses. So it is not correct for ReadEntryCallback in ReadLedgerEntriesCmd to release buffer 8d048ab#diff-e50ee2c1aec1539ea185a94605b0e550R1611 because of this issue I'm seeing following error with ReadLedgerEntriesCmd ``` /Workspace/SFStorage/bookkeeper/bookkeeper-server/bin$ ./bookkeeper shell -localbookie readledger -bookie **** -ledgerid 00000000-0000-0000-0000-000000000003 -firstentryid 1 -lastentryid 3 JAVA_HOME not set, using java from PATH. (/usr/bin/java) --------- Lid=00000000-0000-0000-0000-000000000003, Eid=1 --------- 18:32:03,724 ERROR Unexpected throwable caught io.netty.util.IllegalReferenceCountException: refCnt: 0, increment: 1 at io.netty.buffer.AbstractReferenceCountedByteBuf.release0(AbstractReferenceCountedByteBuf.java:100) ~[netty-all-4.1.22.Final.jar:4.1.22.Final] at io.netty.buffer.AbstractReferenceCountedByteBuf.release(AbstractReferenceCountedByteBuf.java:84) ~[netty-all-4.1.22.Final.jar:4.1.22.Final] at org.apache.bookkeeper.proto.PerChannelBookieClient$ReadCompletion.handleV3Response(PerChannelBookieClient.java:1699) ~[bookkeeper-server-4.7.0-SNAPSHOT.jar:4.7.0-SNAPSHOT] at org.apache.bookkeeper.proto.PerChannelBookieClient$3.safeRun(PerChannelBookieClient.java:1286) ~[bookkeeper-server-4.7.0-SNAPSHOT.jar:4.7.0-SNAPSHOT] at org.apache.bookkeeper.common.util.SafeRunnable.run(SafeRunnable.java:36) [bookkeeper-common-4.7.0-SNAPSHOT.jar:4.7.0-SNAPSHOT] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_172] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_172] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-all-4.1.22.Final.jar:4.1.22.Final] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_172] --------- Lid=00000000-0000-0000-0000-000000000003, Eid=2 --------- 18:32:03,733 ERROR Unexpected throwable caught io.netty.util.IllegalReferenceCountException: refCnt: 0, increment: 1 at io.netty.buffer.AbstractReferenceCountedByteBuf.release0(AbstractReferenceCountedByteBuf.java:100) ~[netty-all-4.1.22.Final.jar:4.1.22.Final] at io.netty.buffer.AbstractReferenceCountedByteBuf.release(AbstractReferenceCountedByteBuf.java:84) ~[netty-all-4.1.22.Final.jar:4.1.22.Final] at org.apache.bookkeeper.proto.PerChannelBookieClient$ReadCompletion.handleV3Response(PerChannelBookieClient.java:1699) ~[bookkeeper-server-4.7.0-SNAPSHOT.jar:4.7.0-SNAPSHOT] at org.apache.bookkeeper.proto.PerChannelBookieClient$3.safeRun(PerChannelBookieClient.java:1286) ~[bookkeeper-server-4.7.0-SNAPSHOT.jar:4.7.0-SNAPSHOT] at org.apache.bookkeeper.common.util.SafeRunnable.run(SafeRunnable.java:36) [bookkeeper-common-4.7.0-SNAPSHOT.jar:4.7.0-SNAPSHOT] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_172] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_172] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-all-4.1.22.Final.jar:4.1.22.Final] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_172] ``` Author: cguttapalem <cguttapalem@salesforce.com> Reviewers: Sijie Guo <sijie@apache.org>, Enrico Olivelli <eolivelli@gmail.com>, Andrey Yegorov <None> This closes #1736 from reddycharan/readledgerfix (cherry picked from commit 5fe5a62) Signed-off-by: Sijie Guo <sijie@apache.org> Signed-off-by: Sijie Guo <sijie@apache.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Descriptions of the changes in this PR:
which is not owned by the callback.
Motivation
with the following change, Per channel bookie clients owns the buffer for read responses. So it is not correct for ReadEntryCallback in ReadLedgerEntriesCmd to release buffer
8d048ab#diff-e50ee2c1aec1539ea185a94605b0e550R1611
because of this issue I'm seeing following error with ReadLedgerEntriesCmd