I personally use an Emacs patched as follows:
Index: src/process.c
===================================================================
RCS file: /sources/emacs/emacs/src/process.c,v
retrieving revision 1.538
diff -u -r1.538 process.c
--- src/process.c 27 Mar 2008 20:52:24 -0000 1.538
+++ src/process.c 27 Mar 2008 20:52:32 -0000
@@ -4272,6 +4272,9 @@
FD_ZERO (&Connecting);
#endif
+ if (time_limit == 0 && wait_proc && !NILP (Vinhibit_quit))
+ error ("Blocking call to accept-process-output with quit inhibited!!");
+
/* If wait_proc is a process to watch, set wait_channel accordingly. */
if (wait_proc != NULL)
wait_channel = wait_proc->infd;
so the accept-process-output refuses to do its job if it's run with
quit-inhibited, which is the typical cause of problems such as the one
you're describing. But your backtrace indicates that inhibit-quit is
(most likely) not set, so your problem seems to be different.