commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maurizio Cucchiara (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (EMAIL-110) java.lang.OutOfMemoryError: Java heap space while parsing Mime part
Date Sun, 11 Dec 2011 17:56:39 GMT

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

Maurizio Cucchiara commented on EMAIL-110:
------------------------------------------

Good starting point, I can confirm the issue now.
But unfortunately, I can also confirm that the issue is not commons-related.
In fact reducing the dependencies list, it works as expected.
For the sake of completeness, I made a few changes:
{code}
mail.smtp.host: localhost (Utils.java)
mail.smtp.port: 25

To:mcucchiara@localhost (crashfix.eml)
{code}

Looks like it is abdera-related (removing that dependency make it works)
{code:xml|title:pom.xml}
<dependencies>                                 
    <dependency>                               
        <groupId>junit</groupId>               
        <artifactId>junit</artifactId>         
        <version>4.10</version>                
        <scope>compile</scope>                 
    </dependency>                              
                                               
    <dependency>                               
        <groupId>org.apache.commons</groupId>  
        <artifactId>commons-email</artifactId> 
        <version>1.2</version>                 
    </dependency>                              
</dependencies>                                
{code}

                
> java.lang.OutOfMemoryError: Java heap space while parsing Mime part
> -------------------------------------------------------------------
>
>                 Key: EMAIL-110
>                 URL: https://issues.apache.org/jira/browse/EMAIL-110
>             Project: Commons Email
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: Windows, Linux
>            Reporter: Stephen Kruger
>            Priority: Blocker
>         Attachments: MailBug.zip, crashfix.eml
>
>
> I have a particular eml message which appears to cause a complete memory overflow deep
within commons-email.
> A look at the source code does reveal a suspect "while" loop which appears to never exit
properly, and should be rewritten so that bad data could not give us this situation.
> The stack trace is :
> java.lang.OutOfMemoryError: Java heap space
> 	at java.util.Arrays.copyOf(Arrays.java:2786)
> 	at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)
> 	at javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:316)
> 	at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:186)
> 	at javax.mail.internet.MimeMultipart.updateHeaders(MimeMultipart.java:130)
> 	at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:539)
> 	at javax.mail.internet.MimeMultipart.updateHeaders(MimeMultipart.java:133)
> 	at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:1393)
> 	at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1366)
> 	at javax.mail.Transport.send(Transport.java:76)
> 	at javax.mail.Transport.send(Transport.java:48)
> There are many public threads illustrating this same error, but they never pinpoint the
code to Commons Email, I'm guessing I'm using the code in a way which exhibits this behaviour
:
> http://stackoverflow.com/questions/3177092/uploading-to-blobstore-gives-a-java-heap-outofmemoryerror
> http://stackoverflow.com/questions/2994031/outofmemoryerror-trying-to-upload-to-blobstore-locally

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message