Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ucbvax!hplabs!hplabsc!garfinke From: garfinke@hplabsc.UUCP Newsgroups: comp.windows.x Subject: Re: Applications Hanging? Does XLine work? Message-ID: <69500008@hplabsc.UUCP> Date: Thu, 4-Jun-87 15:43:00 EDT Article-I.D.: hplabsc.69500008 Posted: Thu Jun 4 15:43:00 1987 Date-Received: Sat, 6-Jun-87 09:40:51 EDT References: <8706040216.AA08131@bu-cs.BU.EDU> Organization: Hewlett-Packard Laboratories - Palo Alto, CA Lines: 27 # Subject: Applications Hanging? Does XLine work? > I get on another terminal and kill -QUIT (just before the core dump > the window update finishes as I expected, like the buffers finally get > flushed.) Inspecting the core file it seems to be in write() called > from _XFlush() called from XNextEvent(). > Anyone know what's causing this? I'm looking but it all seems ok, the > only thing that comes to mind is that the buffer is full and we've > entered some sort of deadlock with the server, but that's just a wild > guess. I've seen this happen before and the cause is that the client is writing to the server and blocks when the socket is full. At the same time, the server is sending packets back to the client (in this case maybe an expose event) and the since the client is not consuming these events, the server blocks when the socket is full. Poof, deadlock. When the process is killed, X wakes up from the write and processes the remaining requests. The key here is not to keep on doing operetions which cause events to be generated without consuming them. Maybe setting a timer before doing an XFlush will help. I suppose it is the server responsibility to not hang the system, but since thats not how they're written, you'll have to put some type of workaround in your client. Dan Garfinkel, HP Labs