[New-bugs-announce] [issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

Kevin Watters report at bugs.python.org
Wed May 6 17:45:41 CEST 2009

New submission from Kevin Watters <kevinwatters at gmail.com>:

I cannot reproduce this locally yet, but I have several bug reports from users showing 
that IMAP4_SSL connections can get stuck in an infinite loop during logout()

  File "imaplib.pyo", line 529, in logout
  File "imaplib.pyo", line 1059, in _simple_command
  File "imaplib.pyo", line 889, in _command_complete
  File "imaplib.pyo", line 990, in _get_tagged_response
  File "imaplib.pyo", line 907, in _get_response
  File "imaplib.pyo", line 1000, in _get_line
  File "imaplib.pyo", line 1170, in readline
  File "ssl.pyo", line 136, in read

IMAP4_SSL uses ssl.wrap_socket and should probably be passing 
suppress_ragged_eofs=False. Without this, self.sslobj.read() may return '' forever, and 
both IMAP4_SSL.read() and IMAP4_SSL.readline() will spin. With 
suppress_ragged_eofs=False, calling logout() may raise an SSLError instead.


components: Library (Lib)
messages: 87337
nosy: kevinwatters
severity: normal
status: open
title: IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs
type: behavior
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list