GNU bug report logs - #25875
26.0.50; Hang logging out of MS-Windows

Previous Next

Package: emacs;

Reported by: Richard Copley <rcopley <at> gmail.com>

Date: Sat, 25 Feb 2017 19:37:01 UTC

Severity: normal

Found in version 26.0.50

Done: Ken Brown <kbrown <at> cornell.edu>

Bug is archived. No further changes may be made.

Full log


Message #95 received at 25875 <at> debbugs.gnu.org (full text, mbox):

From: Richard Copley <rcopley <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 25875 <at> debbugs.gnu.org, Ken Brown <kbrown <at> cornell.edu>
Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows
Date: Mon, 27 Feb 2017 20:52:16 +0000
On 27 February 2017 at 20:27, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> From: Richard Copley <rcopley <at> gmail.com>
>> Date: Mon, 27 Feb 2017 19:46:21 +0000
>> Cc: Eli Zaretskii <eliz <at> gnu.org>, 25875 <at> debbugs.gnu.org
>>
>> > Bug#23483.
>>
>> That's not a real issue, in my opinion. It's already covered,
>> by autosave.
>
> I don't think it is, because when WM_ENDSESSION comes in, Emacs will
> be terminated without giving it a chance to auto-save.
>
> Ken's change was meant to delay the shutdown long enough for Emacs to
> exit in an orderly fashion.  The idea of the design is correct, IMO,
> it's just that we should avoid the hang.

OK. I don't mean to be difficult, I just don't see what testing I can do
that would be of any use.

Eli, you said:

> As I understand it, this happens because when the input thread gets
> the WM_ENDSESSION message, it posts it to the main thread and goes on
> to sleep for 1000 sec, to avoid ending the Emacs process before it
> finishes orderly shutdown.  But if the main thread happens to be
> inside redisplay, it could invoke one of the function that send
> messages to the input thread via SendMessage, which waits for the
> input thread to respond.  So we do have a kind of deadlock.

Posting a message and then sleeping while it's processed is odd,
isn't it? If the input thread /sent/ its message to the main thread,
then while waiting for SendMessage to return, the input thread would
automatically continue to process sent messages




This bug report was last modified 8 years and 85 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.