You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "sit (JIRA)" <ji...@apache.org> on 2015/11/10 14:02:11 UTC

[jira] [Commented] (SANTUARIO-432) java.lang.OutOfMemoryError: Java heap space on decrypting huge XML file

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

sit commented on SANTUARIO-432:
-------------------------------

Hello,

I have proposed a fix on my forked version of trunk : github:SitChenNam/santuario-java. It passes all the junit tests in santuario-java. Could you take a look and validate it? 

Regards
Chen

> java.lang.OutOfMemoryError: Java heap space on decrypting huge XML file
> -----------------------------------------------------------------------
>
>                 Key: SANTUARIO-432
>                 URL: https://issues.apache.org/jira/browse/SANTUARIO-432
>             Project: Santuario
>          Issue Type: Bug
>          Components: Java
>    Affects Versions: Java 2.0.5
>         Environment: Windows 7, JDK 1.7
>            Reporter: sit
>            Assignee: Marc Giger
>            Priority: Blocker
>         Attachments: char_histogram.jpg, char_paths.jpg, char_reference.jpg
>
>
> When decrypting a big XML file, i.e. an encrypted XML file with an EncryptedData structure whose <cipherValue> content is around 1.7 Giga bytes, I got systematically a java.lang.OutOfMemoryError: Java heap space.
> The phenomenon observed is that heap used increase rapidly and linearly until out of memory.
> Using JMap & a memory analyzer tool, I found out that there are more than 2 Giga of char[] hold within the XMLSecurityInputProcessor$InternalBufferProcessor.xmlSecEventList  array.
> See attached screen shots.
> It looks like that every processed XMLSecEvent is store in this list (until <END_ELEMENT> tag is encountered ?)
>  See XMLSecurityInputProcessor$InternalBufferProcessor.processNextEvent(...)
> Is it a bug or a design necessity ?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)