james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Charles (JIRA)" <server-...@james.apache.org>
Subject [jira] [Commented] (JAMES-1436) APPEND IMAP command can result in JAMES IMAP waiting indefinitely for data
Date Mon, 26 Nov 2012 10:22:58 GMT

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

Eric Charles commented on JAMES-1436:
-------------------------------------

Hi Felix,

I tried to copy more than 600 messages from a folder to another folder (see imap commands
on [1]), and it works fine (maildir mailbox).
Same if you move messages (see [2]).

Which mailbox are you using (it may behave differently for example with JPA).

Can you also post the imap commands that are generated by thunderbird (I use wireshark for
this).

Thx, Eric


[1]
1362 uid copy 678,756,833,1037,1212,1374,1500,1654,1679,1796,1882,1981,2034,2085,2187,2249,2274,2310,2325,2388,2450,2508,2587,2657,2698,2704,2723,2773,2830,2848,2923,3020,3127,3166,3244,3372:3377,3379:3393,3395,3397:3398,3400:3540,3543:3787,3789:3840,3844:4006,4024,4027,4029,4061,4097,4136,4138:4139,4189,4233,4273,4383,4576:4577,4613,4704,5205
"Trash.test1"
1362 OK [COPYUID 540158547 678,756,833,1037,1212,1374,1500,1654,1679,1796,1882,1981,2034,2085,2187,2249,2274,2310,2325,2388,2450,2508,2587,2657,2698,2704,2723,2773,2830,2848,2923,3020,3127,3166,3244,3372:3377,3379:3393,3395,3397:3398,3400:3540,3543:3787,3789:3840,3844:4006,4024,4027,4029,4061,4097,4136,4138:4139,4189,4233,4273,4383,4576:4577,4613,4704,5205
1:677] COPY completed.
1363 noop
1363 OK NOOP completed.
1364 UID fetch 10507:* (FLAGS)
* 5254 FETCH (FLAGS (\Deleted \Recent \Seen) UID 5254)
1364 OK FETCH completed.
1365 IDLE
+ Idling

[2]
1318 uid copy 93,167,211,549,4595:4612,4614:4703,4705:5203,5206:5254 "Trash"
1318 OK [COPYUID 115785913 93,167,211,549,4595:4612,4614:4703,4705:5203,5206:5254 6333:6992]
COPY completed.
1319 uid store 93,167,211,549,4595:4612,4614:4703,4705:5203,5206:5254 +FLAGS (\Deleted \Seen)
* 93 FETCH (MODSEQ (1353922871000) FLAGS (\Deleted \Recent \Seen) UID 93)
* 167 FETCH (MODSEQ (1353922871000) FLAGS (\Deleted \Recent \Seen) UID 167)
* 211 FETCH (MODSEQ (1353922871000) FLAGS (\Deleted \Recent \Seen) UID 211)
* 549 FETCH (MODSEQ (1353922872000) FLAGS (\Deleted \Recent \Seen) UID 549)
* 4595 FETCH (MODSEQ (1353922906000) FLAGS (\Deleted \Recent \Seen) UID 4595)
* 4596 FETCH (MODSEQ (1353922906000) FLAGS (\Deleted \Recent \Seen) UID 4596)
* 4597 FETCH (MODSEQ (1353922906000) FLAGS (\Deleted \Recent \Seen) UID 4597)
* 4598 FETCH (MODSEQ (1353922906000) FLAGS (\Deleted \Recent \Seen) UID 4598)
* 4599 FETCH (MODSEQ (1353922906000) FLAGS (\Deleted \Recent \Seen) UID 4599)
* 4600 FETCH (MODSEQ (1353922906000) FLAGS (\Deleted \Recent \Seen) UID 4600)
...
* 5248 FETCH (MODSEQ (1353922914000) FLAGS (\Deleted \Recent \Seen) UID 5248)
* 5249 FETCH (MODSEQ (1353922914000) FLAGS (\Deleted \Recent \Seen) UID 5249)
* 5250 FETCH (MODSEQ (1353922914000) FLAGS (\Deleted \Recent \Seen) UID 5250)
* 5251 FETCH (MODSEQ (1353922914000) FLAGS (\Deleted \Recent \Seen) UID 5251)
* 5252 FETCH (MODSEQ (1353922914000) FLAGS (\Deleted \Recent \Seen) UID 5252)
* 5253 FETCH (MODSEQ (1353922914000) FLAGS (\Deleted \Recent \Seen) UID 5253)
* 5254 FETCH (MODSEQ (1353922914000) FLAGS (\Deleted \Recent \Seen) UID 5254)
1319 OK STORE completed.
1320 noop
1320 OK NOOP completed.
1321 UID fetch 10507:* (FLAGS)
* 5254 FETCH (FLAGS (\Deleted \Recent \Seen) UID 5254)
1321 OK FETCH completed.
1322 IDLE
+ Idling

                
> APPEND IMAP command can result in JAMES IMAP waiting indefinitely for data
> --------------------------------------------------------------------------
>
>                 Key: JAMES-1436
>                 URL: https://issues.apache.org/jira/browse/JAMES-1436
>             Project: James Server
>          Issue Type: Bug
>          Components: IMAPServer
>    Affects Versions: Trunk, 3.0-beta4, 3.0-beta5
>         Environment: Ubuntu 12.04 x86_64
>            Reporter: Samant Maharaj
>         Attachments: JAMES-1436.patch
>
>
> When processing an IMAP APPEND command, the Netty stack in JAMES IMAP can get into a
state where the ImapRequestFrameDecoder will wait for a number message bytes that will never
arrive.
> This has the effect of causing the IMAP client to also block indefinitely waiting for
a response from the server.
> Root Cause:
> This is due to a race condition when the DelimiterBasedFrameDecoder is removed from the
Netty pipeline by the ImapRequestFrameDecoder.
> If the DelimiterBasedFrameDecoder still contains less than one line of data in its buffer,
that data will never be flushed and forwarded down the pipeline. The effect of this is that
a small number of bytes, typically from the early part of the message are omitted and the
final byte count does not match the value calculated from the APPEND command. This results
in the APPEND command never being completely decoded and hence no append actually takes place
nor does a response get sent to the client.
> In order to reliably trigger this bug, JAMES was configured to accept a remote debugging
connection and a conditional breakpoint set at org.jboss.netty.handler.codec.frame.FrameDecoder:439.
The condition was set to 'Thread.sleep(200l); false'. This results in introducing a 200ms
delay on each frame decoding loop without actually hitting the breakpoint. The effect of this
is to allow the threadpool running ImapRequestFrameDecoder time to consume the individual
frames and remove the DelimiterBasedFrameDecoder from the pipeline.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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


Mime
View raw message