[
https://issues.apache.org/jira/browse/KAFKA-4031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15415958#comment-15415958
]
ASF GitHub Bot commented on KAFKA-4031:
---------------------------------------
GitHub user soumyajit-sahu opened a pull request:
https://github.com/apache/kafka/pull/1718
KAFKA-4031: Check if buffer cleaner is null before using it
A small fix to check null before using the reference
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/Microsoft/kafka
nullCheckForDirectBufferCleaner
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/1718.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1718
----
commit d82627e40315c6e655811aa49a31b2e4c7ce2629
Author: Som Sahu <[email protected]>
Date: 2016-08-10T19:13:52Z
Check if buffer cleaner is null before using it
----
> Check DirectBuffer's cleaner to be not null before using
> --------------------------------------------------------
>
> Key: KAFKA-4031
> URL: https://issues.apache.org/jira/browse/KAFKA-4031
> Project: Kafka
> Issue Type: Bug
> Components: core
> Affects Versions: 0.10.0.1
> Reporter: Soumyajit Sahu
> Assignee: Soumyajit Sahu
> Fix For: 0.10.0.2
>
>
> Found the following exception stack in our broker logs.
> The fix should be straight forward with a null check.
> [2016-08-09 17:10:24,451] WARN Error when freeing index buffer
> (kafka.log.OffsetIndex)
> java.lang.NullPointerException
> at
> kafka.log.OffsetIndex.kafka$log$OffsetIndex$$forceUnmap(OffsetIndex.scala:312)
> at kafka.log.OffsetIndex$$anonfun$resize$1.apply(OffsetIndex.scala:294)
> at kafka.log.OffsetIndex$$anonfun$resize$1.apply(OffsetIndex.scala:287)
> at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:231)
> at kafka.log.OffsetIndex.resize(OffsetIndex.scala:287)
> at kafka.log.Log.loadSegments(Log.scala:245)
> at kafka.log.Log.<init>(Log.scala:101)
> at
> kafka.log.LogManager$$anonfun$loadLogs$2$$anonfun$3$$anonfun$apply$10$$anonfun$apply$1.apply$mcV$sp(LogManager.scala:151)
> at kafka.utils.CoreUtils$$anon$1.run(CoreUtils.scala:56)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)