Package: python-imaplib2
Version: 2.57-5
Severity: normal
Tags: upstream

I noticed this from trying "usecompression = yes" in offlineimap.

When fetching large messages over IMAP, it's possible to
completely drain the system socket, but still have leftover data
in userspace that the high-level .read methods may return.

Having no data in the socket prevents the select()/poll()
syscalls from waking up in the "_reader" event loop.

I'm no Python hacker, however I am familiar with zlib
and non-blocking sockets from C and other languages.

I recommend trying to read() first, and then issue
select()/poll() if read() fails with EAGAIN (or SSL_read() fails
with SSL_WANT_READ/SSL_WANT_WRITE).

Blindly doing select/poll with userspace buffer layers on top
(OpenSSL, zlib, or both) is a common source of starvation bugs
in my experience.

Thank you, I'm an offlineimap user since 2003/2004 :)

-- System Information:
Debian Release: 10.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-debug'), (500, 
'oldstable-updates'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python-imaplib2 depends on:
ii  python  2.7.16-1

python-imaplib2 recommends no packages.

python-imaplib2 suggests no packages.

-- no debconf information

Reply via email to