Closed Bug 342784 Opened 18 years ago Closed 17 years ago

File > Quit hangs tb if expunge inbox on exit is set

Categories

(Thunderbird :: Mail Window Front End, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mkmelin, Assigned: Bienvenu)

References

Details

(5 keywords)

Attachments

(1 file)

File > Quit makes thunderbird hang if the account is set to "expunge" inbox on exit (imap account). Exiting by clicking x in the window corner is working. 

Reproduced on branch:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1a3) Gecko/20060626 Thunderbird/2.0a1 ID:2006062604

Trunk seems to work though!
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060626 Thunderbird/3.0a1 ID:2006062603

A forum report (http://forums.mozillazine.org/viewtopic.php?t=429780) says it's happening in tb 1.0.5 nightlies too...
I had to also turn off "empty trash on exit" on the imap account as mentioned in http://forums.mozillazine.org/viewtopic.php?t=429780#2333611 in order for File->Quit to not hang with 2006-06-26-04-mozilla1.8. 2006-06-26-03-trunk wfm.
This is happening to me on my macbook - debugging it showed that we were unable to process xpcom proxy events from the imap thread to the ui thread so the ui thread gets blocked. I can probably detect that case, but that will mean the empty trash/expunge inbox on exit feature simply fails, but you exit cleanly. To get it to work, I might have to figure out a way to run the operations in a new window, which I bring up before things are torn down at exit.
Attached patch proposed fixSplinter Review
Darin suggested this, and it seems to work fine. I'd still like to try to create a window, etc. but this seems like a reasonable short term fix.
Assignee: mscott → bienvenu
Status: NEW → ASSIGNED
Attachment #227500 - Flags: superreview?(mscott)
Comment on attachment 227500 [details] [diff] [review]
proposed fix

nice. thank you Darin!

We can probably lose the brackets around the two:

eventQueue->HandleEvent(event);

lines.
Attachment #227500 - Flags: superreview?(mscott) → superreview+
fixed on 1.8 branch for TB 2.0. Thx a lot to Darin for the suggestion!
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Shouldn't this go on the 1.8.0 branch also?

Using Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060705 Thunderbird/1.5.0.5 ID:2006070504 it seems it *hangs* only if you have a message to expunge in the inbox but you haven't viewed it (like after a hang/crash). 

It does however always leave the .parentlock file in the profile, so you can't start again before manually removing it.
Flags: blocking1.8.0.5?
According to comment 6 the attached patch doesn't compleatly fix the problem (since we can't expect our users to manually remove the lockfile). So it might be better for the 1.8.0 branch to back out whatever caused this than to try to come up with a fix.

Could someone try to hunt down which change caused this, especially on the 1.8.0 branch.
Having a user have to force-quit in this case is more discoverable than trying to explain how to find and delete the profile lock file. Is the cure worse than the problem? Too late for 1.5.0.5 but nominating for the next release so we can see if this really is a regression from something. 

We'd be more comfortable with any fix if we could pinpoint the change that regressed it.
Flags: blocking1.8.0.6?
Flags: blocking1.8.0.5?
Flags: blocking1.8.0.5-
Thanks for nominating this, we otherwise would have missed it. We've decided we do want to delay the Thunderbird rc2 to see if we can get this in.
Flags: blocking1.8.0.6?
Flags: blocking1.8.0.5-
Flags: blocking1.8.0.5+
with 1.8.0 branch this bug is present on Mac and Windows. I tested on Windows and found when one or both "expunge" and/or "empty trash on exit" is set that File | Exit shuts down UI but leaves process running.  marcia and I'll will nail down the regression Window shortly (after QA meeting)
Status: RESOLVED → REOPENED
OS: Linux → All
Hardware: PC → All
Resolution: FIXED → ---
Comment on attachment 227500 [details] [diff] [review]
proposed fix

approved for 1.8.0 branch, a=dveditz for drivers
Attachment #227500 - Flags: approval1.8.0.5+
fixed on 1.8.0 branch.
Keywords: fixed1.8.0.5
Blocks: 323412
ok, the fix for Bug 338897 seems to have caused this regression. It changes when the window is actually closed in such a way as to break our event pumping code on shutdown (though the fix I made for this bug gets around that breakage)
Depends on: 338897
Blocks: 338897
No longer depends on: 338897
I haven't had the experience of not being able to restart because of the .parentlock file - is that problem specific to linux?
> I haven't had the experience of not being able to restart because of the
> .parentlock file - is that problem specific to linux?

I experience this problem regularly when my profile lives on a NFS server.  I typically hit the problem when I'm running the process in the debugger and kill the process from the debugger.
Seems this is needes fixing on trunk too, same symptoms as 1.8.0 branch after all... No hang, but won't start before deleting .parentlock.


(I don't know what function the .parentlock file has, but I hit the issue fairly often especially on trunk. Sometimes it seems thunderbird starts even though it's there, other times not, but deleting it always helps... Go figure.)
Flags: blocking1.9a1+
I am facing this issue with TB 1.5.0.7 from <http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/1.5.0.7/linux-i686/en-US/thunderbird-1.5.0.7.tar.gz>.  Problem is 100% reproducible:

1) File >Quit
2) Popup "Time out on server xxx.domin.com"
3) Process terminates, leaving .parenlock in my profile

My OS is Linux/FC3. My home directory lives onto an NFS-server.

I do not know whether it is related or not, but my NFS-server does not allow NFS-locking.  I have run into NFS-locking issues with Eclipse too: pb was fixed by setting an explicit property in Eclipse to _not_ try to use NFS-locking.

I see that 1.5.0.8 is out.  I will give a try.
Just tried with thunderbird 1.5.0.8.  The bug is still there.  The exact popup message before TB exits (leaving .parenlock) is: "Connection to server myserver.mydomain timed out."
verified fixed 1.8.1.3 using Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.0 ID:2007032620 and my imap account. Thunderbird don`t hang on File -> Quit when expunge inbox on exit is set - adding verified keyword
Keywords: verified1.8.1.3
Magnus in comment #17
> Seems this is needes fixing on trunk too, same symptoms as 1.8.0 branch after
> all... No hang, but won't start before deleting .parentlock.

process gone, no .parentlock, but won't start?  (or do I misunderstand)


> (I don't know what function the .parentlock file has, but I hit the issue
> fairly often especially on trunk. Sometimes it seems thunderbird starts even
> though it's there, other times not, but deleting it always helps... Go figure.)

I sometimes see TB start when prior process hasn't stopped. I don't use expunge. No idea of status of .parentlock 

Darin in comment #16
> I experience this problem regularly when my profile lives on a NFS server.  I
> typically hit the problem when I'm running the process in the debugger and kill the process from the debugger.

bug 318801?
Tried it again on current trunk. .parentlock is still in the profile, after any kind of shutdown, but it doesn't cause any problems. (Also true for firefox.)

I'll leave it to David to decide if the code useful or not for trunk, but at least the problem is gone.
I think we're OK on the trunk re this code - eventually we'll try to use the shutdown manager anyway, which will remove the need for pumping events.
Marking FIXED then...
Status: REOPENED → RESOLVED
Closed: 18 years ago17 years ago
Resolution: --- → FIXED
No longer blocks: 283823
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: