You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by rpreissel <gi...@git.apache.org> on 2016/03/16 17:48:45 UTC

[GitHub] commons-compress pull request: Bugfix for COMPRESS-343

GitHub user rpreissel opened a pull request:

    https://github.com/apache/commons-compress/pull/11

    Bugfix for COMPRESS-343

    The class ...sevenz.Coders.DeflateDecoder does not close (end()) the Deflater and Inflater. This can lead to native memory issues: see https://bugs.openjdk.java.net/browse/JDK-8074108.
    
    This bugfix solves the problem.

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

    $ git pull https://github.com/rpreissel/commons-compress COMPRESS-343

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

    https://github.com/apache/commons-compress/pull/11.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 #11
    
----
commit 2c1e2980c5d5a17be220ae26793e80e9683cc16e
Author: Rene Preissel <rp...@etosquare.de>
Date:   2016-03-16T16:26:57Z

    Bugfix for COMPRESS-343

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


[GitHub] commons-compress pull request: Bugfix for COMPRESS-343

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/commons-compress/pull/11


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


[GitHub] commons-compress pull request: Bugfix for COMPRESS-343

Posted by bodewig <gi...@git.apache.org>.
Github user bodewig commented on the pull request:

    https://github.com/apache/commons-compress/pull/11#issuecomment-197788653
  
    I had naively assumed `InflaterInputStream#close` would free up the resources. Come to think of it, if we pass in the `Inflater` ourselves it makes sense that we are responsible for cleanup.
    
    Many thanks!
    
    I'll grep through the code to ensure the same kind of bug doesn't hit us anywhere else.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


[GitHub] commons-compress pull request: Bugfix for COMPRESS-343

Posted by garydgregory <gi...@git.apache.org>.
Github user garydgregory commented on the pull request:

    https://github.com/apache/commons-compress/pull/11#issuecomment-197518791
  
    Yes, one of:
    
    - Use Mockito or Powermock to assert that the end() method has been called (best)
    - add an isClosed method somewhere that sets an ivar once end() is called.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


[GitHub] commons-compress pull request: Bugfix for COMPRESS-343

Posted by garydgregory <gi...@git.apache.org>.
Github user garydgregory commented on the pull request:

    https://github.com/apache/commons-compress/pull/11#issuecomment-197425393
  
    Hi,
    
    Thank you for the patch.
    
    Do you have a unit test that show the problem and it being fixed by the patch?
    
    Gary


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


[GitHub] commons-compress pull request: Bugfix for COMPRESS-343

Posted by rpreissel <gi...@git.apache.org>.
Github user rpreissel commented on the pull request:

    https://github.com/apache/commons-compress/pull/11#issuecomment-197507339
  
    This is a memory issue and from my point of view there is no simple way to test it with an unit test.
    
    I have tried to write an unit test and used ManagementFactory.getMemoryMXBean().getNonHeapMemoryUsage() to check the memory usage before and after creating an archive with many files. But there was no difference with the patch.
    
    But if I look at the process with system utils I see that the version without the patch requires many GB and the version with the patch only 100MB. 
    
    Any ideas?  



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


[GitHub] commons-compress pull request: Bugfix for COMPRESS-343

Posted by rpreissel <gi...@git.apache.org>.
Github user rpreissel commented on the pull request:

    https://github.com/apache/commons-compress/pull/11#issuecomment-197554132
  
    I added tests with PowerMock/Mockito. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org