phyton class IMAP4_SSL(IMAP4): may induce a life lock and stalls compete system
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
getmail4 (Ubuntu) |
Triaged
|
Undecided
|
Unassigned |
Bug Description
Description: Ubuntu 10.04.3 LTS
Release: 10.04
Call Stack:
getmail, line 737, in <module>
main()
getmail, line 703, in main
go(configs)
getmail, line 149, in go
msg = retriever.
_retrieverbases.py, line 437, in getmsg
return self._getmsgbyi
_retrieverbases.py, line 896, in _getmsgbyid
return self._getmsgpar
_retrieverbases.py, line 861, in _getmsgpartbyid
response = self._parse_
_retrieverbases.py, line 738, in _parse_
result, resplist = self.conn.uid(cmd, *args)
imaplib.py, line 753, in uid
typ, dat = self._simple_
imaplib.py, line 1060, in _simple_command
return self._command_
imaplib.py, line 888, in _command_complete
typ, data = self._get_
imaplib.py, line 989, in _get_tagged_
self.
imaplib.py, line 951, in _get_response
data = self.read(size)
imaplib.py, line 1161, in read
chunks.
Please check code below!
Problem is that len(data) might return 0 since data can be "", thus the
read variable never exceeds size and the while read < size: runs forever!
This produces 100 percent CPU usage and consumes memory (chunks.
till the machine dies.
def read(self, size):
"""Read 'size' bytes from remote."""
# sslobj.read() sometimes returns < size bytes
chunks = []
read = 0
while read < size:
return ''.join(chunks)
visibility: | private → public |
summary: |
- phyton class IMAP4_SSL(IMAP4): may induce a memory leak and stalls - compete system + phyton class IMAP4_SSL(IMAP4): may induce a life lock/ memory leak and + stalls compete system |
summary: |
- phyton class IMAP4_SSL(IMAP4): may induce a life lock/ memory leak and - stalls compete system + phyton class IMAP4_SSL(IMAP4): may induce a life lock and stalls compete + system |
Changed in getmail4 (Ubuntu): | |
status: | New → Triaged |