More debug spew for sorting mochitest-plain hang.
☠☠ backed out by 9bb10cf4a84f ☠ ☠
authorChris Jones <jones.chris.g@gmail.com>
Fri, 22 Jan 2010 18:03:38 -0600
changeset 46573 b0fee4f9b8c7ec241a0617577c5256e0774802b0
parent 46572 f861b6e0a3641064e10db99863e4edce34fbba4d
child 46575 69f4e7d5553c84d0bcd59c6e35ef1a2c83f2f407
child 46605 9bb10cf4a84f9915295340f7f59ca1e36cfeb336
push idunknown
push userunknown
push dateunknown
milestone1.9.3a1pre
More debug spew for sorting mochitest-plain hang.
ipc/glue/AsyncChannel.cpp
--- a/ipc/glue/AsyncChannel.cpp
+++ b/ipc/glue/AsyncChannel.cpp
@@ -153,19 +153,39 @@ AsyncChannel::Close()
         SendGoodbye();
 
         mChannelState = ChannelClosing;
 
         // and post the task will do the actual close
         mIOLoop->PostTask(
             FROM_HERE, NewRunnableMethod(this, &AsyncChannel::OnCloseChannel));
 
+
+
+#ifdef OS_LINUX
+        printf("TEST-UNEXPECTED-FAIL | process %d | posted OnCloseChannel, awaiting notify\n", getpid());
+#endif
+
+
+
         while (ChannelClosing == mChannelState)
             mCvar.Wait();
 
+
+
+
+#ifdef OS_LINUX
+        printf("TEST-UNEXPECTED-FAIL | process %d | received notify\n", getpid());
+#endif
+
+
+
+
+
+
         // TODO sort out Close() on this side racing with Close() on the
         // other side
         mChannelState = ChannelClosed;
     }
 
     return NotifyChannelClosed();
 }
 
@@ -403,16 +423,28 @@ AsyncChannel::OnChannelConnected(int32 p
     mCvar.Notify();
 }
 
 void
 AsyncChannel::OnChannelError()
 {
     AssertIOThread();
 
+
+
+
+#ifdef OS_LINUX
+        printf("TEST-UNEXPECTED-FAIL | process %d | channel error detected\n", getpid());
+#endif
+
+
+
+
+
+
     MutexAutoLock lock(mMutex);
 
     // NB: this can race with the `Goodbye' event being processed by
     // the worker thread
     if (ChannelClosing != mChannelState)
         mChannelState = ChannelError;
 
     NS_ASSERTION(!mChannelErrorTask, "OnChannelError called twice?");
@@ -432,16 +464,35 @@ AsyncChannel::OnSend(Message* aMsg)
 
 void
 AsyncChannel::OnCloseChannel()
 {
     AssertIOThread();
 
     mTransport->Close();
 
+
+
+#ifdef OS_LINUX
+        printf("TEST-UNEXPECTED-FAIL | process %d | OnCloseChannel: closing\n", getpid());
+#endif
+
+
+
+
+
     MutexAutoLock lock(mMutex);
     mChannelState = ChannelClosed;
     mCvar.Notify();
+
+
+
+#ifdef OS_LINUX
+        printf("TEST-UNEXPECTED-FAIL | process %d | OnCloseChannel: notified worker\n", getpid());
+#endif
+
+
+
 }
 
 
 } // namespace ipc
 } // namespace mozilla