Re: [OT] Mail hangs real-time processes
Re: [OT] Mail hangs real-time processes
- Subject: Re: [OT] Mail hangs real-time processes
- From: Jeff Moore <email@hidden>
- Date: Tue, 6 Jan 2004 16:12:07 -0800
Before, I get into this, I remembered one other question that would be
helpful to know the answer to: When the hang happens, does the mouse
move normally? That is, does it stutter around or move smoothly like
normal?
At any rate, 50000+ messages in one folder is probably on the large
side for mail folders. Opening one is going to cause a massive amount
of disk IO and possibly a fair amount of VM paging, especially given
the amount of RAM you have. Indeed, using fs_usage I see all sorts of
disk activity going on when I open one of my own small mail folders. I
don't see any VM activity, but my mailbox is small (and nobody in my
immediate vicinity had one any where near that big) so probably won't
have the same memory behavior.
So, it could be that VM paging or Mail's disk IO is preventing iTunes
from getting at the audio data on the disk when it needs it. VM paging
would be the worst since it will additionally hold off the HAL's IO
thread which will cause glitches.
So to see if the disk activity is causing troubles, I'd do the
following:
1) Shutdown the machine and cold boot it. Cold booting makes sure that
as little stuff is cached or otherwise already loaded as possible which
should exacerbate this problem if it is disk related.
2) Play back some audio using a tool that does all it's work directly
out of RAM, like HALLab. QTPlayer, iTunes, and most others buffer the
file data off the disk as needed so aren't suitable for this test.
3) Launch Mail and open the big mail folder and see if it interrupts
the playback.
It might be helpful to run fs_usage as well in a shell somewhere so you
can see who's doing what sort of disk IO.
For the record:
Sample(1) is a command line tool that can take a peak at the stacks of
all the threads in a process over time. It is a great tool for
diagnosing hangs, infinite loops, and other issues that can be seen
from a stack crawl. The man page is probably the best documentation for
it. While I find the command line version the easiest to use, there is
also a GUI version called Sampler which is located in
/Developer/Applications/Performance Tools. I think the docs that
discuss the various performance tools also has some info on the GUI
version. Now that we have a bit more detail, a sample trace probably
won't be all that easy to get for the portion of time that it is needed
since the hang is so brief.
On Jan 5, 2004, at 6:56 PM, Jens Bauer wrote:
Hi Jeff,
On Tuesday, Jan 6, 2004, at 01:57 Europe/Copenhagen, Jeff Moore wrote:
Let's not be hasty in speculating on what might have happened and why.
OK, I'll try not to. ;)
Can you provide a bit more detail? Some of the questions that spring
to mind:
- What was iTunes doing prior to it freezing?
Just playing mp3's; it was in the middle of a song. It didn't freeze
up iTunes "for good", but it froze it for a while, and continued
playing, when the CPU was available.
- What was Mail doing when the freeze happened?
I just clicked a mailbox; eg. a "mail folder" containing around 50000+
messages.
- What hardware was involved here?
PowerMac DP867/256MB.
- What other apps were running and what were they doing?
Finder, passive.
Most likely TextEdit, passive (no documents open)
- While hung, could other apps play sound?
I heard no sounds at all.
- Can you make the hang happen again?
I tried, and this time, it only hung for around one second.
- If you can get it to happen again, getting a sample(1) trace of the
hang for iTunes, Mail and any other hung process would be helpful.
How do I do this?
-Eg. there's no crash-report, I believe...
From what I remember, the sound started to freeze, then played a bit,
then froze again, played (it was in sync with the Mail.app's
progress-indicator; when the progress indicator stopped, iTunes didn't
play), then the 30 sec. freeze, then it continued.
On Jan 5, 2004, at 4:14 PM, Jens Bauer wrote:
I'd like to put up a warning...
I just experienced, while having iTunes running, Mail.app made
iTunes freeze for more than half a minute.
OUCH! -There's something completely wrong with Mail.app. I don't
know if it's fixed for Panther, I'm using 10.2.8.
I believe that this has to do with some locking mechanism, to
prevent other applications writing in the files that Mail.app has
open.
Indeed, this is insane, because then every application should
implement that kind of security. I believe it would be right to
implement it only while receiving mail over the network.
Anyway, I believe the solution is to keep Mail.app off computers
that need to process data in realtime.
-Did anyone else experience this?
Love,
Jens
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.