Last Comment Bug 433006 - IMAP Idle doesn't recognize lost connection after S3
: IMAP Idle doesn't recognize lost connection after S3
Status: UNCONFIRMED
[has nspr log]
:
Product: MailNews Core
Classification: Components
Component: Networking: IMAP (show other bugs)
: 1.8 Branch
: x86 Linux
: -- major with 1 vote (vote)
: ---
Assigned To: David :Bienvenu
:
Mentors:
Depends on: 468490
Blocks: 678947
  Show dependency treegraph
 
Reported: 2008-05-09 09:16 PDT by Martin Seifert
Modified: 2014-09-27 07:34 PDT (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
NSPR log with S3 and resume (18.43 KB, application/x-gzip)
2008-05-12 04:21 PDT, Martin Seifert
no flags Details

Description Martin Seifert 2008-05-09 09:16:12 PDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9b5) Gecko/2008050509 Firefox/3.0b5
Build Identifier: Version 2.0.0.14 (20080505)

I'm using Thunderbird under Ubuntu Hardy Heron. I set up my IMAP account using the Idle feature and everything works fine except for resuming from Suspend to RAM.

After resuming from S3, Thunderbird doesn't report new mails anymore and even manually checking for new mails fails as well as downloading the content of already fetched headers. I have to quit Thunderbird and restart it to get it in a working state again.

Reproducible: Always

Steps to Reproduce:
1. Open Thunderbird with IMAP Idle enabled
2. Suspend to RAM
3. Resume
Actual Results:  
Thunderbird doesn't report new mails and even worse is unable to manually check for new mails.

Expected Results:  
Thunderbird reestablishes the connection to the IMAP server and reports new mails.
Comment 1 WADA 2008-05-11 22:31:10 PDT
Similar situation is reported to Bug 425897 for Tb trunk on MS Win Vista.
Can "offline.autoDetect" to false be a workaround?

How long is the suspend time? If DHCP is used for client PC's IP address assignment, and if IP address assignment by DHCP expires during suspend, similar phenomenon can occur on Tb (AFAIR, already opened bug). Is this case? 

Anyway, get NSPR log and check real protocol level flow first.
See Bug 402793 Comment #1 for getting NSPR log.
Following will probably be required for your intial analysis.
> setenv NSPR_LOG_MODULES imap:5,nsSocketTransport:5,nsHostResolver:5
Comment 2 Martin Seifert 2008-05-12 04:21:32 PDT
Created attachment 320519 [details]
NSPR log with S3 and resume

I'm using a DSL connection with dynamic IPs, so most likely the IP will change after every resume.

I tried to get the NSPR log, although I'm not sure if I did the right things. Ubuntu's shell doesn't feature setenv, so I used the following instead:

> export NSPR_LOG_FILE=NSPR-Log
> export NSPR_LOG_MODULES=imap:5,nsSocketTransport:5,nsHostResolver:5

After that I started Thunderbird which automatically connected to my IMAP account, went to S3, resumed from S3 and tried to manually check for new mails. After that I quit Thunderbird.

I hope there is no sensible information in this huge log, especially no passwords?
Comment 3 Nikolay Shopik 2009-06-26 14:06:31 PDT
This could be same issue as Bug 468490
Comment 4 David :Bienvenu 2012-07-10 07:23:49 PDT
no we don't reconnect if the server drops the connection while idle. But the normal check for new mail at the normal interval (I think the default is 10 minutes) will cause a reconnect, and then we'll go idle for as long as the server doesn't drop the connection.

Note You need to log in before you can comment on or make changes to this bug.