Closed Bug 1469513 Opened 6 years ago Closed 6 years ago

IMAP file descriptors leaks to attachment viewer when crashing

Categories

(MailNews Core :: Networking: IMAP, defect)

Unspecified
Linux
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 147659

People

(Reporter: daniele, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
Build ID: 20180517114003

Steps to reproduce:

I opened a pdf attachment, okular was spawned. Then Thunderbird crashed for some reason (cannot reproduce, but a kill -9 is equivalent).

Closing Thunderbird with quit did shutdown/close the TCP connections.


Actual results:


Okular had the IMAP TCP file descriptors and kept the IMAP connections open. The Dovecot server kept sending notifies that were probably buffered and it didn't notice anything.

On opening Thunderbird again dovecot triggered the connections-per-ip limit and I couldn't log into the IMAP server again:

$ netstat -np|grep 143
tcp6  212564      0 2a01:2d8:5e10:caf:44198 2a02:20:20:20::135:143  CLOSE_WAIT  9825/okular         
tcp6  149316      0 2a01:2d8:5e10:caf:39552 2a02:20:20:de::197:143  ESTABLISHED 9825/okular         
tcp6   40984      0 2a01:2d8:5e10:caf:44798 2a02:20:20:20::135:143  CLOSE_WAIT  9825/okular         
tcp6  213030      0 2a01:2d8:5e10:caf:58094 2a02:20:20:20::134:143  CLOSE_WAIT  9825/okular         
tcp6  477572      0 2a01:2d8:5e10:caf:42360 2a02:20:20:de::197:143  ESTABLISHED 9825/okular         
tcp6  149705      0 2a01:2d8:5e10:caf:56802 2a02:20:20:20::134:143  ESTABLISHED 9825/okular         
tcp6   39582      0 2a01:2d8:5e10:caf:47056 2a02:20:20:20::135:143  ESTABLISHED 9825/okular         
tcp6   40984      0 2a01:2d8:5e10:caf:40736 2a02:20:20:20::135:143  CLOSE_WAIT  9825/okular         
tcp6   12558      0 2a01:2d8:5e10:caf:39432 2a02:20:20:20::134:143  ESTABLISHED 9825/okular         
tcp6   12558      0 2a01:2d8:5e10:caf:40870 2a02:20:20:20::135:143  ESTABLISHED 9825/okular         
tcp6   12558      0 2a01:2d8:5e10:caf:53246 2a02:20:20:de::197:143  ESTABLISHED 9825/okular         
tcp6  296491      0 2a01:2d8:5e10:caf:60340 2a02:20:20:20::135:143  ESTABLISHED 9825/okular         
tcp6  149270      0 2a01:2d8:5e10:caf:39554 2a02:20:20:de::197:143  ESTABLISHED 9825/okular         
tcp6   12558      0 2a01:2d8:5e10:caf:40872 2a02:20:20:20::135:143  ESTABLISHED 9825/okular         
tcp6  477618      0 2a01:2d8:5e10:caf:52276 2a02:20:20:de::197:143  ESTABLISHED 9825/okular         
tcp6  303787      0 2a01:2d8:5e10:caf:60920 2a02:20:20:20::135:143  CLOSE_WAIT  9825/okular         
tcp6  149222      0 2a01:2d8:5e10:caf:46082 2a02:20:20:20::135:143  CLOSE_WAIT  9825/okular         
tcp6  151208      0 2a01:2d8:5e10:caf:54240 2a02:20:20:20::135:143  ESTABLISHED 9825/okular         
tcp6   12558      0 2a01:2d8:5e10:caf:53244 2a02:20:20:de::197:143  ESTABLISHED 9825/okular         
tcp6   12558      0 2a01:2d8:5e10:caf:53248 2a02:20:20:de::197:143  ESTABLISHED 9825/okular         
tcp6  306038      0 2a01:2d8:5e10:caf:55072 2a02:20:20:de::197:143  ESTABLISHED 9825/okular         
tcp6  305992      0 2a01:2d8:5e10:caf:54984 2a02:20:20:de::197:143  ESTABLISHED 9825/okular         
tcp6  214027      0 2a01:2d8:5e10:caf:55264 2a02:20:20:20::135:143  CLOSE_WAIT  9825/okular         
tcp6  477572      0 2a01:2d8:5e10:caf:42250 2a02:20:20:de::197:143  ESTABLISHED 9825/okular         
tcp6  149270      0 2a01:2d8:5e10:caf:35798 2a02:20:20:20::135:143  ESTABLISHED 9825/okular         
tcp6  149831      0 2a01:2d8:5e10:caf:60314 2a02:20:20:20::135:143  ESTABLISHED 9825/okular         
tcp6   63674      0 2a01:2d8:5e10:caf:45152 2a02:20:20:20::135:143  CLOSE_WAIT  9825/okular         
tcp6   40984      0 2a01:2d8:5e10:caf:44778 2a02:20:20:20::135:143  CLOSE_WAIT  9825/okular         
tcp6      32      0 2a01:2d8:5e10:caf:36896 2a02:20:20:20::135:143  CLOSE_WAIT  9825/okular         
tcp6   12558      0 2a01:2d8:5e10:caf:57116 2a02:20:20:20::135:143  ESTABLISHED 9825/okular         
tcp6   15787      0 2a01:2d8:5e10:caf:43512 2a02:20:20:20::135:143  ESTABLISHED 9825/okular         
tcp6  305992      0 2a01:2d8:5e10:caf:54584 2a02:20:20:de::197:143  ESTABLISHED 9825/okular         
tcp6   40984      0 2a01:2d8:5e10:caf:58932 2a02:20:20:20::135:143  CLOSE_WAIT  9825/okular         
tcp6  149270      0 2a01:2d8:5e10:caf:39550 2a02:20:20:de::197:143  ESTABLISHED 9825/okular         
tcp6   40984      0 2a01:2d8:5e10:caf:41508 2a02:20:20:20::134:143  CLOSE_WAIT  9825/okular  


Expected results:

I suppose the fds should be closed after fork before exec-ing the viewer.
A similar report, bug 1296568, was duped to bug 147659, and thence duped to bug 1406971 which is should be fixed in Thunderbird 60. So please test the beta from https://www.thunderbird.net/en-US/channel/ and tell us whether your problem is gone.
Component: Untriaged → Networking: IMAP
Flags: needinfo?(daniele)
Product: Thunderbird → MailNews Core
Severity: normal → critical
OS: Unspecified → Linux
Whiteboard: [closeme 2018-07-11]
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
Whiteboard: [closeme 2018-07-11]
Flags: needinfo?(daniele)
You need to log in before you can comment on or make changes to this bug.