Re: Latest PM123 and WPS freezes
- From: Marcel Müller <news.5.maazl@xxxxxxxxxxxxxxx>
- Date: Fri, 20 Jun 2008 15:48:02 +0200
Marty wrote:
However, the information from PSTAT does not look any different to Watchcat at first glance.
PStat shows when a thread is blocked via semaphore or is in a critical section. Watchcat doesn't make this distinction.
Ah, I will try to use this difference.
The question is in the exit list of which threads?
In fact the decoder thread was mostly not in the state unknown. Mostly it were PM threads. But sometimes I had worker threads without any PM initialization in the unknown state too.
To my knowledge the exit list executes as thread 1 exits. There's no concept of an exit list per thread.
OK, from your post I suggested, that there might be something like that.
I don't think that I am able to start PSTAT under this conditions.
If you have non-GUI access to the machine (some kind of telnet or http/cgi access, for example), it will still probably respond and allow you to launch the PSTAT command and capture its output. I do this via Web/2 cgi on my system when things are grim.
Hmm, this is some effort. The only machine that is usually running too is the server. This one nether has a keyboard nor a display connected.
mutex. To run smooth in all cases all threads that use the mutex must raise their priority to the level of the
thread with the highest priority that uses this mutex before they enet the mutex.
DART doesn't work this way. MMOS/2 playlists do. Instead of relying on a thread to "push" audio information out to DART, DART "pulls" the information itself as buffers are emptied.
And in this callback there is a mutex request. Bad design, from my point of view.
Good design for audio applications also won't wait indefinitely on any kind of semaphore. It is better to have a hiccup in the audio, either repeating a full buffer or extending the last sample over the entire next buffer when data is not available, than to halt the thread there.
Well, users of uniaud (with some chipsets) will know that. It will hangup the system once it runs out of recording buffers for some reasons. Maybe it uses a spinlock in the ring 0 code internally.
If they do wind up waiting on a semaphore, and the application starts to shut down while they are waiting, the semaphore can be closed while another thread still waits on it. This leaves the waiting thread in an "unknown" state, hopelessly blocked and never allowed to execute again.
Ah! Is that the cause of unknown thread state?
I would have expected that either DosCloseMutexSem or DosRequestMutexSem would return an error in this case.
The exit list may try to clean up the thread, but will fail and block thread 1 indefinitely also.
However, I also had cases where a kill process recovered from these unknown state.
Proper shutdown would consist of setting a shutdown flag to all potentially waiting threads, posting all semaphores before closing them, and waiting on child threads. If you time out waiting on the child threads to end, as a last resort, try DosKillThread, and exit hoping that the system can clean up the rest.
That's what I usually do.
But there are conditions where threads abort unexpectedly due to a program error (e.g. assert or trap). If this happens during the processing of PM messages, it sometimes will not recover.
Marcel
.
- Follow-Ups:
- Re: Latest PM123 and WPS freezes
- From: Marty
- Re: Latest PM123 and WPS freezes
- References:
- Latest PM123 and WPS freezes
- From: Dave Saville
- Re: Latest PM123 and WPS freezes
- From: Marcel Müller
- Re: Latest PM123 and WPS freezes
- From: Lars Erdmann
- Re: Latest PM123 and WPS freezes
- From: Marcel Müller
- Re: Latest PM123 and WPS freezes
- From: Marty
- Re: Latest PM123 and WPS freezes
- From: Marcel Müller
- Re: Latest PM123 and WPS freezes
- From: Marty
- Latest PM123 and WPS freezes
- Prev by Date: Re: Latest PM123 and WPS freezes
- Next by Date: Re: Latest PM123 and WPS freezes
- Previous by thread: Re: Latest PM123 and WPS freezes
- Next by thread: Re: Latest PM123 and WPS freezes
- Index(es):
Relevant Pages
|