Subject: bug#16676: 24.3.50; Repeated but random hang

From: Dmitry Antipov <[email-masked]>
Date: Fri, 07 Feb 2014 12:27:10 +0400

On 02/07/2014 11:39 AM, Eli Zaretskii wrote:

> My reading of this is: Emacs was at the end of a redisplay cycle, when
> a call to an X function signaled an error because "Connection lost to
> X server `:0'".  Then Emacs tried to delete the frame on that display,
> which again involves calls to X.

Yes, and I'm just curious why fatal X errors are handled in the same way
as non-fatal (by x_connection_closed). IIUC if X connection is broken
at the socket level, X protocol command may result in undefined behavior.
Manual says that XIfEvent flushes an event queue and waits for an event
matching the predicate; I don't know how the socket connection was broken
exactly, but it was "broken enough" to wait forever.

> Do you know why the connection was lost in the first place?

Shouldn't we try to check errno x_io_error_quitter? Socket-related calls
should set it in case of error.

Dmitry