You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Ralf Hauser (JIRA)" <se...@james.apache.org> on 2006/02/27 16:58:59 UTC

[jira] Commented: (JAMES-430) MailImpl#writeContentTo leaks thread

    [ http://issues.apache.org/jira/browse/JAMES-430?page=comments#action_12367971 ] 

Ralf Hauser commented on JAMES-430:
-----------------------------------

We just ran into this problem too during a load test we did for pop3+SSL (we extended JMeter to do so: http://issues.apache.org/bugzilla/show_bug.cgi?id=38384).

When will the new release come out officially where that is fixed?

Just FYI what it looks when your JVM is dying:
For each TOP, you will have a starving thread haning around (below if the concerned message had an attachment - not sure whether the error also occurs for simple mails...).

"DataHandler.getInputStream" daemon prio=1 tid=0x0000002b0365a1e0 nid=0x19e3 in Object.wait() [0x0000002b29c03000..0x0000002b29c04350]
        at java.lang.Object.wait(Native Method)
        at java.io.PipedInputStream.awaitSpace(PipedInputStream.java:204)
        at java.io.PipedInputStream.receive(PipedInputStream.java:136)
        - locked <0x0000002af7d7fe20> (a java.io.PipedInputStream)
        at java.io.PipedOutputStream.write(PipedOutputStream.java:103)
        at com.sun.mail.util.QPEncoderStream.output(QPEncoderStream.java:162)
        at com.sun.mail.util.QPEncoderStream.write(QPEncoderStream.java:109)
        at com.sun.mail.util.QPEncoderStream.write(QPEncoderStream.java:64)
        at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)
        at sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(StreamEncoder.java:404)
        at sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:408)
        at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:152)
        - locked <0x0000002af7d80d28> (a java.io.OutputStreamWriter)
        at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)
        at com.sun.mail.handlers.text_plain.writeTo(text_plain.java:127)
        at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:839)
        at javax.activation.DataHandler.writeTo(DataHandler.java:295)
        at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1206)
        at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:707)
        at javax.mail.internet.MimeMultipart.writeTo(MimeMultipart.java:256)
        at com.sun.mail.handlers.multipart_mixed.writeTo(multipart_mixed.java:67)
        at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:839)
        at javax.activation.DataHandler$1.run(DataHandler.java:248)
        at java.lang.Thread.run(Thread.java:595) 



> MailImpl#writeContentTo leaks thread
> ------------------------------------
>
>          Key: JAMES-430
>          URL: http://issues.apache.org/jira/browse/JAMES-430
>      Project: James
>         Type: Bug
>   Components: James Core
>     Versions: 2.2.0
>     Reporter: Matthias Ernst
>     Assignee: Stefano Bagnara
>      Fix For: 2.3.0a1

>
> MailImpl#writeContentTo(OutputStream, int) (used by POP3 TOP) does not close the input stream acquired from its MimeMessage. MimeMessage#getInputStream is a PipedInputStream and has a thread running on its behalf. Thus, MailImpl leaks a thread per
> message TOPed.
> Fix:
> in = message.getInputStream();
> try {
>   ...
> } finally {
>   in.close
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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