[
https://issues.apache.org/jira/browse/JAMES-3709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17482398#comment-17482398
]
Benoit Tellier commented on JAMES-3709:
---------------------------------------
Thanks!
With the log (actually the line just before) it looks like some concurrent
deletions happened, maybe a POP3 clients reconnected during your performance
test while the deletes of the previous sessions were still in progress thus
causing the ` Removing f4f8fd70-7d10-11ec-8d11-6ffd320e78cd from
f4f3f460-7d10-11ec-8d11-6ffd320e78cd POP3 projection for user user@domain at it
is not backed by a MailboxMessage` log. So I tried to delete messages in the
middle of a POP3 session and ... reproduced!
See https://github.com/apache/james-project/pull/868
On the aftermath:
- We should handle missing messages as an expected prime citizen case (cause
we don't have POP3 transactionality so we need to handle concurrency)
- We should return the ERR error code back to the client (we do)
- We should avoid throwing scary logs on such a benign case (we don't)
- Worst: we should not kill the connection because of that benign error
We likely need to revisit error management there...
Karsten, would you take a look at this?
> Missing null check in POP3 TopCmdHandler
> ----------------------------------------
>
> Key: JAMES-3709
> URL: https://issues.apache.org/jira/browse/JAMES-3709
> Project: James Server
> Issue Type: Bug
> Components: protocols
> Affects Versions: master
> Reporter: Karsten Otto
> Priority: Major
> Attachments: error.txt
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> TopCmdHandler is missing a null check when retrieving the message content,
> i.e. the InputStream can be null, which results in an NPE down the line.
> Admittedly this is a rare case, I only observed this during heavy load
> testing.
> On closer inspection it turns out that TopCmdHandler duplicates a major
> portion of code from RetrCmdHandler, but with subtle differences such as the
> null check mentioned above.
> I propose to refactor the two classes to make them share the code, and
> provide unit tests for all possible error/success cases.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]