From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Richard Copley Newsgroups: gmane.emacs.bugs Subject: bug#25875: 26.0.50; Hang logging out of MS-Windows Date: Sat, 25 Feb 2017 21:07:51 +0000 Message-ID: References: <83lgsuqacv.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1488056962 27938 195.159.176.226 (25 Feb 2017 21:09:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 25 Feb 2017 21:09:22 +0000 (UTC) Cc: 25875@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 25 22:09:19 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chjaa-00063q-B7 for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Feb 2017 22:09:12 +0100 Original-Received: from localhost ([::1]:44261 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chjad-0007KD-6G for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Feb 2017 16:09:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chjaT-0007IX-91 for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2017 16:09:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1chjaQ-0001sU-30 for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2017 16:09:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57880) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1chjaP-0001sK-U4 for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2017 16:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1chjaP-0004Dx-LQ for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2017 16:09:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Richard Copley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Feb 2017 21:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25875 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25875-submit@debbugs.gnu.org id=B25875.148805691016195 (code B ref 25875); Sat, 25 Feb 2017 21:09:01 +0000 Original-Received: (at 25875) by debbugs.gnu.org; 25 Feb 2017 21:08:30 +0000 Original-Received: from localhost ([127.0.0.1]:56079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chjZu-0004D7-0a for submit@debbugs.gnu.org; Sat, 25 Feb 2017 16:08:30 -0500 Original-Received: from mail-ua0-f176.google.com ([209.85.217.176]:36250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chjZr-0004Cv-Ue for 25875@debbugs.gnu.org; Sat, 25 Feb 2017 16:08:28 -0500 Original-Received: by mail-ua0-f176.google.com with SMTP id 72so7936495uaf.3 for <25875@debbugs.gnu.org>; Sat, 25 Feb 2017 13:08:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=JuR+U2MsQ0XzdF6HwC50jQId9wpYcJshMIF/e0SHdGs=; b=KXxW433AUIk5VsNfe30JKSmTZJeUT3srgROpDqgeRot54+flEF5joxwRu8nyjLWUfB 7hx9U8WYJOsjpGV6hbmBB/XY0u/BoXDtLU4G8Kr5KRsNX/mjX2C2aMVMtqNldzsW3zwv M+dyUpv1JurOolC6Gn4NHBZP9bEEb9oyslCVjwqr89FsaQyB4XHAYy9ubcFlg5Qk31b5 JtsfsmO5MB2X//UaMraebh5+vInMNgpto1UZ3OQdSxPlDA6AZ6tBrzHYRKMCyMhs7WR9 PO0/O7cAdOgSDDhbik0/VWWbbWSzehDSBoP2OrKUgBnpGZ1WHXS9kDDwUKHv63z1EKFE YbTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=JuR+U2MsQ0XzdF6HwC50jQId9wpYcJshMIF/e0SHdGs=; b=iUIOZQqneK5GaklxmEJVDh6a6CsQVDVE1lrmTQpPyr1pn+3WLfTv+g6kPgUenhtV12 krP9Mb1Zocwnf7Un+5kScXZphvjvQL0mdaKNsgKhk9SZem2UZsCwr88PJaTUFFKYlw/y bhc4yRMr8reazkeOIAVM2HHiCf7gigpfF2YvTe3F4SD+tFiGmA81K9spdCpZ7B/LfB/f EBVbiZb3nqNBCCBHPu8rprGZhxqVaaJ08W8jh4t8Mq9iHWyww88a2N97Z6Nf9RORxviY oXS91fIOcY+1sXzv8e3ET8JzJjP9GDwGwv3BFsUHeSkWzteVR3kbjhY4F4edQBzzurkj 49gg== X-Gm-Message-State: AMke39mHIJU7lr00gUaNbueHkZj/GDY6Hz0ZwA5DOfPxZpXgdJ+xWOUP41ZfZFLI4QUD/bOU/Nu7dEVBuDYjIQ== X-Received: by 10.176.82.136 with SMTP id v8mr4284170uav.62.1488056902037; Sat, 25 Feb 2017 13:08:22 -0800 (PST) Original-Received: by 10.159.37.33 with HTTP; Sat, 25 Feb 2017 13:07:51 -0800 (PST) In-Reply-To: <83lgsuqacv.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:129802 Archived-At: On 25 February 2017 at 20:33, Eli Zaretskii wrote: >> From: Richard Copley >> Date: Sat, 25 Feb 2017 19:35:28 +0000 >> >> On MS Windows, Emacs sometimes hangs when shutting down or logging out. > > How did you shut it down in this case? This part: > >> #2 0x0000000400266caf in sys_sleep (seconds=1000) >> at ../../repo/src/w32.c:3075 >> No locals. >> #3 0x0000000400238225 in w32_wnd_proc (hwnd=0x1f076a, msg=22, wParam=1, >> lParam=0) at ../../repo/src/w32fns.c:4805 > > seems to indicate that you shut down your Windows session or > something? Yes indeed. Hence "when shutting down or logging out". In this case shutting down the computer. >> (This build includes 5114b3a204..: Eli Zaretskii 2017-02-23 Avoid >> quitting inside a critical section on MS-Windows, see #25279). >> >> I've included backtraces for all the threads having Emacs functions on >> the stack, because I can't tell which are deadlocked, if any. (2 and 3?) > > I'm not sure I see any of them deadlocked. Each one is waiting for > something it should. Yes, I think you're right, it wasn't a deadlock (see my later mail). >> Also got these from thread 2, frame 2. >> >> (gdb) print crit >> $1 = (CRITICAL_SECTION *) 0x401bc6a20 >> (gdb) print crit_real >> $2 = {DebugInfo = 0xffffffffffffffff, LockCount = -1, RecursionCount = 0, >> OwningThread = 0x0, LockSemaphore = 0x0, SpinCount = 33556432} > > Any reasons why this drew your attention? Labouring under a misapprehension, I thought this might be the same sort of deadlock as in #25279, so I thought this might be relevant. But it probably wasn't. >> Configured using: >> 'configure --prefix=/mingw64 --with-modules >> --enable-locallisppath=/c/emacs/site-lisp >> CPPFLAGS=-D_WIN32_WINNT=_WIN32_WINNT_WIN7 'CFLAGS=-O0 -g -ggdb'' > > Why are you setting _WIN32_WINNT to this value when compiling Emacs? It's part of a patch that sets the AppUserModelID of the Emacs process and of the shortcut created by addpm.exe to the same string, so that if I pin the shortcut to the taskbar, that icon will combine with the taskbar button of a running Emacs process. I can't imagine it's relevant to this issue. [Would you like to see the patch? It would only be a starting point, since it wouldn't compile on earlier versions of the OS in its current state. And I'm still not ready to assign copyright.]