You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2022/07/01 19:51:40 UTC
[GitHub] [hbase] bbeaudreault opened a new pull request, #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
bbeaudreault opened a new pull request, #4592:
URL: https://github.com/apache/hbase/pull/4592
First commit fixes the leak and adds a test.
Second commit adds ResourceLeakDetector to RefCnt. It's already added at the netty layer, and is expected to be low overhead. One can disable it (along with at the netty layer) by setting `-Dorg.apache.hbase.thirdparty.io.netty.leakDetection.level=DISABLED`. I don't really have time to do any specific perf tests right now, and it was not trivial to wrap it in our own configuration. If we want to do that, I'll just revert that commit so we can get the leak plugged for now.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1172785941
:broken_heart: **-1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 41s | Docker mode activated. |
| -0 :warning: | yetus | 0m 2s | Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck |
||| _ Prechecks _ |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 15s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 2m 52s | master passed |
| +1 :green_heart: | compile | 0m 59s | master passed |
| +1 :green_heart: | shadedjars | 4m 3s | branch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 39s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 12s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 2m 38s | the patch passed |
| +1 :green_heart: | compile | 0m 57s | the patch passed |
| +1 :green_heart: | javac | 0m 57s | the patch passed |
| +1 :green_heart: | shadedjars | 4m 0s | patch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 40s | the patch passed |
||| _ Other Tests _ |
| -1 :x: | unit | 1m 7s | hbase-common in the patch failed. |
| -1 :x: | unit | 195m 29s | hbase-server in the patch failed. |
| | | 216m 3s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | javac javadoc unit shadedjars compile |
| uname | Linux 4d266fe50ef7 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-11.0.10+9 |
| unit | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/1/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-common.txt |
| unit | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/1/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt |
| Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/1/testReport/ |
| Max. process+thread count | 2432 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/1/console |
| versions | git=2.17.1 maven=3.6.3 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] virajjasani commented on a diff in pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
virajjasani commented on code in PR #4592:
URL: https://github.com/apache/hbase/pull/4592#discussion_r912418398
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/RefCnt.java:
##########
@@ -31,7 +34,10 @@
@InterfaceAudience.Private
public class RefCnt extends AbstractReferenceCounted {
- private Recycler recycler = ByteBuffAllocator.NONE;
+ private static final ResourceLeakDetector<RefCnt> detector =
Review Comment:
Yeah makes sense, no need for separate config if same can be used for both netty and hbase together.
When I tried ADVANCED leak detection in HBASE-26708, I hardly got any useful hints, here is [the comment](https://issues.apache.org/jira/browse/HBASE-26708?focusedCommentId=17482669&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17482669).
One question: have you also increased `org.apache.hbase.thirdparty.io.netty.leakDetection.targetRecords` limit while debugging the whole issue?
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] virajjasani commented on a diff in pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
virajjasani commented on code in PR #4592:
URL: https://github.com/apache/hbase/pull/4592#discussion_r912317398
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/RefCnt.java:
##########
@@ -31,7 +34,10 @@
@InterfaceAudience.Private
public class RefCnt extends AbstractReferenceCounted {
- private Recycler recycler = ByteBuffAllocator.NONE;
+ private static final ResourceLeakDetector<RefCnt> detector =
Review Comment:
Looks like this is to be taken up by HBASE-27173 and not on this PR?
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] bbeaudreault commented on a diff in pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
bbeaudreault commented on code in PR #4592:
URL: https://github.com/apache/hbase/pull/4592#discussion_r912419848
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/RefCnt.java:
##########
@@ -31,7 +34,10 @@
@InterfaceAudience.Private
public class RefCnt extends AbstractReferenceCounted {
- private Recycler recycler = ByteBuffAllocator.NONE;
+ private static final ResourceLeakDetector<RefCnt> detector =
Review Comment:
Yea, I upped it to like 6500. I also added a bunch of `touch("hint")` calls everywhere. It slowed down the region server a lot, but it was a test cluster so manageable. Not sure how much flexibility you have for something like that, maybe in the SASL layer.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1172925692
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 1m 20s | Docker mode activated. |
| -0 :warning: | yetus | 0m 3s | Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck |
||| _ Prechecks _ |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 12s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 2m 31s | master passed |
| +1 :green_heart: | compile | 0m 57s | master passed |
| +1 :green_heart: | shadedjars | 3m 45s | branch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 42s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 14s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 2m 19s | the patch passed |
| +1 :green_heart: | compile | 0m 55s | the patch passed |
| +1 :green_heart: | javac | 0m 55s | the patch passed |
| +1 :green_heart: | shadedjars | 3m 41s | patch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 41s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | unit | 1m 38s | hbase-common in the patch passed. |
| +1 :green_heart: | unit | 219m 3s | hbase-server in the patch passed. |
| | | 239m 52s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/4/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | javac javadoc unit shadedjars compile |
| uname | Linux 5dd81423d6c2 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-1.8.0_282-b08 |
| Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/4/testReport/ |
| Max. process+thread count | 2839 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/4/console |
| versions | git=2.17.1 maven=3.6.3 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1172931891
:broken_heart: **-1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 42s | Docker mode activated. |
| -0 :warning: | yetus | 0m 2s | Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck |
||| _ Prechecks _ |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 10s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 3m 36s | master passed |
| +1 :green_heart: | compile | 1m 26s | master passed |
| +1 :green_heart: | shadedjars | 4m 16s | branch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 49s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 10s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 3m 34s | the patch passed |
| +1 :green_heart: | compile | 1m 20s | the patch passed |
| +1 :green_heart: | javac | 1m 20s | the patch passed |
| +1 :green_heart: | shadedjars | 4m 17s | patch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 1m 5s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | unit | 2m 25s | hbase-common in the patch passed. |
| -1 :x: | unit | 18m 7s | hbase-server in the patch failed. |
| | | 43m 16s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/5/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | javac javadoc unit shadedjars compile |
| uname | Linux ee143a4cd832 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-11.0.10+9 |
| unit | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/5/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt |
| Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/5/testReport/ |
| Max. process+thread count | 651 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/5/console |
| versions | git=2.17.1 maven=3.6.3 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] virajjasani commented on a diff in pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
virajjasani commented on code in PR #4592:
URL: https://github.com/apache/hbase/pull/4592#discussion_r912425998
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/RefCnt.java:
##########
@@ -31,7 +34,10 @@
@InterfaceAudience.Private
public class RefCnt extends AbstractReferenceCounted {
- private Recycler recycler = ByteBuffAllocator.NONE;
+ private static final ResourceLeakDetector<RefCnt> detector =
Review Comment:
Anyways, I am +1 for this PR, great work indeed :)
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache9 commented on a diff in pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache9 commented on code in PR #4592:
URL: https://github.com/apache/hbase/pull/4592#discussion_r912489386
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java:
##########
@@ -1997,23 +2015,31 @@ static String toStringHeader(ByteBuff buf) throws IOException {
+ onDiskDataSizeWithHeader;
}
- private static HFileBlockBuilder createBuilder(HFileBlock blk) {
+ /**
+ * Creates a new HFileBlockBuilder from the existing block and a new ByteBuff. The builder will be
+ * loaded with all of the original fields from blk, except now using the newBuff and setting
+ * isSharedMem based on the source of the passed in newBuff. An existing HFileBlock may have been
+ * an {@link ExclusiveMemHFileBlock}, but the new buffer might call for a
+ * {@link SharedMemHFileBlock}. Or vice versa.
+ * @param blk the block to clone from
+ * @param newBuff the new buffer to use
+ */
+ private static HFileBlockBuilder createBuilder(HFileBlock blk, ByteBuff newBuff) {
Review Comment:
OK, so here is the trick.
In the old code, we will just reuse the ByteBuff when unpacking, and then call allocateBuffer to copy the content to a new buffer, and then decompress it.
And the problem is that, for the old implementation of this method, we will always use the same isSharedMem, but actually, we may allocate off heap byte buff for the unpacked HFileBlock, while the packed HFileBlock is on heap.
Good.
##########
hbase-common/src/test/java/org/apache/hadoop/hbase/io/TestByteBuffAllocator.java:
##########
@@ -21,6 +21,7 @@
import static org.apache.hadoop.hbase.io.ByteBuffAllocator.getHeapAllocationRatio;
Review Comment:
You can call InternalLoggerFactory.setDefaultFactory to inject a customized InternalLogger which will be used in netty.
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java:
##########
@@ -1997,23 +2015,31 @@ static String toStringHeader(ByteBuff buf) throws IOException {
+ onDiskDataSizeWithHeader;
}
- private static HFileBlockBuilder createBuilder(HFileBlock blk) {
+ /**
+ * Creates a new HFileBlockBuilder from the existing block and a new ByteBuff. The builder will be
+ * loaded with all of the original fields from blk, except now using the newBuff and setting
+ * isSharedMem based on the source of the passed in newBuff. An existing HFileBlock may have been
+ * an {@link ExclusiveMemHFileBlock}, but the new buffer might call for a
+ * {@link SharedMemHFileBlock}. Or vice versa.
+ * @param blk the block to clone from
+ * @param newBuff the new buffer to use
+ */
+ private static HFileBlockBuilder createBuilder(HFileBlock blk, ByteBuff newBuff) {
return new HFileBlockBuilder().withBlockType(blk.blockType)
.withOnDiskSizeWithoutHeader(blk.onDiskSizeWithoutHeader)
.withUncompressedSizeWithoutHeader(blk.uncompressedSizeWithoutHeader)
- .withPrevBlockOffset(blk.prevBlockOffset).withByteBuff(blk.buf.duplicate()) // Duplicate the
- // buffer.
- .withOffset(blk.offset).withOnDiskDataSizeWithHeader(blk.onDiskDataSizeWithHeader)
+ .withPrevBlockOffset(blk.prevBlockOffset).withByteBuff(newBuff).withOffset(blk.offset)
+ .withOnDiskDataSizeWithHeader(blk.onDiskDataSizeWithHeader)
.withNextBlockOnDiskSize(blk.nextBlockOnDiskSize).withHFileContext(blk.fileContext)
- .withByteBuffAllocator(blk.allocator).withShared(blk.isSharedMem());
+ .withByteBuffAllocator(blk.allocator).withShared(!newBuff.hasArray());
}
- static HFileBlock shallowClone(HFileBlock blk) {
- return createBuilder(blk).build();
+ static HFileBlock shallowClone(HFileBlock blk, ByteBuff newBuf) {
+ return createBuilder(blk, newBuf).build();
}
static HFileBlock deepCloneOnHeap(HFileBlock blk) {
ByteBuff deepCloned = ByteBuff.wrap(ByteBuffer.wrap(blk.buf.toBytes(0, blk.buf.limit())));
- return createBuilder(blk).withByteBuff(deepCloned).withShared(false).build();
+ return createBuilder(blk, deepCloned).withShared(false).build();
Review Comment:
Looking at the code, SharedMem is always off heap and ExclusiveMem is always on heap? Then I do not think we need to call withShard here? The createBuilder method will set it for us.
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/io/ByteBuffAllocator.java:
##########
@@ -319,11 +319,20 @@ public ByteBuff allocate(int size) {
// just allocate the ByteBuffer from on-heap.
bbs.add(allocateOnHeap(remain));
}
- ByteBuff bb = ByteBuff.wrap(bbs, () -> {
- for (int i = 0; i < lenFromReservoir; i++) {
- this.putbackBuffer(bbs.get(i));
- }
- });
+
+ ByteBuff bb;
+ // we only need a recycler if we successfully pulled from the pool
+ // this matters for determining whether to add leak detection in RefCnt
+ if (lenFromReservoir == 0) {
Review Comment:
Good. Looking at the code, this could save some CPU cycles when releasing...
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java:
##########
@@ -1997,23 +2015,31 @@ static String toStringHeader(ByteBuff buf) throws IOException {
+ onDiskDataSizeWithHeader;
}
- private static HFileBlockBuilder createBuilder(HFileBlock blk) {
+ /**
+ * Creates a new HFileBlockBuilder from the existing block and a new ByteBuff. The builder will be
+ * loaded with all of the original fields from blk, except now using the newBuff and setting
+ * isSharedMem based on the source of the passed in newBuff. An existing HFileBlock may have been
+ * an {@link ExclusiveMemHFileBlock}, but the new buffer might call for a
+ * {@link SharedMemHFileBlock}. Or vice versa.
+ * @param blk the block to clone from
+ * @param newBuff the new buffer to use
+ */
+ private static HFileBlockBuilder createBuilder(HFileBlock blk, ByteBuff newBuff) {
return new HFileBlockBuilder().withBlockType(blk.blockType)
.withOnDiskSizeWithoutHeader(blk.onDiskSizeWithoutHeader)
.withUncompressedSizeWithoutHeader(blk.uncompressedSizeWithoutHeader)
- .withPrevBlockOffset(blk.prevBlockOffset).withByteBuff(blk.buf.duplicate()) // Duplicate the
- // buffer.
- .withOffset(blk.offset).withOnDiskDataSizeWithHeader(blk.onDiskDataSizeWithHeader)
+ .withPrevBlockOffset(blk.prevBlockOffset).withByteBuff(newBuff).withOffset(blk.offset)
+ .withOnDiskDataSizeWithHeader(blk.onDiskDataSizeWithHeader)
.withNextBlockOnDiskSize(blk.nextBlockOnDiskSize).withHFileContext(blk.fileContext)
- .withByteBuffAllocator(blk.allocator).withShared(blk.isSharedMem());
+ .withByteBuffAllocator(blk.allocator).withShared(!newBuff.hasArray());
}
- static HFileBlock shallowClone(HFileBlock blk) {
- return createBuilder(blk).build();
+ static HFileBlock shallowClone(HFileBlock blk, ByteBuff newBuf) {
Review Comment:
Since it is only called in unpack method, let's make it private?
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/ByteBuff.java:
##########
@@ -547,6 +547,27 @@ public static ByteBuff wrap(ByteBuffer buffer) {
return wrap(buffer, RefCnt.create());
}
+ /**
+ * Calling this method in strategic locations where ByteBuffs are referenced may help diagnose
+ * potential buffer leaks. We pass the buffer itself as a default hint, but one can use
+ * {@link #touch(Object)} to pass their own hint as well.
+ */
+ @Override
+ public ByteBuff touch() {
+ return touch(this);
+ }
+
+ @Override
+ public ByteBuff touch(Object hint) {
+ refCnt.touch(hint);
+ return this;
+ }
+
+ // Visible for testing
+ public RefCnt getRefCnt() {
Review Comment:
Better add a RestrictedApi to disable usage in code other than tests.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1172876162
:broken_heart: **-1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 51s | Docker mode activated. |
| -0 :warning: | yetus | 0m 2s | Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck |
||| _ Prechecks _ |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 11s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 3m 38s | master passed |
| +1 :green_heart: | compile | 1m 21s | master passed |
| +1 :green_heart: | shadedjars | 4m 18s | branch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 52s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 11s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 3m 31s | the patch passed |
| +1 :green_heart: | compile | 1m 18s | the patch passed |
| +1 :green_heart: | javac | 1m 18s | the patch passed |
| +1 :green_heart: | shadedjars | 4m 26s | patch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 54s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | unit | 2m 41s | hbase-common in the patch passed. |
| -1 :x: | unit | 278m 38s | hbase-server in the patch failed. |
| | | 305m 6s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/3/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | javac javadoc unit shadedjars compile |
| uname | Linux 4bf53044e106 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-11.0.10+9 |
| unit | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/3/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt |
| Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/3/testReport/ |
| Max. process+thread count | 2642 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/3/console |
| versions | git=2.17.1 maven=3.6.3 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1173169140
:broken_heart: **-1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 34s | Docker mode activated. |
| -0 :warning: | yetus | 0m 3s | Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck |
||| _ Prechecks _ |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 22s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 3m 11s | master passed |
| +1 :green_heart: | compile | 1m 3s | master passed |
| +1 :green_heart: | shadedjars | 4m 23s | branch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 40s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 12s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 3m 0s | the patch passed |
| +1 :green_heart: | compile | 1m 14s | the patch passed |
| +1 :green_heart: | javac | 1m 14s | the patch passed |
| -1 :x: | shadedjars | 0m 54s | patch has 10 errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 47s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | unit | 1m 54s | hbase-common in the patch passed. |
| -1 :x: | unit | 293m 17s | hbase-server in the patch failed. |
| | | 313m 6s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/6/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | javac javadoc unit shadedjars compile |
| uname | Linux 45f5d1c7f124 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-1.8.0_282-b08 |
| shadedjars | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/6/artifact/yetus-jdk8-hadoop3-check/output/patch-shadedjars.txt |
| unit | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/6/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt |
| Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/6/testReport/ |
| Max. process+thread count | 2567 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/6/console |
| versions | git=2.17.1 maven=3.6.3 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] bbeaudreault commented on a diff in pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
bbeaudreault commented on code in PR #4592:
URL: https://github.com/apache/hbase/pull/4592#discussion_r912226622
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/HBaseReferenceCounted.java:
##########
@@ -40,7 +40,7 @@ default boolean release(int increment) {
@Override
default HBaseReferenceCounted touch() {
- throw new UnsupportedOperationException();
+ return touch(null);
Review Comment:
this change just makes it 1 step easier to enable this for other subclasses, since they could just override `touch(Object hint)` below and get both. It's functionally equivalent to today, since both throw an exception at present.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1172790474
:broken_heart: **-1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 2m 41s | Docker mode activated. |
| -0 :warning: | yetus | 0m 3s | Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck |
||| _ Prechecks _ |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 9s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 2m 17s | master passed |
| +1 :green_heart: | compile | 0m 56s | master passed |
| +1 :green_heart: | shadedjars | 3m 41s | branch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 42s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 13s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 2m 11s | the patch passed |
| +1 :green_heart: | compile | 0m 56s | the patch passed |
| +1 :green_heart: | javac | 0m 56s | the patch passed |
| +1 :green_heart: | shadedjars | 3m 40s | patch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 40s | the patch passed |
||| _ Other Tests _ |
| -1 :x: | unit | 0m 53s | hbase-common in the patch failed. |
| -1 :x: | unit | 215m 21s | hbase-server in the patch failed. |
| | | 236m 34s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | javac javadoc unit shadedjars compile |
| uname | Linux 2c8ea8539259 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-1.8.0_282-b08 |
| unit | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/1/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-common.txt |
| unit | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/1/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt |
| Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/1/testReport/ |
| Max. process+thread count | 2323 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/1/console |
| versions | git=2.17.1 maven=3.6.3 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1172877380
:broken_heart: **-1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 50s | Docker mode activated. |
| -0 :warning: | yetus | 0m 2s | Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck |
||| _ Prechecks _ |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 9s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 3m 17s | master passed |
| +1 :green_heart: | compile | 1m 6s | master passed |
| +1 :green_heart: | shadedjars | 4m 20s | branch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 38s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 12s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 3m 6s | the patch passed |
| +1 :green_heart: | compile | 1m 11s | the patch passed |
| +1 :green_heart: | javac | 1m 11s | the patch passed |
| +1 :green_heart: | shadedjars | 4m 22s | patch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 41s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | unit | 1m 41s | hbase-common in the patch passed. |
| -1 :x: | unit | 292m 0s | hbase-server in the patch failed. |
| | | 315m 36s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/3/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | javac javadoc unit shadedjars compile |
| uname | Linux e335fc7b09c0 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-1.8.0_282-b08 |
| unit | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/3/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt |
| Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/3/testReport/ |
| Max. process+thread count | 2456 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/3/console |
| versions | git=2.17.1 maven=3.6.3 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] apurtell commented on a diff in pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
apurtell commented on code in PR #4592:
URL: https://github.com/apache/hbase/pull/4592#discussion_r912268139
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/RefCnt.java:
##########
@@ -31,7 +34,10 @@
@InterfaceAudience.Private
public class RefCnt extends AbstractReferenceCounted {
- private Recycler recycler = ByteBuffAllocator.NONE;
+ private static final ResourceLeakDetector<RefCnt> detector =
Review Comment:
... and we get a single global control over this and netty itself via `-Dorg.apache.hbase.thirdparty.io.netty.leakDetection.level` . All good here. We do not need our own (private copy of netty's) resource leak detector.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1174444817
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 25s | Docker mode activated. |
| -0 :warning: | yetus | 0m 3s | Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck |
||| _ Prechecks _ |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 12s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 2m 33s | master passed |
| +1 :green_heart: | compile | 1m 2s | master passed |
| +1 :green_heart: | shadedjars | 3m 41s | branch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 41s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 13s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 2m 34s | the patch passed |
| +1 :green_heart: | compile | 1m 3s | the patch passed |
| +1 :green_heart: | javac | 1m 3s | the patch passed |
| +1 :green_heart: | shadedjars | 3m 41s | patch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 42s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | unit | 1m 50s | hbase-common in the patch passed. |
| +1 :green_heart: | unit | 197m 38s | hbase-server in the patch passed. |
| | | 217m 46s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/8/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | javac javadoc unit shadedjars compile |
| uname | Linux 866a31a8f48d 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-11.0.10+9 |
| Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/8/testReport/ |
| Max. process+thread count | 3069 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/8/console |
| versions | git=2.17.1 maven=3.6.3 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] bbeaudreault commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
bbeaudreault commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1173111233
@Apache9 I've addressed your feedback.
I also added a new TestByteBuffAllocatorLeakDetection. I think it seems pretty brittle, but it worked locally. I am not sure this test is worth it, because I anticipate it being a potential flake in the future and also having unintended consequences due to changing the InternalLogger. But wanted you guys to have something to look at.
Let me know if that looks good to merge as is, or if you'd prefer I remove the new test. Or if any other comments.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] bbeaudreault merged pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
bbeaudreault merged PR #4592:
URL: https://github.com/apache/hbase/pull/4592
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1173210619
:broken_heart: **-1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 46s | Docker mode activated. |
| -0 :warning: | yetus | 0m 3s | Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck |
||| _ Prechecks _ |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 13s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 2m 23s | master passed |
| +1 :green_heart: | compile | 0m 48s | master passed |
| +1 :green_heart: | shadedjars | 3m 58s | branch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 36s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 11s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 2m 12s | the patch passed |
| +1 :green_heart: | compile | 0m 49s | the patch passed |
| +1 :green_heart: | javac | 0m 49s | the patch passed |
| +1 :green_heart: | shadedjars | 3m 57s | patch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 34s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | unit | 1m 25s | hbase-common in the patch passed. |
| -1 :x: | unit | 206m 58s | hbase-server in the patch failed. |
| | | 226m 29s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/7/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | javac javadoc unit shadedjars compile |
| uname | Linux 7f1b2bfd4e63 5.4.0-1071-aws #76~18.04.1-Ubuntu SMP Mon Mar 28 17:49:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-1.8.0_282-b08 |
| unit | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/7/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt |
| Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/7/testReport/ |
| Max. process+thread count | 2587 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/7/console |
| versions | git=2.17.1 maven=3.6.3 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1172698403
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 21s | Docker mode activated. |
||| _ Prechecks _ |
| +1 :green_heart: | dupname | 0m 0s | No case conflicting files found. |
| +1 :green_heart: | hbaseanti | 0m 0s | Patch does not have any anti-patterns. |
| +1 :green_heart: | @author | 0m 0s | The patch does not contain any @author tags. |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 15s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 2m 28s | master passed |
| +1 :green_heart: | compile | 2m 51s | master passed |
| +1 :green_heart: | checkstyle | 0m 45s | master passed |
| +1 :green_heart: | spotless | 0m 45s | branch has no errors when running spotless:check. |
| +1 :green_heart: | spotbugs | 1m 48s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 11s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 2m 7s | the patch passed |
| +1 :green_heart: | compile | 2m 45s | the patch passed |
| +1 :green_heart: | javac | 2m 45s | the patch passed |
| +1 :green_heart: | checkstyle | 0m 44s | the patch passed |
| +1 :green_heart: | whitespace | 0m 0s | The patch has no whitespace issues. |
| +1 :green_heart: | hadoopcheck | 11m 35s | Patch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1. |
| +1 :green_heart: | spotless | 0m 41s | patch has no errors when running spotless:check. |
| +1 :green_heart: | spotbugs | 1m 54s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | asflicense | 0m 21s | The patch does not generate ASF License warnings. |
| | | 34m 50s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/1/artifact/yetus-general-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile |
| uname | Linux 1a1fd592eddc 5.4.0-96-generic #109-Ubuntu SMP Wed Jan 12 16:49:16 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-1.8.0_282-b08 |
| Max. process+thread count | 64 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/1/console |
| versions | git=2.17.1 maven=3.6.3 spotbugs=4.2.2 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] apurtell commented on a diff in pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
apurtell commented on code in PR #4592:
URL: https://github.com/apache/hbase/pull/4592#discussion_r912268139
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/RefCnt.java:
##########
@@ -31,7 +34,10 @@
@InterfaceAudience.Private
public class RefCnt extends AbstractReferenceCounted {
- private Recycler recycler = ByteBuffAllocator.NONE;
+ private static final ResourceLeakDetector<RefCnt> detector =
Review Comment:
... and we get a single global control over this and netty itself via `-Dorg.apache.hbase.thirdparty.io.netty.leakDetection.level` . All good here.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1172896938
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 42s | Docker mode activated. |
||| _ Prechecks _ |
| +1 :green_heart: | dupname | 0m 0s | No case conflicting files found. |
| +1 :green_heart: | hbaseanti | 0m 0s | Patch does not have any anti-patterns. |
| +1 :green_heart: | @author | 0m 0s | The patch does not contain any @author tags. |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 13s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 2m 22s | master passed |
| +1 :green_heart: | compile | 2m 45s | master passed |
| +1 :green_heart: | checkstyle | 0m 40s | master passed |
| +1 :green_heart: | spotless | 0m 42s | branch has no errors when running spotless:check. |
| +1 :green_heart: | spotbugs | 1m 42s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 11s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 2m 8s | the patch passed |
| +1 :green_heart: | compile | 2m 44s | the patch passed |
| +1 :green_heart: | javac | 2m 44s | the patch passed |
| +1 :green_heart: | checkstyle | 0m 38s | the patch passed |
| +1 :green_heart: | whitespace | 0m 0s | The patch has no whitespace issues. |
| +1 :green_heart: | hadoopcheck | 11m 57s | Patch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1. |
| +1 :green_heart: | spotless | 0m 39s | patch has no errors when running spotless:check. |
| +1 :green_heart: | spotbugs | 1m 48s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | asflicense | 0m 15s | The patch does not generate ASF License warnings. |
| | | 34m 55s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/4/artifact/yetus-general-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile |
| uname | Linux 599de6fe4297 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-1.8.0_282-b08 |
| Max. process+thread count | 69 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/4/console |
| versions | git=2.17.1 maven=3.6.3 spotbugs=4.2.2 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] bbeaudreault commented on a diff in pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
bbeaudreault commented on code in PR #4592:
URL: https://github.com/apache/hbase/pull/4592#discussion_r912359926
##########
hbase-common/src/test/java/org/apache/hadoop/hbase/io/TestByteBuffAllocator.java:
##########
@@ -21,6 +21,7 @@
import static org.apache.hadoop.hbase.io.ByteBuffAllocator.getHeapAllocationRatio;
Review Comment:
Not a bad idea. I took a look and unfortunately netty's ResourceLeakDetector doesn't really give us a way to hook into the detection in a way that we could test. Maybe there's a way to intercept log4j logs? If you have an easy idea for that, would be happy to try it.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1172922939
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 25s | Docker mode activated. |
| -0 :warning: | yetus | 0m 2s | Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck |
||| _ Prechecks _ |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 16s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 2m 44s | master passed |
| +1 :green_heart: | compile | 1m 3s | master passed |
| +1 :green_heart: | shadedjars | 3m 42s | branch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 43s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 14s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 2m 31s | the patch passed |
| +1 :green_heart: | compile | 1m 4s | the patch passed |
| +1 :green_heart: | javac | 1m 4s | the patch passed |
| +1 :green_heart: | shadedjars | 3m 42s | patch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 42s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | unit | 1m 50s | hbase-common in the patch passed. |
| +1 :green_heart: | unit | 198m 5s | hbase-server in the patch passed. |
| | | 218m 48s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/4/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | javac javadoc unit shadedjars compile |
| uname | Linux 7b69db5ae8e0 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-11.0.10+9 |
| Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/4/testReport/ |
| Max. process+thread count | 3139 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/4/console |
| versions | git=2.17.1 maven=3.6.3 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] apurtell commented on a diff in pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
apurtell commented on code in PR #4592:
URL: https://github.com/apache/hbase/pull/4592#discussion_r912267146
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlockUnpack.java:
##########
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.io.hfile;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.Random;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FSDataInputStream;
+import org.apache.hadoop.fs.FSDataOutputStream;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.HBaseClassTestRule;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.HBaseTestingUtil;
+import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.fs.HFileSystem;
+import org.apache.hadoop.hbase.io.ByteBuffAllocator;
+import org.apache.hadoop.hbase.io.FSDataInputStreamWrapper;
+import org.apache.hadoop.hbase.io.compress.Compression;
+import org.apache.hadoop.hbase.testclassification.IOTests;
+import org.apache.hadoop.hbase.testclassification.MediumTests;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TestName;
+
+@Category({ IOTests.class, MediumTests.class })
+public class TestHFileBlockUnpack {
+
+ @ClassRule
+ public static final HBaseClassTestRule CLASS_RULE =
+ HBaseClassTestRule.forClass(TestHFileBlockUnpack.class);
+
+ private static final HBaseTestingUtil TEST_UTIL = new HBaseTestingUtil();
+
+ // repetition gives us some chance to get a good compression ratio
+ private static float CHANCE_TO_REPEAT = 0.6f;
+
+ private static final int MIN_ALLOCATION_SIZE = 10 * 1024;
+
+ ByteBuffAllocator allocator;
+
+ @Rule
+ public TestName name = new TestName();
+ private FileSystem fs;
+
+ @Before
+ public void setUp() throws Exception {
+ fs = HFileSystem.get(TEST_UTIL.getConfiguration());
+ Configuration conf = HBaseConfiguration.create(TEST_UTIL.getConfiguration());
+ conf.setInt(ByteBuffAllocator.MIN_ALLOCATE_SIZE_KEY, MIN_ALLOCATION_SIZE);
+ allocator = ByteBuffAllocator.create(conf, true);
+
+ }
+
+ /**
+ * If the block on disk size is less than {@link ByteBuffAllocator}'s min allocation size, that
+ * block will be allocated to heap regardless of desire for off-heap. After de-compressing the
+ * block, the new size may now exceed the min allocation size. This test ensures that those
+ * de-compressed blocks, which will be allocated off-heap, are properly marked as
+ * {@link HFileBlock#isSharedMem()} == true See https://issues.apache.org/jira/browse/HBASE-27170
+ */
+ @Test
Review Comment:
Nice test, thank you
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/RefCnt.java:
##########
@@ -31,7 +34,10 @@
@InterfaceAudience.Private
public class RefCnt extends AbstractReferenceCounted {
- private Recycler recycler = ByteBuffAllocator.NONE;
+ private static final ResourceLeakDetector<RefCnt> detector =
Review Comment:
I suppose it is not worth importing the ResourceLeakDetector code. How likely would netty change it? Pretty unlikely, I'd think. And we already use so many other netty types directly... Just thinking out loud.
##########
hbase-common/src/test/java/org/apache/hadoop/hbase/io/TestByteBuffAllocator.java:
##########
@@ -21,6 +21,7 @@
import static org.apache.hadoop.hbase.io.ByteBuffAllocator.getHeapAllocationRatio;
Review Comment:
Would you consider a new unit here that confirms leak detection works, by leaking deliberately?
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1172800320
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 40s | Docker mode activated. |
||| _ Prechecks _ |
| +1 :green_heart: | dupname | 0m 0s | No case conflicting files found. |
| +1 :green_heart: | hbaseanti | 0m 0s | Patch does not have any anti-patterns. |
| +1 :green_heart: | @author | 0m 0s | The patch does not contain any @author tags. |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 12s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 2m 20s | master passed |
| +1 :green_heart: | compile | 2m 42s | master passed |
| +1 :green_heart: | checkstyle | 0m 38s | master passed |
| +1 :green_heart: | spotless | 0m 42s | branch has no errors when running spotless:check. |
| +1 :green_heart: | spotbugs | 1m 36s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 10s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 2m 3s | the patch passed |
| +1 :green_heart: | compile | 2m 38s | the patch passed |
| +1 :green_heart: | javac | 2m 38s | the patch passed |
| +1 :green_heart: | checkstyle | 0m 37s | the patch passed |
| +1 :green_heart: | whitespace | 0m 0s | The patch has no whitespace issues. |
| +1 :green_heart: | hadoopcheck | 11m 41s | Patch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1. |
| +1 :green_heart: | spotless | 0m 39s | patch has no errors when running spotless:check. |
| +1 :green_heart: | spotbugs | 1m 47s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | asflicense | 0m 15s | The patch does not generate ASF License warnings. |
| | | 34m 19s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/2/artifact/yetus-general-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile |
| uname | Linux f56c117e78d9 5.4.0-1071-aws #76~18.04.1-Ubuntu SMP Mon Mar 28 17:49:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-1.8.0_282-b08 |
| Max. process+thread count | 64 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/2/console |
| versions | git=2.17.1 maven=3.6.3 spotbugs=4.2.2 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1173208041
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 26s | Docker mode activated. |
| -0 :warning: | yetus | 0m 2s | Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck |
||| _ Prechecks _ |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 10s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 2m 30s | master passed |
| +1 :green_heart: | compile | 1m 3s | master passed |
| +1 :green_heart: | shadedjars | 3m 41s | branch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 42s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 13s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 2m 32s | the patch passed |
| +1 :green_heart: | compile | 1m 3s | the patch passed |
| +1 :green_heart: | javac | 1m 3s | the patch passed |
| +1 :green_heart: | shadedjars | 3m 41s | patch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 42s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | unit | 1m 48s | hbase-common in the patch passed. |
| +1 :green_heart: | unit | 198m 7s | hbase-server in the patch passed. |
| | | 218m 5s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/7/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | javac javadoc unit shadedjars compile |
| uname | Linux 38b546545a55 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-11.0.10+9 |
| Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/7/testReport/ |
| Max. process+thread count | 3314 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/7/console |
| versions | git=2.17.1 maven=3.6.3 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] bbeaudreault commented on a diff in pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
bbeaudreault commented on code in PR #4592:
URL: https://github.com/apache/hbase/pull/4592#discussion_r912228264
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java:
##########
@@ -643,20 +660,21 @@ HFileBlock unpack(HFileContext fileContext, FSReader reader) throws IOException
* Always allocates a new buffer of the correct size. Copies header bytes from the existing
* buffer. Does not change header fields. Reserve room to keep checksum bytes too.
*/
- private void allocateBuffer() {
+ private ByteBuff allocateBufferForUnpacking() {
Review Comment:
This method used to be called after creating a new block, and creating the new block did a `buf.duplicate()` in createBuilder. Now we call this method _before_ creating the new block, so we call buf.duplicate() below instead. Same operations as before, just a different order so that we can examine the resulting newBuf in creating the new block.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1172837057
:broken_heart: **-1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 47s | Docker mode activated. |
| -0 :warning: | yetus | 0m 2s | Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck |
||| _ Prechecks _ |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 14s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 3m 46s | master passed |
| +1 :green_heart: | compile | 1m 19s | master passed |
| +1 :green_heart: | shadedjars | 4m 17s | branch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 51s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 11s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 3m 33s | the patch passed |
| +1 :green_heart: | compile | 1m 21s | the patch passed |
| +1 :green_heart: | javac | 1m 21s | the patch passed |
| +1 :green_heart: | shadedjars | 4m 23s | patch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 59s | the patch passed |
||| _ Other Tests _ |
| -1 :x: | unit | 1m 53s | hbase-common in the patch failed. |
| -1 :x: | unit | 276m 33s | hbase-server in the patch failed. |
| | | 302m 20s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | javac javadoc unit shadedjars compile |
| uname | Linux 44901984e2d0 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-11.0.10+9 |
| unit | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/2/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-common.txt |
| unit | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/2/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt |
| Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/2/testReport/ |
| Max. process+thread count | 3063 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/2/console |
| versions | git=2.17.1 maven=3.6.3 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1172930544
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 37s | Docker mode activated. |
||| _ Prechecks _ |
| +1 :green_heart: | dupname | 0m 0s | No case conflicting files found. |
| +1 :green_heart: | hbaseanti | 0m 0s | Patch does not have any anti-patterns. |
| +1 :green_heart: | @author | 0m 0s | The patch does not contain any @author tags. |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 9s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 2m 3s | master passed |
| +1 :green_heart: | compile | 2m 45s | master passed |
| +1 :green_heart: | checkstyle | 0m 38s | master passed |
| +1 :green_heart: | spotless | 0m 39s | branch has no errors when running spotless:check. |
| +1 :green_heart: | spotbugs | 1m 36s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 10s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 2m 8s | the patch passed |
| +1 :green_heart: | compile | 2m 45s | the patch passed |
| +1 :green_heart: | javac | 2m 45s | the patch passed |
| +1 :green_heart: | checkstyle | 0m 38s | the patch passed |
| +1 :green_heart: | whitespace | 0m 0s | The patch has no whitespace issues. |
| +1 :green_heart: | hadoopcheck | 11m 40s | Patch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1. |
| +1 :green_heart: | spotless | 0m 40s | patch has no errors when running spotless:check. |
| +1 :green_heart: | spotbugs | 1m 50s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | asflicense | 0m 14s | The patch does not generate ASF License warnings. |
| | | 34m 3s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/5/artifact/yetus-general-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile |
| uname | Linux 7c4b73161d83 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-1.8.0_282-b08 |
| Max. process+thread count | 64 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/5/console |
| versions | git=2.17.1 maven=3.6.3 spotbugs=4.2.2 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1172957197
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 42s | Docker mode activated. |
| -0 :warning: | yetus | 0m 2s | Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck |
||| _ Prechecks _ |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 17s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 3m 32s | master passed |
| +1 :green_heart: | compile | 1m 16s | master passed |
| +1 :green_heart: | shadedjars | 4m 16s | branch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 48s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 11s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 3m 14s | the patch passed |
| +1 :green_heart: | compile | 1m 4s | the patch passed |
| +1 :green_heart: | javac | 1m 4s | the patch passed |
| +1 :green_heart: | shadedjars | 4m 23s | patch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 39s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | unit | 1m 55s | hbase-common in the patch passed. |
| +1 :green_heart: | unit | 212m 7s | hbase-server in the patch passed. |
| | | 236m 12s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/5/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | javac javadoc unit shadedjars compile |
| uname | Linux 2fa0271a4d8f 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-1.8.0_282-b08 |
| Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/5/testReport/ |
| Max. process+thread count | 2704 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/5/console |
| versions | git=2.17.1 maven=3.6.3 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache9 commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache9 commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1173075861
Thanks for the detailed explaination. Looks reasonable. I wonder which commit in the history broke this...
Anyway, please give me sometime to go through the code again. The off heap reference counting is a very critical part in HBase, it may impact performance a lot with only a very little change.
I promise I will report back soon. And please kick me if I do not report back within 2 days...
Thanks @bbeaudreault for the great analysis and fix.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1173128324
:broken_heart: **-1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 45s | Docker mode activated. |
||| _ Prechecks _ |
| +1 :green_heart: | dupname | 0m 0s | No case conflicting files found. |
| +1 :green_heart: | hbaseanti | 0m 0s | Patch does not have any anti-patterns. |
| +1 :green_heart: | @author | 0m 0s | The patch does not contain any @author tags. |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 23s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 2m 4s | master passed |
| +1 :green_heart: | compile | 2m 41s | master passed |
| +1 :green_heart: | checkstyle | 0m 37s | master passed |
| +1 :green_heart: | spotless | 0m 39s | branch has no errors when running spotless:check. |
| +1 :green_heart: | spotbugs | 1m 35s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 10s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 2m 9s | the patch passed |
| +1 :green_heart: | compile | 2m 40s | the patch passed |
| -0 :warning: | javac | 0m 29s | hbase-common generated 1 new + 151 unchanged - 0 fixed = 152 total (was 151) |
| -0 :warning: | checkstyle | 0m 10s | hbase-common: The patch generated 1 new + 2 unchanged - 0 fixed = 3 total (was 2) |
| +1 :green_heart: | whitespace | 0m 0s | The patch has no whitespace issues. |
| +1 :green_heart: | hadoopcheck | 11m 37s | Patch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1. |
| -1 :x: | spotless | 0m 8s | patch has 34 errors when running spotless:check, run spotless:apply to fix. |
| +1 :green_heart: | spotbugs | 1m 52s | the patch passed |
||| _ Other Tests _ |
| -1 :x: | asflicense | 0m 14s | The patch generated 1 ASF License warnings. |
| | | 33m 22s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/6/artifact/yetus-general-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile |
| uname | Linux a642b88a43bf 5.4.0-1071-aws #76~18.04.1-Ubuntu SMP Mon Mar 28 17:49:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-1.8.0_282-b08 |
| javac | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/6/artifact/yetus-general-check/output/diff-compile-javac-hbase-common.txt |
| checkstyle | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/6/artifact/yetus-general-check/output/diff-checkstyle-hbase-common.txt |
| spotless | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/6/artifact/yetus-general-check/output/patch-spotless.txt |
| asflicense | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/6/artifact/yetus-general-check/output/patch-asflicense-problems.txt |
| Max. process+thread count | 64 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/6/console |
| versions | git=2.17.1 maven=3.6.3 spotbugs=4.2.2 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1172838344
:broken_heart: **-1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 46s | Docker mode activated. |
| -0 :warning: | yetus | 0m 2s | Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck |
||| _ Prechecks _ |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 13s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 3m 23s | master passed |
| +1 :green_heart: | compile | 1m 4s | master passed |
| +1 :green_heart: | shadedjars | 4m 23s | branch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 42s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 12s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 3m 7s | the patch passed |
| +1 :green_heart: | compile | 1m 7s | the patch passed |
| +1 :green_heart: | javac | 1m 7s | the patch passed |
| +1 :green_heart: | shadedjars | 4m 31s | patch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 40s | the patch passed |
||| _ Other Tests _ |
| -1 :x: | unit | 1m 1s | hbase-common in the patch failed. |
| -1 :x: | unit | 291m 12s | hbase-server in the patch failed. |
| | | 314m 32s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | javac javadoc unit shadedjars compile |
| uname | Linux cfa44fc8fba8 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-1.8.0_282-b08 |
| unit | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/2/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-common.txt |
| unit | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/2/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt |
| Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/2/testReport/ |
| Max. process+thread count | 2508 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/2/console |
| versions | git=2.17.1 maven=3.6.3 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] bbeaudreault commented on a diff in pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
bbeaudreault commented on code in PR #4592:
URL: https://github.com/apache/hbase/pull/4592#discussion_r912359658
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/RefCnt.java:
##########
@@ -31,7 +34,10 @@
@InterfaceAudience.Private
public class RefCnt extends AbstractReferenceCounted {
- private Recycler recycler = ByteBuffAllocator.NONE;
+ private static final ResourceLeakDetector<RefCnt> detector =
Review Comment:
I wrote up that issue before Andrew asked to add here. I'm happy to just close that issue if this lands here. Looks like this can land here easily, so will just close that one once this PR is merged.
@virajjasani I think Andrew's comment here was asking if we should copy the source code of ResourceLeakDetector into the hbase repo, to avoid having upstream changes break the leak detection for us. But I could be wrong.
Personally I don't think it's worth copying it in -- Looks like it's been around in netty for years and has been mostly stable, there was one minor improvement to it recently. I'd rather only copy it in if we have a reason to, like if we notice that they break it for us in later release. Maybe that's too reactionary though.
I'm happy to go with consensus here, but if we decide to copy it in I think we should maybe push this work to HBASE-27173 instead.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] bbeaudreault commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
bbeaudreault commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1172893530
Test failures look unrelated and could not be reproduced locally. Kicked off a re-run.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] virajjasani commented on a diff in pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
virajjasani commented on code in PR #4592:
URL: https://github.com/apache/hbase/pull/4592#discussion_r912425974
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/RefCnt.java:
##########
@@ -31,7 +34,10 @@
@InterfaceAudience.Private
public class RefCnt extends AbstractReferenceCounted {
- private Recycler recycler = ByteBuffAllocator.NONE;
+ private static final ResourceLeakDetector<RefCnt> detector =
Review Comment:
> Not sure how much flexibility you have for something like that, maybe in the SASL layer.
Yeah that's becoming more problematic only because of SASL layer. I upped target records to 100 and all the leak detected were only coming from Netty's EpollEventLoop. I even tried switching to `NioEventLoopGroup` but no luck, the leaks started coming from `NioEventLoop`.
Anyways, I am also going through Netty's code, not 100% confirmed but it seems these leak messages would appear all the time when `newDirectBuffer()` is called so it's pretty weird and I am not sure whether this leak is a real leak. How come the call to initialize new direct buffer always "indicates leak" is something worth digging.
It's like this:
```
@Override
protected ByteBuf newDirectBuffer(int initialCapacity, int maxCapacity) {
PoolThreadCache cache = threadCache.get();
PoolArena<ByteBuffer> directArena = cache.directArena;
final ByteBuf buf;
if (directArena != null) {
buf = directArena.allocate(cache, initialCapacity, maxCapacity);
} else {
buf = PlatformDependent.hasUnsafe() ?
UnsafeByteBufUtil.newUnsafeDirectByteBuf(this, initialCapacity, maxCapacity) :
new UnpooledDirectByteBuf(this, initialCapacity, maxCapacity);
}
return toLeakAwareBuffer(buf);
}
```
And `toLeakAwareBuffer()` would report the leak for all the calls made to create new direct buffer 🤷
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1173167769
:broken_heart: **-1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 33s | Docker mode activated. |
| -0 :warning: | yetus | 0m 3s | Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck |
||| _ Prechecks _ |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 16s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 3m 53s | master passed |
| +1 :green_heart: | compile | 1m 20s | master passed |
| +1 :green_heart: | shadedjars | 4m 13s | branch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 58s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 13s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 3m 28s | the patch passed |
| +1 :green_heart: | compile | 1m 20s | the patch passed |
| +1 :green_heart: | javac | 1m 20s | the patch passed |
| -1 :x: | shadedjars | 1m 26s | patch has 10 errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 51s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | unit | 2m 48s | hbase-common in the patch passed. |
| -1 :x: | unit | 279m 40s | hbase-server in the patch failed. |
| | | 302m 54s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/6/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | javac javadoc unit shadedjars compile |
| uname | Linux 9eee23a63e55 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-11.0.10+9 |
| shadedjars | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/6/artifact/yetus-jdk11-hadoop3-check/output/patch-shadedjars.txt |
| unit | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/6/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt |
| Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/6/testReport/ |
| Max. process+thread count | 3028 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/6/console |
| versions | git=2.17.1 maven=3.6.3 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1174200750
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 37s | Docker mode activated. |
||| _ Prechecks _ |
| +1 :green_heart: | dupname | 0m 0s | No case conflicting files found. |
| +1 :green_heart: | hbaseanti | 0m 0s | Patch does not have any anti-patterns. |
| +1 :green_heart: | @author | 0m 0s | The patch does not contain any @author tags. |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 25s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 2m 10s | master passed |
| +1 :green_heart: | compile | 2m 45s | master passed |
| +1 :green_heart: | checkstyle | 0m 37s | master passed |
| +1 :green_heart: | spotless | 0m 40s | branch has no errors when running spotless:check. |
| +1 :green_heart: | spotbugs | 1m 36s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 10s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 2m 11s | the patch passed |
| +1 :green_heart: | compile | 2m 43s | the patch passed |
| +1 :green_heart: | javac | 2m 43s | the patch passed |
| +1 :green_heart: | checkstyle | 0m 38s | the patch passed |
| +1 :green_heart: | whitespace | 0m 0s | The patch has no whitespace issues. |
| +1 :green_heart: | hadoopcheck | 11m 48s | Patch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1. |
| +1 :green_heart: | spotless | 0m 39s | patch has no errors when running spotless:check. |
| +1 :green_heart: | spotbugs | 1m 50s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | asflicense | 0m 14s | The patch does not generate ASF License warnings. |
| | | 34m 16s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/8/artifact/yetus-general-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile |
| uname | Linux d8b40876bced 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-1.8.0_282-b08 |
| Max. process+thread count | 64 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/8/console |
| versions | git=2.17.1 maven=3.6.3 spotbugs=4.2.2 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1174445720
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 48s | Docker mode activated. |
| -0 :warning: | yetus | 0m 2s | Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck |
||| _ Prechecks _ |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 24s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 2m 4s | master passed |
| +1 :green_heart: | compile | 0m 48s | master passed |
| +1 :green_heart: | shadedjars | 3m 54s | branch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 35s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 11s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 2m 10s | the patch passed |
| +1 :green_heart: | compile | 0m 48s | the patch passed |
| +1 :green_heart: | javac | 0m 48s | the patch passed |
| +1 :green_heart: | shadedjars | 3m 54s | patch has no errors when building our shaded downstream artifacts. |
| +1 :green_heart: | javadoc | 0m 33s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | unit | 1m 24s | hbase-common in the patch passed. |
| +1 :green_heart: | unit | 202m 29s | hbase-server in the patch passed. |
| | | 221m 24s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/8/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | javac javadoc unit shadedjars compile |
| uname | Linux 0e2a2ae73244 5.4.0-1071-aws #76~18.04.1-Ubuntu SMP Mon Mar 28 17:49:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-1.8.0_282-b08 |
| Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/8/testReport/ |
| Max. process+thread count | 3948 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/8/console |
| versions | git=2.17.1 maven=3.6.3 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] virajjasani commented on a diff in pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
virajjasani commented on code in PR #4592:
URL: https://github.com/apache/hbase/pull/4592#discussion_r912317003
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/RefCnt.java:
##########
@@ -31,7 +34,10 @@
@InterfaceAudience.Private
public class RefCnt extends AbstractReferenceCounted {
- private Recycler recycler = ByteBuffAllocator.NONE;
+ private static final ResourceLeakDetector<RefCnt> detector =
Review Comment:
On the other hand, I am wondering if by having our private copy of `ResourceLeakDetector` was the only way by which @bbeaudreault was able to detect the leak while decompressing blocks.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] virajjasani commented on a diff in pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
virajjasani commented on code in PR #4592:
URL: https://github.com/apache/hbase/pull/4592#discussion_r912403859
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/RefCnt.java:
##########
@@ -31,7 +34,10 @@
@InterfaceAudience.Private
public class RefCnt extends AbstractReferenceCounted {
- private Recycler recycler = ByteBuffAllocator.NONE;
+ private static final ResourceLeakDetector<RefCnt> detector =
Review Comment:
> I think Andrew's comment here was asking if we should copy the source code of ResourceLeakDetector into the hbase repo, to avoid having upstream changes break the leak detection for us. But I could be wrong.
Ah, I see.
> Personally I don't think it's worth copying it in -- Looks like it's been around in netty for years and has been mostly stable, there was one minor improvement to it recently. I'd rather only copy it in if we have a reason to, like if we notice that they break it for us in later release. Maybe that's too reactionary though.
Fair enough.
> I wrote up that issue before Andrew asked to add here. I'm happy to just close that issue if this lands here. Looks like this can land here easily, so will just close that one once this PR is merged.
+1 for landing this change here.
> I could wrap it in a special `hbase.server.allocator.leakDetection.enabled` config
If this lands here, you would also like to consider this one right?
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] bbeaudreault commented on a diff in pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
bbeaudreault commented on code in PR #4592:
URL: https://github.com/apache/hbase/pull/4592#discussion_r912404097
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/RefCnt.java:
##########
@@ -31,7 +34,10 @@
@InterfaceAudience.Private
public class RefCnt extends AbstractReferenceCounted {
- private Recycler recycler = ByteBuffAllocator.NONE;
+ private static final ResourceLeakDetector<RefCnt> detector =
Review Comment:
Yea, though I wonder if it makes sense to leave as-is since it will be confusing to have 2 configs for the same feature. To Andrew's point above, this is already controlled via `-Dorg.apache.hbase.thirdparty.io.netty.leakDetection.level` (which also control's netty's own leak detection).
Thoughts?
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] virajjasani commented on a diff in pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
virajjasani commented on code in PR #4592:
URL: https://github.com/apache/hbase/pull/4592#discussion_r912425974
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/RefCnt.java:
##########
@@ -31,7 +34,10 @@
@InterfaceAudience.Private
public class RefCnt extends AbstractReferenceCounted {
- private Recycler recycler = ByteBuffAllocator.NONE;
+ private static final ResourceLeakDetector<RefCnt> detector =
Review Comment:
> Not sure how much flexibility you have for something like that, maybe in the SASL layer.
Yeah that's becoming more problematic only because of SASL layer. I upped target records to 100 and all the leak detected were only coming from Netty's EpollEventLoop. I even tried switching to `NioEventLoopGroup` but no luck, the leaks started coming from `NioEventLoop`.
Anyways, I am also going through Netty's code, not 100% confirmed but it seems these leak messages would appear all the time when `newDirectBuffer()` is called so it's pretty weird and I am not sure whether this leak is even leak or just a message that would appear regardless of the leak.
It's like this:
```
@Override
protected ByteBuf newDirectBuffer(int initialCapacity, int maxCapacity) {
PoolThreadCache cache = threadCache.get();
PoolArena<ByteBuffer> directArena = cache.directArena;
final ByteBuf buf;
if (directArena != null) {
buf = directArena.allocate(cache, initialCapacity, maxCapacity);
} else {
buf = PlatformDependent.hasUnsafe() ?
UnsafeByteBufUtil.newUnsafeDirectByteBuf(this, initialCapacity, maxCapacity) :
new UnpooledDirectByteBuf(this, initialCapacity, maxCapacity);
}
return toLeakAwareBuffer(buf);
}
```
And `toLeakAwareBuffer()` would report the leak for all the calls made to create new direct buffer 🤷
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] bbeaudreault commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
bbeaudreault commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1173084084
No problem @Apache9 , thanks for taking a look. I will say that my change in HFileBlock is actually the same operations, just in a different order (allocate buffer, then clone, rather than clone then allocate). So then the only functional change is `withShared(!newBuf.hasArray())` rather than `withShared(blk.isSharedMem())`.
Of course the leak detection may affect performance, but I might recommend running with leakDetection.level=DISABLED in production, in which case there should be no overhead.
Hope that helps, let me know if you have any thoughts or questions when you take a look.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1172841773
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 40s | Docker mode activated. |
||| _ Prechecks _ |
| +1 :green_heart: | dupname | 0m 0s | No case conflicting files found. |
| +1 :green_heart: | hbaseanti | 0m 0s | Patch does not have any anti-patterns. |
| +1 :green_heart: | @author | 0m 0s | The patch does not contain any @author tags. |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 10s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 2m 3s | master passed |
| +1 :green_heart: | compile | 2m 39s | master passed |
| +1 :green_heart: | checkstyle | 0m 37s | master passed |
| +1 :green_heart: | spotless | 0m 39s | branch has no errors when running spotless:check. |
| +1 :green_heart: | spotbugs | 1m 34s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 10s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 2m 6s | the patch passed |
| +1 :green_heart: | compile | 2m 38s | the patch passed |
| +1 :green_heart: | javac | 2m 38s | the patch passed |
| +1 :green_heart: | checkstyle | 0m 38s | the patch passed |
| +1 :green_heart: | whitespace | 0m 0s | The patch has no whitespace issues. |
| +1 :green_heart: | hadoopcheck | 11m 39s | Patch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1. |
| +1 :green_heart: | spotless | 0m 38s | patch has no errors when running spotless:check. |
| +1 :green_heart: | spotbugs | 1m 48s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | asflicense | 0m 14s | The patch does not generate ASF License warnings. |
| | | 33m 31s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/3/artifact/yetus-general-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile |
| uname | Linux 47bb764e5e4d 5.4.0-1071-aws #76~18.04.1-Ubuntu SMP Mon Mar 28 17:49:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-1.8.0_282-b08 |
| Max. process+thread count | 64 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/3/console |
| versions | git=2.17.1 maven=3.6.3 spotbugs=4.2.2 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] bbeaudreault commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
bbeaudreault commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1173060059
@Apache9 here is the relevant passage for root cause:
The issue occurs when reading a compressed block which is smaller but close to the size of ByteBuffAllocator's minSizeForReservoirUse.:
- We will pass intoHeap = false to fsBlockReader.readBlockData, because the block is DATA or ENCODED_DATA. As such we will use ByteBuffAllocator.
However, the block size is less than minSizeForReservoirUse, so ByteBuffAllocator will allocate an on-heap buffer (hasArray() == true)
- The hasArray() value will determine whether to return an ExclusiveMemHFileBlock or SharedMemHFileBlock, in this case ExclusiveMemHFileBlock.
- In HFileBlock.unpack, we will shallowClone the block, which will result in a new ExclusiveMemHFileBlock and pass along the same ByteBuffAllocator used before.
- Next we call allocateBuffer, which will use the uncompressed size of the block. This new block size will be larger than minSizeForReservoirUse, so will be allocated off-heap
- We'll call release() on the original block, which is a no-op because it was an ExclusiveMemHFileBlock
- We'll return the unpacked block all the way up to our HFileReaderImpl/StoreFileScanner/etc
- All of those upper level classes seem to properly close resources, either when the scanner is closed or when shipped() is called.
- **Unfortunately since it's an ExclusiveMemHFileBlock (which overloads release() to be a no-op), but backed by a DirectByteBuffer, that buffer will never properly be released back to the pool. Instead it will be GC'd, resulting in the leak.**
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache9 commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache9 commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1173054595
So the actual leak is in HFileBlock? WHat is the root cause? Skimmed the jira description, it is not very clear to me...
Thanks.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] apurtell commented on a diff in pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
apurtell commented on code in PR #4592:
URL: https://github.com/apache/hbase/pull/4592#discussion_r912268139
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/RefCnt.java:
##########
@@ -31,7 +34,10 @@
@InterfaceAudience.Private
public class RefCnt extends AbstractReferenceCounted {
- private Recycler recycler = ByteBuffAllocator.NONE;
+ private static final ResourceLeakDetector<RefCnt> detector =
Review Comment:
... and we get a single global control over this and netty itself via `-Dorg.apache.hbase.thirdparty.io.netty.leakDetection.level` . All good here. Our own (private copy of netty's) resource leak detector is not desirable.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hbase] Apache-HBase commented on pull request #4592: HBASE-27170 ByteBuffAllocator leak when decompressing blocks near minSizeForReservoirUse
Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on PR #4592:
URL: https://github.com/apache/hbase/pull/4592#issuecomment-1173174373
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| +0 :ok: | reexec | 0m 41s | Docker mode activated. |
||| _ Prechecks _ |
| +1 :green_heart: | dupname | 0m 0s | No case conflicting files found. |
| +1 :green_heart: | hbaseanti | 0m 0s | Patch does not have any anti-patterns. |
| +1 :green_heart: | @author | 0m 0s | The patch does not contain any @author tags. |
||| _ master Compile Tests _ |
| +0 :ok: | mvndep | 0m 24s | Maven dependency ordering for branch |
| +1 :green_heart: | mvninstall | 2m 10s | master passed |
| +1 :green_heart: | compile | 2m 44s | master passed |
| +1 :green_heart: | checkstyle | 0m 37s | master passed |
| +1 :green_heart: | spotless | 0m 40s | branch has no errors when running spotless:check. |
| +1 :green_heart: | spotbugs | 1m 37s | master passed |
||| _ Patch Compile Tests _ |
| +0 :ok: | mvndep | 0m 10s | Maven dependency ordering for patch |
| +1 :green_heart: | mvninstall | 2m 10s | the patch passed |
| +1 :green_heart: | compile | 2m 43s | the patch passed |
| -0 :warning: | javac | 0m 29s | hbase-common generated 1 new + 151 unchanged - 0 fixed = 152 total (was 151) |
| +1 :green_heart: | checkstyle | 0m 38s | the patch passed |
| +1 :green_heart: | whitespace | 0m 0s | The patch has no whitespace issues. |
| +1 :green_heart: | hadoopcheck | 11m 47s | Patch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1. |
| +1 :green_heart: | spotless | 0m 41s | patch has no errors when running spotless:check. |
| +1 :green_heart: | spotbugs | 1m 49s | the patch passed |
||| _ Other Tests _ |
| +1 :green_heart: | asflicense | 0m 14s | The patch does not generate ASF License warnings. |
| | | 34m 20s | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/7/artifact/yetus-general-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/4592 |
| Optional Tests | dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile |
| uname | Linux abb354d8ecc3 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 724bf7837a |
| Default Java | AdoptOpenJDK-1.8.0_282-b08 |
| javac | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/7/artifact/yetus-general-check/output/diff-compile-javac-hbase-common.txt |
| Max. process+thread count | 64 (vs. ulimit of 30000) |
| modules | C: hbase-common hbase-server U: . |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4592/7/console |
| versions | git=2.17.1 maven=3.6.3 spotbugs=4.2.2 |
| Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
This message was automatically generated.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org