Last Comment Bug 332883 - Thunderbird freezes while searching in a folder with lots of messages ( search bar )
: Thunderbird freezes while searching in a folder with lots of messages ( searc...
Status: RESOLVED FIXED
: fixed1.8.0.8, fixed1.8.1, verified1.8.1.3
Product: Thunderbird
Classification: Client Software
Component: Mail Window Front End (show other bugs)
: unspecified
: x86 Linux
: -- critical with 1 vote (vote)
: ---
Assigned To: David :Bienvenu
:
Mentors:
: 358441 (view as bug list)
Depends on: 360409
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-05 13:48 PDT by César
Modified: 2009-07-26 07:54 PDT (History)
5 users (show)
dveditz: blocking1.8.0.8+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
proposed fix [Checkin: Comment 8 (*2) & 11] (1.10 KB, patch)
2006-09-19 13:56 PDT, David :Bienvenu
mscott: superreview+
dveditz: approval1.8.0.8+
Details | Diff | Splinter Review
fix root cause of problem [Checkin: Comment 8 (*2) & 11] (2.23 KB, patch)
2006-09-19 15:12 PDT, David :Bienvenu
mscott: superreview+
dveditz: approval1.8.0.8+
Details | Diff | Splinter Review

Description César 2006-04-05 13:48:51 PDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.8.0.1) Gecko/20060313 Debian/1.5.dfsg+1.5.0.1-4 Firefox/1.5.0.1
Build Identifier: version 1.5 (20051201) http://www.mozilla.com/products/download.html?product=thunderbird-1.5&os=linux&lang=en-US

I have a folder containing lots of emails (around 4000 messages).
If I try to search in this folder using the search bar, Thunderbird freezes (it is not responsive anymore to any click/keypress, and it doesn't redraw if I change the size of the window or switch to another window).

If I search using the tool Edit => Find => Search Messages, it works fine (it finds the messages very fast, indeed).

It happens with Mozilla's Thunderbird version (version 1.5 20051201) and also with Debian's Thunderbird version (1.5-4).


Reproducible: Always

Steps to Reproduce:
1. Click on a folder with tons of messages
2. Search some text using the search bar

Actual Results:  
Thunderbird freezes. It is not responsive anymore, and top shows 99% of CPU usage.
Comment 1 Misha Aizatulin 2006-08-18 08:05:58 PDT
First, it seems this bug has to do with Bug 331014.

Second, I can confirm it in Thunderbird 1.5.0.5 (20060725), on SuSE 10. I tried searching two news threads (on news.gmane.org):
gmane.comp.lang.haskell.general (12309 messages)
gmane.comp.lang.haskell.cafe (14453 messages)
The first one always searches fine (through the search bar), the second one always hangs. Using the search tool as described by previous poster works for both folders.

One thing I noticed is that the thread that hangs has some messages in it, that have unreadable subjects - all small question marks in black ovals. One such message on haskell.cafe is on 04/20/2002 09:07AM.

Cheers,
  Misha
Comment 2 Misha Aizatulin 2006-08-18 08:27:23 PDT
I just realised that the other folders also have unreadable messages, so this shouldn't be a problem.

  Misha
Comment 3 David :Bienvenu 2006-09-19 13:56:00 PDT
Created attachment 239235 [details] [diff] [review]
proposed fix
[Checkin: Comment 8 (*2) & 11]

handle the bad threading.
Comment 4 David :Bienvenu 2006-09-19 15:12:10 PDT
Created attachment 239252 [details] [diff] [review]
fix root cause of problem
[Checkin: Comment 8 (*2) & 11]

ignore it when a message says it's a child of itself
Comment 5 David :Bienvenu 2006-09-19 15:53:26 PDT
N.B., the first patch is required for people who already have corrupt db's...
Comment 6 Scott MacGregor 2006-09-19 15:56:29 PDT
Comment on attachment 239235 [details] [diff] [review]
proposed fix
[Checkin: Comment 8 (*2) & 11]

I got interrupted before I could finish looking at this one too. :)
Comment 7 Scott MacGregor 2006-09-19 15:56:49 PDT
Comment on attachment 239235 [details] [diff] [review]
proposed fix
[Checkin: Comment 8 (*2) & 11]

bleh, forgot to set the flag.
Comment 8 David :Bienvenu 2006-09-19 16:04:37 PDT
fixed on trunk and branch
Comment 9 David :Bienvenu 2006-09-19 16:07:03 PDT
Comment on attachment 239252 [details] [diff] [review]
fix root cause of problem
[Checkin: Comment 8 (*2) & 11]

this patch prevents the corruption from happening; the previous patch handles the already corrupt threading. The other code that iterates over threads already handle this case. We'll let this bake on the trunk and branch, but requesting approval while I remember...
Comment 10 Daniel Veditz [:dveditz] 2006-09-26 14:30:02 PDT
Comment on attachment 239235 [details] [diff] [review]
proposed fix
[Checkin: Comment 8 (*2) & 11]

approved for 1.8.0 branch, a=dveditz for drivers
Comment 11 David :Bienvenu 2006-09-27 14:02:26 PDT
fixed in 1.8.0 branch
Comment 12 Jay Patel [:jay] 2006-10-20 14:57:02 PDT
I have not been able to reproduce this, so if anyone seeing this problem can test a recent nightly build (http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/) and verify that this is fixed, that will be great!  Please update the fixed1.8.x keyword(s) with verified1.8.x.  Thanks!
Comment 13 Misha Aizatulin 2006-10-23 08:09:58 PDT
gmane.comp.lang.haskell.cafe searches fine in Thunderbird 1.5.0.7 (20061023). I don't have permission to change bug status however.
Comment 14 Marcia Knous [:marcia - use ni] 2006-10-31 16:43:28 PST
If someone (the reporter or another person who has seen the bug) can please verify the fix from a candidate build in this directory, that would be great - ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/1.5.0.8-candidates/rc1/
Comment 15 juan becerra [:juanb] 2007-03-30 16:13:52 PDT
Tried several types of searches in folders with many messages >5000, threaded and unthreaded, and I don't see Tbird 2 freezing. 
Comment 16 Wayne Mery (:wsmwk, NI for questions) 2009-07-26 07:54:22 PDT
*** Bug 358441 has been marked as a duplicate of this bug. ***

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