[ 
https://issues.apache.org/jira/browse/NIFI-888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14708028#comment-14708028
 ] 

ASF GitHub Bot commented on NIFI-888:
-------------------------------------

GitHub user jackowaya opened a pull request:

    https://github.com/apache/nifi/pull/76

    NIFI-888 EncryptContent for PGP Leaks File Handles.

    Closes InputStreams created to read the public keys for PGP encryption and 
several other
    streams involved in PGP encryptiong. This prevents NiFi from leaking file 
handles on
    every validate call or encryption attempt in the EncryptContent processor.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jackowaya/incubator-nifi encryptFileLeak

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/76.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 #76
    
----
commit 42956dd15cf678f30d3848aefda35c4515315621
Author: Alan Jackoway <[email protected]>
Date:   2015-08-21T20:45:30Z

    NIFI-888 EncryptContent for PGP Leaks File Handles.
    
    Closes InputStreams created to read the public keys for PGP encryption and 
several other
    streams involved in PGP encryptiong. This prevents NiFi from leaking file 
handles on
    every validate call or encryption attempt in the EncryptContent processor.

----


> 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)

Reply via email to