Closed Bug 605487 Opened 14 years ago Closed 11 years ago

delete item in search results' "open as list" hangs thunderbird with high cpu

Categories

(Thunderbird :: Search, defect)

x86
Windows Vista
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: wsmwk, Unassigned)

References

Details

(Keywords: hang, Whiteboard: [has stacktrace])

Attachments

(2 files)

Attached file hang stacktrace
delete item in search results' "open as list" hangs thunderbird.
I don't recall how soon I got the trace after I deleted the message.
Let me know if you need anything, or better trace 

trunk 20101008.  multiple occurrences. haven't tested anything more recent.
>*** WARNING: Unable to verify checksum for 

Wondering why you are getting this.
rsx11m, can you reproduce this?

still see this. trunk 20101106. 

I don't know if this is related but in one case today, where it didn't hang solid, it returned after 20-30 sec and asked if I want to compact folders (I have threshold set at ~60K)


(In reply to comment #1)
> >*** WARNING: Unable to verify checksum for 
> 
> Wondering why you are getting this.

This is normal afaik
Summary: delete item in search results' "open as list" hangs thunderbird → delete item in search results' "open as list" hangs thunderbird with high cpu
Whiteboard: [needs test of more recent trunk]
Version: 3.1 → Trunk
immediately when I restarted, after the last hang, the do you want to compact folders prompt appeared.
Whiteboard: [has stacktrace]
asuth, bienvenu, does stacktrace reveal anything?  or is more informatino needed?
The stack trace shows that it is repainting a tree.  Barring a bug in the tree painting logic, the most likely explanation is some kind of vicious cycle that keeps doing things (or thinking it is doing things) which cause invalidations.  Unfortunately, your stack is of the uninteresting time.  (It may also be the much-longer duration time, since repainting involves a lot of calls.)

There is not a lot distinguishing the open-as-list results mode from the advanced-search mode at this point, do you still use advanced search (for comparison)?

If you could characterize:
- How many messages in the result list when you perform the delete.
- How many messages are you deleting?
- The position of the message(s) in the list that you delete, especially if they are anywhere near the gutter.
- The mixture of account types that the messages in the list are from.

I might be more suspicious of the FolderDisplayWidget doing something crazy that nsMsgDBView or the database; like if you delete a message and your selection ends up in the gutter and it tries to move things, but that doesn't work out, but it still gets the notification which causes it to try and move things again, etc.

What tool are you using to get these backtraces?  How easy is it to sample a couple times to see if you can catch a different stack?  (If you are using the VS debugger or something, that might be easier than an external tool that might re-get the symbols every time or something.)
FWIW, it seems that the UI thread has been blocked/locked for quite a while somehow, or there are ton of events in the UI thread's event queue, since there are several imap threads waiting for the ui thread to process events having to do with idle notifications.
attachment is from another occurrence on Thursday.

note: I sometimes also see failed view behavior like the following, which perhaps is related to the crash
Bug 515400 - delete message from Search Messages results doesn't update view (not rechecked this lateley)
Bug 500083 - delete message from Search Messages results doesn't update view (fixed in 3.0)


(In reply to comment #5)
> The stack trace shows that it is repainting a tree.  Barring a bug in the tree
> painting logic, the most likely explanation is some kind of vicious cycle that
> keeps doing things (or thinking it is doing things) which cause invalidations. 
> Unfortunately, your stack is of the uninteresting time.  (It may also be the
> much-longer duration time, since repainting involves a lot of calls.)
> 
> There is not a lot distinguishing the open-as-list results mode from the
> advanced-search mode at this point, do you still use advanced search (for
> comparison)?

not sure what I would compare. If you are suggesting that some of the messages in the list are no longer in the message store, I don't think I've encountered any situations where that is the case.

> If you could characterize:
> - How many messages in the result list when you perform the delete.
usually my results list is modest numbers - 5-30

> - How many messages are you deleting?
no pattern detected thus far - I think I've seen it for both multiple and single message deletions

> - The position of the message(s) in the list that you delete, especially if
> they are anywhere near the gutter.
I'm pretty sure I've seen it when deleting from both the first and the last message, and anything in between.  but will check on attempts to reproduce

> - The mixture of account types that the messages in the list are from.
I suspect all search results have been imap + local (no pop in the results)

> I might be more suspicious of the FolderDisplayWidget doing something crazy
> that nsMsgDBView or the database; like if you delete a message and your
> selection ends up in the gutter and it tries to move things, but that doesn't
> work out, but it still gets the notification which causes it to try and move
> things again, etc.
> 
> What tool are you using to get these backtraces?  How easy is it to sample a
> couple times to see if you can catch a different stack?  

windbg.
not hard to get multiple samples
Wayne, I found a reasonably easy to use windows profiler tool that it would be great if you could try and use:
http://sourceforge.net/projects/lukestackwalker/

It supports the microsoft symbol server, but does not seem to have UI to configure the exact parameters of the symbol server, but I expect that if you are setting _NT_SYMBOL_PATH in your environment as described at https://developer.mozilla.org/en/Using_the_Mozilla_symbol_server then it presumably will pick them up?  If not, it lets you point it at an on-disk directory to reference pdb files, so perhaps if you just point it at a directory that windbg already populated, things will work out...

I also tried using the "very sleepy" profiler, but it seemed to really interfere with the operation of Thunderbird to the extent that it seems perhaps not as useful a tool to have in one's toolkit.

I should note that our goal isn't so much to figure out which bit is taking the most time, but to get enough samples to figure out what is going on, since something that only spends a small amount of time on the stack could be responsible for the bit that is taking up most of the time.
made a first attempt and windbg symbol store worked, but could not reproduce.

note to self - I often sort the list. does that make a difference?
I saw this in the past month, but had no time to get more info.
I haven't seen this in 1.5 yr. 
so closing
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
See Also: → 515400
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: