[
https://issues.apache.org/jira/browse/NIFI-888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14708112#comment-14708112
]
Mark Payne commented on NIFI-888:
---------------------------------
[~jackowaya]: So looking through the patch, it looks really good for the most
part. Just a couple of minor points of feedback:
* It looks like there are a lot of places where you wrapped lines at a small
width (looks like probably 80 chars). The nifi codebase generally wraps lines
at 200 characters. Not a huge deal, though.
* I added two in-line comments in github: there's a place with two embedded
try-with-resources that I think should be made into a single try-with-resource
because it helps to keep the code clean, and i found one additional spot with a
leaked Input Stream
Thanks for digging into this!
> EncryptContent for PGP Leaks File Handles
> -----------------------------------------
>
> Key: NIFI-888
> URL: https://issues.apache.org/jira/browse/NIFI-888
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 0.2.0
> Reporter: Alan Jackoway
> Assignee: Mark Payne
> Priority: Critical
> Fix For: 0.3.0
>
>
> I had some nifi nodes crash last night with errors that suggested file
> handles where exhausted. When I looked into lsof, I found tens of thousands
> of open file handles to a public key I was using in EncryptContent.
> It looks to me like the OpenPGPKeyBasedEncryptor.getPublicKey leaks file
> handles. Because this is called in EncryptContent's validate method, these
> file handles build up even when there is no data flow. You can reproduce by
> the following:
> * Create a PGP public key
> * Set up an EncryptContent processor with the public key for PGP encryption.
> * Do lsof | grep publicKey and see the file handles build up.
> I have a patch. Will post a pull request shortly. I have no idea how to test
> it though other than that I ran it locally and the file handles stopped
> building up when I used the patched code.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)