Re: Hang up reading Yandex mail box listing.
Viacheslav Chimishuk <[email protected]>
| Newsgroups | gmane.mail.getmail.user |
|---|---|
| Message-ID | <[email protected]> |
On 10.07.2019 09:10, Charles Cazabon <[email protected]> wrote: > Ok, so you are using the latest getmail with Python 2.7.15, which is only one > point-release behind current, and timeout is set to the default value. That > takes care of my first guess at the cause. Some earlier versions of Python > had a known incompatibility between SSL-wrapped sockets and socket timeout > functionality, but I believe those were fixed some time ago (Python 2.5 > maybe?). I've checked: gettimeout() returns None inside SSLSocket.read(). Python docs says: "Setting a timeout of None disables timeouts on socket operations. s.settimeout(0.0) is equivalent to s.setblocking(0); s.settimeout(None) is equivalent to s.setblocking(1)." So, timeout is disabled. Indeed, this is the default mode for socket. My current understanding is that getmail leaves the socket in blocking mode witout any timeout. Am I correct? > This must still be an SSL-interaction, though I don't know why it's coming up > for you now. Do you know which version of OpenSSL your Python is linked > against? I bet if you temporarily swith to the non-SSL POP3 retriever your > hangs go away. It is 1.1.1, which is the latest stable. $ ldd /usr/lib/python2.7/lib-dynload/_ssl.so linux-vdso.so.1 (0x00007fffc59f6000) libssl.so.1.1 => /usr/lib/libssl.so.1.1 (0x00007f886cf6e000) libcrypto.so.1.1 => /usr/lib/libcrypto.so.1.1 (0x00007f886cc9c000) libpython2.7.so.1.0 => /usr/lib/libpython2.7.so.1.0 (0x00007f886ca57000) libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f886ca36000) libc.so.6 => /usr/lib/libc.so.6 (0x00007f886c872000) libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f886c86d000) libutil.so.1 => /usr/lib/libutil.so.1 (0x00007f886c866000) libm.so.6 => /usr/lib/libm.so.6 (0x00007f886c6e1000) /usr/lib64/ld-linux-x86-64.so.2 (0x00007f886d067000) $ ldd /usr/lib/libssl.so.1.1 linux-vdso.so.1 (0x00007ffc3eece000) libcrypto.so.1.1 => /usr/lib/libcrypto.so.1.1 (0x00007eff06175000) libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007eff06154000) libc.so.6 => /usr/lib/libc.so.6 (0x00007eff05f90000) libdl.so.2 => /usr/lib/libdl.so.2 (0x00007eff05f8b000) /usr/lib64/ld-linux-x86-64.so.2 (0x00007eff06527000) $ yaourt -Qs openssl | grep openssl core/openssl 1.1.1.a-1 core/openssl-1.0 1.0.2.q-1 $ By the way, is there any plans to migrate (or support both versions at once) getmail to Python3? -- Best regards, Viacheslav Chimishuk [email protected] Ukraine, Khmelnitsky