Opened 4 years ago

Closed 4 years ago

#12601 closed bug (fixed)

IMAP: deleting mails on server gets fetcher thread into an infinite loop

Reported by: pulkomandy Owned by: axeld
Priority: normal Milestone: Unscheduled
Component: Servers/mail_daemon Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All


While IMAP was fetching mails, I deleted some from my server by other means. The IMAP fetcher thread then started using 100% CPU running in an infinite loop. Seems fairly easy to reproduce here.

Change History (3)

comment:1 by pulkomandy, 4 years ago

Ok, some better analysis of what happens:

  • For some reason, the socket IMAP is reading from was disconnected. This causes Response.cpp to throw an "Unexpected end of stream" exception.
  • The exception is caught in the loop in Protocol.cpp which is handling all responses. It looks like the loop expects socket disconnection to result in an error code to be returned, and when there is an exception, it tries to move on to the next command
  • Since no command can be executed in this state, it keeps retrying over and over again to read from the closed socket, and no progress is being made.

comment:2 by axeld, 4 years ago

Status: newin-progress

comment:3 by axeld, 4 years ago

Resolution: fixed
Status: in-progressclosed

Should be fixed in hrev50079, please test.

Note: See TracTickets for help on using tickets.