[ https://issues.apache.org/jira/browse/NIFI-3036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15668367#comment-15668367 ]
ASF GitHub Bot commented on NIFI-3036: -------------------------------------- GitHub user JPercivall opened a pull request: https://github.com/apache/nifi/pull/1229 NIFI-3036 Fixing Kafka unit test failures Thank you for submitting a contribution to Apache NiFi. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [ ] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? - [ ] Is your initial contribution a single, squashed commit? ### For code changes: - [ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder? - [ ] Have you written or updated unit tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly? - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly? - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties? ### For documentation related changes: - [ ] Have you ensured that format looks appropriate for the output in which it is rendered? ### Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. You can merge this pull request into a Git repository by running: $ git pull https://github.com/JPercivall/nifi NIFI-3043 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi/pull/1229.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 #1229 ---- commit c8335b52318b8678cb9789cdd497f0e0b4e4a6bd Author: jpercivall <jperciv...@apache.org> Date: 2016-11-15T21:21:24Z NIFI-3036 Fixing Kafka unit test failures ---- > Resource Claim can violate its "isInUse" assumption causing Null Pointer > Exceptions > ----------------------------------------------------------------------------------- > > Key: NIFI-3036 > URL: https://issues.apache.org/jira/browse/NIFI-3036 > Project: Apache NiFi > Issue Type: Bug > Reporter: Joseph Percivall > Assignee: Mark Payne > Priority: Blocker > Fix For: 1.1.0 > > > I hit a Null Pointer Exception when testing on the lastest master. After > digging I believe the root cause to be the assumption explained here[1] being > violated. > Specifically I was replaying events on a disk that was over the threshold for > not archiving and seeing this[2] stacktrace. So the claimnant count was > increased from 0 when "isWritable" was false causing the ResourceClaim to > still be a key in the "writeableClaimStreams" map but have a value of null. > I have tested on 1.0.0 and was not able to reproduce. > [1] > https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/claim/StandardResourceClaim.java#L142-L142 > [2] 2016-11-14 16:00:19,783 INFO [Flow Service Tasks Thread-2] > o.a.nifi.controller.StandardFlowService Saved flow controller > org.apache.nifi.controller.FlowController@6191c12d // Another save pending = > false > 2016-11-14 16:00:21,016 INFO [StandardProcessScheduler Thread-4] > o.a.n.c.s.TimerDrivenSchedulingAgent Scheduled > GenerateFlowFile[id=01581004-90ba-149c-7ccc-4fe3d2dcfe12] to run with 1 > threads > 2016-11-14 16:00:21,017 ERROR [Timer-Driven Process Thread-8] > o.a.n.p.standard.GenerateFlowFile > GenerateFlowFile[id=01581004-90ba-149c-7ccc-4fe3d2dcfe12] > GenerateFlowFile[id=01581004-90ba-149c-7ccc-4fe3d2dcfe12] failed to process > due to java.lang.NullPointerException; rolling back session: > java.lang.NullPointerException > 2016-11-14 16:00:21,018 ERROR [Timer-Driven Process Thread-8] > o.a.n.p.standard.GenerateFlowFile > java.lang.NullPointerException: null > at > org.apache.nifi.controller.repository.FileSystemRepository$2.write(FileSystemRepository.java:907) > ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT] > at > org.apache.nifi.controller.repository.io.DisableOnCloseOutputStream.write(DisableOnCloseOutputStream.java:49) > ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT] > at > org.apache.nifi.controller.repository.io.ByteCountingOutputStream.write(ByteCountingOutputStream.java:46) > ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT] > at > org.apache.nifi.controller.repository.io.ByteCountingOutputStream.write(ByteCountingOutputStream.java:41) > ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT] > at > org.apache.nifi.controller.repository.io.FlowFileAccessOutputStream.write(FlowFileAccessOutputStream.java:78) > ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT] > at > org.apache.nifi.processors.standard.GenerateFlowFile$1.process(GenerateFlowFile.java:192) > ~[nifi-standard-processors-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT] > at > org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2321) > ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT] > at > org.apache.nifi.processors.standard.GenerateFlowFile.onTrigger(GenerateFlowFile.java:189) > ~[nifi-standard-processors-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT] > at > org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) > ~[nifi-api-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT] > at > org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1089) > [nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT] > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136) > [nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT] > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) > [nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT] > at > org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132) > [nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT] > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > [na:1.8.0_74] > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > [na:1.8.0_74] > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > [na:1.8.0_74] > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > [na:1.8.0_74] > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > [na:1.8.0_74] > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > [na:1.8.0_74] > at java.lang.Thread.run(Thread.java:745) [na:1.8.0_74] > Suppressed: java.lang.NullPointerException: null > at > org.apache.nifi.controller.repository.FileSystemRepository$2.flush(FileSystemRepository.java:923) > ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT] > at > org.apache.nifi.controller.repository.io.DisableOnCloseOutputStream.close(DisableOnCloseOutputStream.java:68) > ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT] > at > org.apache.nifi.controller.repository.io.ByteCountingOutputStream.close(ByteCountingOutputStream.java:61) > ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT] > at > org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2322) > ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT] > ... 13 common frames omitted > Suppressed: java.lang.NullPointerException: null > at > org.apache.nifi.controller.repository.FileSystemRepository$2.flush(FileSystemRepository.java:923) > ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT] > at > org.apache.nifi.controller.repository.io.DisableOnCloseOutputStream.close(DisableOnCloseOutputStream.java:68) > ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT] > at > org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2322) > ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT] > ... 13 common frames omitted -- This message was sent by Atlassian JIRA (v6.3.4#6332)