PsCreateSystemThread and KeWaitForSingleObject problem

Help.
I have a simple thread that terminates intermittantly. Usually after 5 to 10
minutes.
It runs fine with numerious test apps (for days), but not when it runs with
fairly complex production apps.
The last call the thread makes, when it terminates, is to
WaitForSingleObject and it never returns.
The event type is a SynchronizationEvent.
The event is triggered about 80 times a second. So the thread’s while loop
has been exercised over 20K times before jumping jump.

I create a thread :

NTSTATUS ATCCreateRelayThread( PSERIAL_DEVICE_EXTENSION Extension)
{
NTSTATUS Status;
HANDLE ThreadHandle;
Status = PsCreateSystemThread( &ThreadHandle, THREAD_ALL_ACCESS, NULL,
NULL, NULL, ATCRelayThread, Extension );
if (!NT_ERROR(Status))
{
Status = ObReferenceObjectByHandle( ThreadHandle, THREAD_ALL_ACCESS,
NULL, KernelMode,

&Extension->RelayThreadObjectPointer, NULL );
ZwClose(ThreadHandle);
}
return Status;
}

And the thread gets called:

VOID ATCRelayThread( IN PVOID Context )
{
PSERIAL_DEVICE_EXTENSION Extension;
NTSTATUS Status;
Extension = Context;
do {
Status = KeWaitForSingleObject( &Extension->RelayEvent,
Executive,
KernelMode,
FALSE,
NULL);
if (Status == STATUS_SUCCESS)
ATCRelayDRC( Extension);
} while (TRUE);
}