From unknown Fri Jun 20 20:10:55 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#25875 <25875@debbugs.gnu.org> To: bug#25875 <25875@debbugs.gnu.org> Subject: Status: 26.0.50; Hang logging out of MS-Windows Reply-To: bug#25875 <25875@debbugs.gnu.org> Date: Sat, 21 Jun 2025 03:10:55 +0000 retitle 25875 26.0.50; Hang logging out of MS-Windows reassign 25875 emacs submitter 25875 Richard Copley severity 25875 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 25 14:36:22 2017 Received: (at submit) by debbugs.gnu.org; 25 Feb 2017 19:36:22 +0000 Received: from localhost ([127.0.0.1]:56036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chi8j-0000EV-C2 for submit@debbugs.gnu.org; Sat, 25 Feb 2017 14:36:22 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chi8g-0000EI-HY for submit@debbugs.gnu.org; Sat, 25 Feb 2017 14:36:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1chi8X-0000Ml-83 for submit@debbugs.gnu.org; Sat, 25 Feb 2017 14:36:13 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48362) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1chi8X-0000Mh-3l for submit@debbugs.gnu.org; Sat, 25 Feb 2017 14:36:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chi8S-0003tn-TD for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2017 14:36:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1chi8O-0000M5-Gf for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2017 14:36:04 -0500 Received: from mail-vk0-x231.google.com ([2607:f8b0:400c:c05::231]:32992) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1chi8O-0000M0-1R for bug-gnu-emacs@gnu.org; Sat, 25 Feb 2017 14:36:00 -0500 Received: by mail-vk0-x231.google.com with SMTP id k127so26833793vke.0 for ; Sat, 25 Feb 2017 11:35:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=8lI32GMc/hpjCfcdwXzhyDSHMlh3tn4JGWr4TnxdgCo=; b=pBCz7O55rACIdaF+W9+m+BBaog8tVG2gNc/bGrBBuoJBBIbiIIPAmohMzYEgdDDNwn D0+7u+csfL4Ec9Y4iz9ZdngJfphq0inpd2I4UtlRF8wsA/h8zsAgjuIrFCbnHMdNKUGz kru0ya4HVNFIB5Kpw93frVDKc2+evpAfhmV1ynFE9S41ZND2gMBDlN0y4oVc0hQhN4yl zQffdBrnCXvwnCw/fCjaksQek0JX2p94tYbBwfvmVlcQH07Ej5tXDsPf3VCtk4pc3a70 xnlCwMxH8GWr0ybQc7GJe6psgI2wINSvEr+6S/ySQgynriSwdFE9W8qf9jX1+wozjzxK U/Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=8lI32GMc/hpjCfcdwXzhyDSHMlh3tn4JGWr4TnxdgCo=; b=HN7gDmvxR0fUktaxFWC6o220osv10ckinfBgofpV3+ulKDkjdCdh/n6EcoElnbuFcj MN7G/lXXtLIlkoluGEFEGM2WlAlB4fQfdk/Gvn/WJLg4FnW0D4YNoSggQOfQlDzHWFyZ kbUiywLtK8rfayFaftaIEiiMYAcBmUPS3WfvoxB6LuaDaOQnVDm80pRxHqOdAG0XQ+Q2 /dlhuw6Hnta5s+NtZvGbPVFNz30l/CbQ3SxXhpYqTl7Z0/EQUW14MMqfgP57lOzYR5Hb 3c0gAzvbvc/svkC+wmQ4/dqB2/8mqeXMBcqwLOp20NJn4GKiGh6UzlS8vZ5mYnVs809j 3c6g== X-Gm-Message-State: AMke39kB1rC1OHMRNllG30R/nGQyjs0FRDzYlEFM+Kb6nvnPkQtpq4YEnnNMcgyZINAQ988ZHVOfyuZpsrcioQ== X-Received: by 10.31.190.142 with SMTP id o136mr2314472vkf.73.1488051358623; Sat, 25 Feb 2017 11:35:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.159.37.33 with HTTP; Sat, 25 Feb 2017 11:35:28 -0800 (PST) From: Richard Copley Date: Sat, 25 Feb 2017 19:35:28 +0000 Message-ID: Subject: 26.0.50; Hang logging out of MS-Windows To: "bug-gnu-emacs@gnu.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) On MS Windows, Emacs sometimes hangs when shutting down or logging out. (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?) Also got these from thread 2, frame 2. (gdb) print crit $1 =3D (CRITICAL_SECTION *) 0x401bc6a20 (gdb) print crit_real $2 =3D {DebugInfo =3D 0xffffffffffffffff, LockCount =3D -1, RecursionCount = =3D 0, OwningThread =3D 0x0, LockSemaphore =3D 0x0, SpinCount =3D 33556432} Backtraces: Thread 4 (Thread 9488.0x1194): #0 0x00007ffffe2c6154 in ntdll!ZwWaitForSingleObject () from C:\Windows\SYSTEM32\ntdll.dll No symbol table info available. #1 0x00007ffffae075ff in WaitForSingleObjectEx () from C:\Windows\System32\KernelBase.dll No symbol table info available. #2 0x0000000400271b98 in _sys_wait_accept (fd=3D3) at ../../repo/src/w32.c= :8514 hEv =3D 0x8c cp =3D 0x401bc5680 rc =3D 258 #3 0x000000040027a86a in reader_thread (arg=3D0x401bc5680 ) at ../../repo/src/w32proc.c:1151 rc =3D 0 cp =3D 0x401bc5680 #4 0x00007ffffc188364 in KERNEL32!BaseThreadInitThunk () from C:\Windows\System32\kernel32.dll No symbol table info available. #5 0x00007ffffe2870d1 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll No symbol table info available. #6 0x0000000000000000 in ?? () No symbol table info available. Backtrace stopped: previous frame inner to this frame (corrupt stack?) Thread 3 (Thread 9488.0x8cc): #0 0x00007ffffe2c6754 in ntdll!ZwDelayExecution () from C:\Windows\SYSTEM32\ntdll.dll No symbol table info available. #1 0x00007ffffae3c4a7 in SleepEx () from C:\Windows\System32\KernelBase.dl= l No symbol table info available. #2 0x0000000400266caf in sys_sleep (seconds=3D1000) at ../../repo/src/w32.c:3075 No locals. #3 0x0000000400238225 in w32_wnd_proc (hwnd=3D0x1f076a, msg=3D22, wParam= =3D1, lParam=3D0) at ../../repo/src/w32fns.c:4805 f =3D 0xd345b0 dpyinfo =3D 0x4006b59c0 wmsg =3D {msg =3D {hwnd =3D 0x1f076a, message =3D 22, wParam =3D 1,= lParam =3D 0, time =3D 257387359, pt =3D {x =3D 0, y =3D 101016963}}, dwModifiers =3D 13659424, rect =3D {left =3D 0, top =3D 1050102, = right =3D 0, bottom =3D 43396736}} windows_translate =3D 0 key =3D 77854497 #4 0x00007ffffc381c24 in USER32!CallWindowProcW () from C:\Windows\System32\user32.dll No symbol table info available. #5 0x00007ffffc381917 in USER32!CallWindowProcW () from C:\Windows\System32\user32.dll No symbol table info available. #6 0x00007ffffc392563 in USER32!MapWindowPoints () from C:\Windows\System32\user32.dll No symbol table info available. #7 0x00007ffffe2c9c54 in ntdll!KiUserCallbackDispatcher () from C:\Windows\SYSTEM32\ntdll.dll No symbol table info available. #8 0x00007ffffb011184 in win32u!NtUserMessageCall () from C:\Windows\System32\win32u.dll No symbol table info available. #9 0x00007ffffc37ee4d in USER32!GetWindowTextW () from C:\Windows\System32\user32.dll No symbol table info available. #10 0x00007ffffc37eb52 in USER32!GetWindowTextW () from C:\Windows\System32\user32.dll No symbol table info available. #11 0x00000004002389df in w32_wnd_proc (hwnd=3D0x1f076a, msg=3D59, wParam= =3D1292, lParam=3D0) at ../../repo/src/w32fns.c:5019 f =3D 0x2975c40 dpyinfo =3D 0x4006b59c0 wmsg =3D {msg =3D {hwnd =3D 0xd34d90, message =3D 43036800, wParam = =3D 1, lParam =3D 140737424911660, time =3D 1321741036, pt =3D {x =3D = 32866, y =3D -31153514}}, dwModifiers =3D 0, rect =3D {left =3D 0, top =3D -119665741, right =3D 32767, bottom =3D 77855528}} windows_translate =3D 32767 key =3D -75708142 #12 0x00007ffffc381c24 in USER32!CallWindowProcW () from C:\Windows\System32\user32.dll No symbol table info available. #13 0x00007ffffc381917 in USER32!CallWindowProcW () from C:\Windows\System32\user32.dll No symbol table info available. #14 0x00007ffffc392563 in USER32!MapWindowPoints () from C:\Windows\System32\user32.dll No symbol table info available. #15 0x00007ffffe2c9c54 in ntdll!KiUserCallbackDispatcher () from C:\Windows\SYSTEM32\ntdll.dll No symbol table info available. #16 0x00007ffffb011164 in win32u!NtUserGetMessage () from C:\Windows\System32\win32u.dll No symbol table info available. #17 0x00007ffffc394866 in USER32!GetMessageW () from C:\Windows\System32\user32.dll No symbol table info available. #18 0x0000000400234b8b in w32_msg_pump (msg_buf=3D0x4a3fec0) at ../../repo/src/w32fns.c:2934 msg =3D {hwnd =3D 0x360858, message =3D 49585, wParam =3D 0, lParam= =3D 0, time =3D 257387359, pt =3D {x =3D 147, y =3D 1339}} result =3D 0 focus_window =3D 0x7ffffc398c05 #19 0x0000000400234e2b in w32_msg_worker (arg=3D0x0) at ../../repo/src/w32fns.c:3157 msg =3D {hwnd =3D 0x0, message =3D 0, wParam =3D 0, lParam =3D 0, t= ime =3D 0, pt =3D {x =3D 0, y =3D 0}} dummy_buf =3D {next =3D 0x0, w32msg =3D {msg =3D {hwnd =3D 0x0, mes= sage =3D 0, wParam =3D 0, lParam =3D 0, time =3D 0, pt =3D {x =3D 0, y = =3D 0}}, dwModifiers =3D 0, rect =3D {left =3D 0, top =3D 0, right =3D 0= , bottom =3D 0}}, result =3D 0, completed =3D 0} #20 0x00007ffffc188364 in KERNEL32!BaseThreadInitThunk () from C:\Windows\System32\kernel32.dll No symbol table info available. #21 0x00007ffffe2870d1 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll No symbol table info available. #22 0x0000000000000000 in ?? () No symbol table info available. Backtrace stopped: previous frame inner to this frame (corrupt stack?) Thread 2 (Thread 9488.0x1a84): #0 0x00007ffffe2c6754 in ntdll!ZwDelayExecution () from C:\Windows\SYSTEM32\ntdll.dll No symbol table info available. #1 0x00007ffffae3c4a7 in SleepEx () from C:\Windows\System32\KernelBase.dl= l No symbol table info available. #2 0x0000000400279469 in timer_loop (arg=3D0x401bc69a0 ) at ../../repo/src/w32proc.c:383 sleep_time =3D 5 handler =3D 0x400218057 now =3D 13132522579521 expire =3D 0 reload =3D 0 itimer =3D 0x401bc69a0 which =3D 0 sig =3D 14 crit =3D 0x401bc6a20 max_sleep =3D 30 hth =3D 0x0 #3 0x00007ffffc188364 in KERNEL32!BaseThreadInitThunk () from C:\Windows\System32\kernel32.dll No symbol table info available. #4 0x00007ffffe2870d1 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll No symbol table info available. #5 0x0000000000000000 in ?? () No symbol table info available. Backtrace stopped: previous frame inner to this frame (corrupt stack?) Thread 1 (Thread 9488.0x19f8): #0 0x00007ffffb011184 in win32u!NtUserMessageCall () from C:\Windows\System32\win32u.dll No symbol table info available. #1 0x00007ffffc38116d in USER32!SendMessageW () from C:\Windows\System32\user32.dll No symbol table info available. #2 0x00007ffffc3883e5 in USER32!SendMessageA () from C:\Windows\System32\user32.dll No symbol table info available. #3 0x0000000400254af2 in my_show_window ( f=3D0x400a51890 , hwnd=3D0x6f0230, how=3D1) at ../../repo/src/w32term.c:3671 No locals. #4 0x0000000400255463 in w32_set_vertical_scroll_bar (w=3D0x134bdb0, portion=3D375, whole=3D375, position=3D0) at ../../repo/src/w32term.c:3= 864 hwnd =3D 0x6f0230 f =3D 0x400a51890 barobj =3D 1 bar =3D 0x1391040 top =3D 676 height =3D 666 left =3D 1261 width =3D 17 window_y =3D 676 window_height =3D 666 #5 0x000000040004e243 in set_vertical_scroll_bar (w=3D0x134bdb0) at ../../repo/src/xdisp.c:16147 start =3D 0 end =3D 375 whole =3D 375 #6 0x0000000400052dfd in redisplay_window (window=3D20233653, just_this_one_p=3Dtrue) at ../../repo/src/xdisp.c:17309 w =3D 0x134bdb0 f =3D 0x400a51890 buffer =3D 0x88363c0 old =3D 0x88363c0 lpoint =3D {charpos =3D 376, bytepos =3D 376} opoint =3D {charpos =3D 376, bytepos =3D 376} startp =3D {charpos =3D 1, bytepos =3D 1} update_mode_line =3D false tem =3D 1058053 it =3D {window =3D 14, w =3D 0x1, f =3D 0x0, method =3D 9440213, stop_charpos =3D 2295024, prev_stop =3D 74, base_level_stop =3D 1= 2568888, end_charpos =3D 17181950771, s =3D 0x2 , string_nchars =3D 12567928, redisplay_end_trigger_charpos =3D 125= 67936, multibyte_p =3D false, header_line_p =3D false, string_from_display_prop_p =3D true, string_from_prefix_prop_p =3D true, from_disp_prop_p =3D false, ellipsis_p =3D false, avoid_cursor_p =3D false, dp =3D 0xbfc5a0, dpvec =3D 0x134bdb5, dpend =3D 0x91415d1, dpvec_char_len =3D 0, dpvec_face_id =3D 0, saved_face_id =3D 152311249, ctl_chars =3D { 17181635588, 2, 12, 12568016, 17180927016, 17183781845, 142828480, 2342752262226706883, 2361576154760218624, 2342752270235894845, 10841447192854784, 200691974110511369, 144781496436181537, 578158424060201565, 5153595279354005796, -5322406194155435264}, start =3D {pos =3D {charpos =3D 17181935= 493, bytepos =3D 17183781845}, overlay_string_index =3D 1718092545= 5, string_pos =3D {charpos =3D 17186823872, bytepos =3D 10}, dpvec_index =3D 170}, current =3D {pos =3D {charpos =3D 0, bytepos =3D 12568272}, overlay_string_index =3D 17181642413, string_pos =3D {charpos =3D 0, bytepos =3D 1}, dpvec_index =3D 152311249}, n_overlay_strings =3D 17180926156, overlay_strings_charpos =3D 141772579, overlay_strings =3D { 17181115979, 142828485, 141772579, 12568352, 17181465465, 141772579, 0, 12568288, 17180925455, 17186823872, 17180926961, 17182871045, 0, 12568432, 17181466204, 0}, string_overlays =3D = {0, 17186823872, 17180927016, 17182871045, 2, 12569240, 17181950771= , 0, 12570112, 17182871008, 2992679347674122353, -5620449992977792767, 64, 0, 141772579, 0}, string =3D 12552128= , from_overlay =3D 12568496, stack =3D {{string =3D 17180937994, string_nchars =3D 26, end_charpos =3D 0, stop_charpos =3D 0, prev_stop =3D 0, base_level_stop =3D 12568560, cmp_it =3D { stop_pos =3D 12568952, id =3D 12568560, ch =3D 1763084, rule_idx =3D 2, lookback =3D 0, nglyphs =3D 12568592, reversed_p =3D false, charpos =3D 17180925455, nchars =3D 6= 954688, nbytes =3D 4, from =3D 1766404, to =3D 4, width =3D 2}, face_id =3D 12568952, u =3D {image =3D {object =3D 0, slice = =3D { x =3D 2294856, y =3D 142828480, width =3D 1, height =3D= 1}, image_id =3D 1}, stretch =3D {object =3D 0}, xwidget =3D = { object =3D 0}}, position =3D {charpos =3D 1, bytepos =3D = 257}, current =3D {pos =3D {charpos =3D 12568000, bytepos =3D 12568= 000}, overlay_string_index =3D 142828485, string_pos =3D { charpos =3D 16214, bytepos =3D 12}, dpvec_index =3D 74}, from_overlay =3D 12, area =3D 1056271, method =3D GET_FROM_IM= AGE, paragraph_embedding =3D (unknown: 6954688), multibyte_p =3D f= alse, string_from_display_prop_p =3D false, string_from_prefix_prop_p =3D true, display_ellipsis_p =3D fa= lse, avoid_cursor_p =3D false, bidi_p =3D false, from_disp_prop_p =3D false, line_wrap =3D (WINDOW_WRAP | unknown: 8), voffset =3D 0, space_width =3D 12568952, font_height =3D 0}, {string =3D 125= 68896, string_nchars =3D 1773229, end_charpos =3D 0, stop_charpos =3D 17189309397, prev_stop =3D 579833153792, base_level_stop =3D 1, cmp_it =3D {stop_pos =3D 1, id =3D 14, ch =3D 12568074, rule_idx =3D 12568000, lookback =3D 125679= 28, nglyphs =3D 12567904, reversed_p =3D false, charpos =3D 125= 68912, nchars =3D 14, nbytes =3D 0, from =3D 12568912, to =3D 1677= 7216, width =3D 3912664}, face_id =3D 3912581, u =3D {image =3D { object =3D 12569792, slice =3D {x =3D 17183781845, y =3D = 46, width =3D 12569056, height =3D 17181637421}, image_id =3D 17183781812}, stretch =3D {object =3D 125697= 92}, xwidget =3D {object =3D 12569792}}, position =3D { charpos =3D 17183781845, bytepos =3D 46}, current =3D {pos = =3D { charpos =3D 1030, bytepos =3D 1}, overlay_string_index =3D 12569800, string_pos =3D { charpos =3D 12569040, bytepos =3D 17180927237}, dpvec_index =3D 5}, from_overlay =3D 14, area =3D 12568440, method =3D GET_FROM_BUFFER, paragraph_embedding =3D (unknown: 12568440), multibyte_p =3D = false, string_from_display_prop_p =3D false, string_from_prefix_prop_p =3D false, display_ellipsis_p =3D f= alse, avoid_cursor_p =3D false, bidi_p =3D false, from_disp_prop_p =3D false, line_wrap =3D (unknown: 12569168)= , voffset =3D 0, space_width =3D 17183781760, font_height =3D 1= 030}, { string =3D 17180931301, string_nchars =3D 3912581, end_charpos =3D 2294352, stop_charpos =3D 17183782093, prev_stop =3D 26, base_level_stop =3D 12569232, cmp_it =3D { stop_pos =3D 17181635290, id =3D 128004720, ch =3D 1, rule_= idx =3D 1, lookback =3D 17180925455, nglyphs =3D 6971376, reversed_p = =3D 4, charpos =3D 0, nchars =3D 12569200, nbytes =3D 0, from =3D = 1056271, to =3D 4, width =3D 6954688}, face_id =3D 3912581, u =3D {i= mage =3D { object =3D 17179869482, slice =3D {x =3D 2294352, y =3D 1= 2569248, width =3D 17181632136, height =3D 0}, image_id =3D 1256= 9784}, stretch =3D {object =3D 17179869482}, xwidget =3D { object =3D 17179869482}}, position =3D {charpos =3D 14282= 8480, bytepos =3D 12569784}, current =3D {pos =3D {charpos =3D 12= 569392, bytepos =3D 17181633156}, overlay_string_index =3D 2, string_pos =3D {charpos =3D 12569784, bytepos =3D 12569328}= , dpvec_index =3D 1068810}, from_overlay =3D 2295024, area =3D LEFT_MARGIN_AREA, method =3D GET_FROM_BUFFER, paragraph_embedding =3D NEUTRAL_DIR, multibyte_p =3D false, string_from_display_prop_p =3D false, string_from_prefix_prop_p =3D false, display_ellipsis_p =3D f= alse, avoid_cursor_p =3D false, bidi_p =3D false, from_disp_prop_p =3D false, line_wrap =3D TRUNCATE, voffset = =3D 0, space_width =3D 12569392, font_height =3D 12569784}, { string =3D 12569392, string_nchars =3D 1763084, end_charpos = =3D 2, stop_charpos =3D 0, prev_stop =3D 12569424, base_level_stop =3D 17180925455, cmp_it =3D { stop_pos =3D 17186823872, id =3D 17181635588, ch =3D 2, rule_idx =3D 12569784, lookback =3D 12569568, nglyphs =3D 1= 246858, reversed_p =3D 4, charpos =3D 142828480, nchars =3D 1766106= , nbytes =3D 4, from =3D 12569520, to =3D 0, width =3D 0}, face_id =3D 12569536, u =3D {image =3D {object =3D 0, slice = =3D { x =3D 12569632, y =3D 17181641459, width =3D 142828485, height =3D 142828480}, image_id =3D 12569664}, stretch = =3D { object =3D 0}, xwidget =3D {object =3D 0}}, position =3D = { charpos =3D 0, bytepos =3D 12569584}, current =3D {pos =3D = { charpos =3D 17180925455, bytepos =3D 17186823872}, overlay_string_index =3D 10, string_pos =3D {charpos =3D 12= 569784, bytepos =3D 0}, dpvec_index =3D 12569728}, from_overlay =3D 17181642413, area =3D LEFT_MARGIN_AREA, method =3D GET_FROM_BUFFER, paragraph_embedding =3D L2R, multibyte_p =3D false, string_from_display_prop_p =3D false, string_from_prefix_prop_p =3D false, display_ellipsis_p =3D f= alse, avoid_cursor_p =3D false, bidi_p =3D false, from_disp_prop_p =3D false, line_wrap =3D (unknown: 12569664)= , voffset =3D 0, space_width =3D 17180926156, font_height =3D 145285235}, {string =3D 17181115979, string_nchars =3D 142828485, end_charpos =3D 145285235, stop_charpos =3D 12569808, prev_stop =3D 17181465465, base_level_stop =3D 145285235, cmp_it =3D {stop_pos =3D 0, id =3D 12569744, ch =3D 1056271, rule_idx =3D 17186823872, lookback =3D 17180926961, nglyphs =3D 3001861, reversed_p = =3D 4, charpos =3D 0, nchars =3D 12569888, nbytes =3D 0, from =3D = 1597020, to =3D 4, width =3D 0}, face_id =3D 0, u =3D {image =3D { object =3D 17186823872, slice =3D {x =3D 17180927016, y =3D 17182871045, width =3D 2, height =3D 12570696}, image_id =3D 17181950771}, stretch =3D {object =3D 171868= 23872}, xwidget =3D {object =3D 17186823872}}, position =3D {charpo= s =3D 0, bytepos =3D 12571552}, current =3D {pos =3D {charpos =3D 17= 182871008, bytepos =3D -8824482654938807040}, overlay_string_index =3D 2378394774681485375, string_pos = =3D { charpos =3D 145285235, bytepos =3D 0}, dpvec_index =3D 20= 66368}, from_overlay =3D 17182871045, area =3D 9449133, method =3D GET_FROM_IMAGE, paragraph_embedding =3D (unknown: 12570048), multibyte_p =3D = false, string_from_display_prop_p =3D false, string_from_prefix_prop_p =3D false, display_ellipsis_p =3D f= alse, avoid_cursor_p =3D false, bidi_p =3D false, from_disp_prop_p =3D false, line_wrap =3D (WINDOW_WRAP | unknown: 1766104), voffset =3D 4= , space_width =3D 26, font_height =3D 0}}, sp =3D 12570104, selective =3D 0, what =3D 12570096, face_id =3D 0, selective_display_ellipsis_p =3D false, ctl_arrow_p =3D false, face_box_p =3D false, start_of_box_run_p =3D true, end_of_box_run_p =3D false, overlay_strings_at_end_processed_p =3D false, ignore_overlay_strings_at_pos_p =3D true, glyph_not_available_p =3D true, starts_in_middle_of_char_p =3D tr= ue, face_before_selective_p =3D false, constrain_row_ascent_descent_p =3D false, line_wrap =3D TRUNCATE, base_face_id =3D 11, c =3D 0, len =3D 2, cmp_it =3D {stop_pos =3D= 0, id =3D 17186043925, ch =3D 12570048, rule_idx =3D 10, lookback =3D 12570936, nglyphs =3D 2081587, reversed_p =3D 4, charpos =3D 3, nchars =3D 12570096, nbytes =3D 0, from =3D 1257= 0112, to =3D 0, width =3D 1057777}, char_to_display =3D 12570112, glyphless_method =3D GLYPHLESS_DISPLAY_THIN_SPACE, image_id =3D 17180926851, xwidget =3D 0x4008ff2f0 , slice =3D { x =3D 141772563, y =3D 0, width =3D 488880, height =3D 0}, space_width =3D 198933024476414400, voffset =3D -30942, tab_width =3D 144, font_height =3D 1, object =3D 145775491, posit= ion =3D { charpos =3D 17182874605, bytepos =3D 50}, truncation_pixel_widt= h =3D 0, continuation_pixel_width =3D 0, first_visible_x =3D 0, last_visible_x =3D 12570320, last_visible_y =3D 0, extra_line_spacing =3D 1762026, max_extra_line_spacing =3D 4, override_ascent =3D 2, override_descent =3D 0, override_boff =3D 12570712, glyph_row =3D 0x8734713, area =3D 376= , nglyphs =3D 0, pixel_width =3D 6954688, ascent =3D 4, descent =3D= 6946944, max_ascent =3D 4, max_descent =3D 12570336, phys_ascent =3D 0, phys_descent =3D 1590270, max_phys_ascent =3D 4, max_phys_descent =3D 12570400, current_x =3D 0, continuation_lines_width =3D 1, eol_pos =3D {charpos =3D 12, bytepos =3D 16384}, current_y =3D 12570336, first_vpos =3D 0, vpos =3D 488880, hpos =3D 0, left_user_fringe_bitmap =3D 52547, right_user_fringe_bitmap =3D 2355, left_user_fringe_face_id =3D 0= , right_user_fringe_face_id =3D 22, bidi_p =3D false, bidi_it =3D { bytepos =3D 12570712, charpos =3D 17189318317, ch =3D 12570512, nchars =3D 17181635588, ch_len =3D 12749904, type =3D UNKNOWN_B= T, type_after_wn =3D UNKNOWN_BT, orig_type =3D 12570416, resolved_level =3D 0 '\000', isolate_level =3D 0 '\000', invalid_levels =3D 17180925455, invalid_isolates =3D 1718682387= 2, prev =3D {charpos =3D 17181515738, type =3D 130187789, orig_type =3D UNKNOWN_BT}, last_strong =3D {charpos =3D 0, type =3D 12570480, orig_type =3D UNKNOWN_BT}, next_for_neutra= l =3D { charpos =3D 0, type =3D 4294967295, orig_type =3D 2147483647}= , prev_for_neutral =3D {charpos =3D 0, type =3D UNKNOWN_BT, orig_type =3D 16777216}, next_for_ws =3D {charpos =3D 128, type =3D 12569880, orig_type =3D UNKNOWN_BT}, bracket_pairing_pos =3D 12569880, bracket_enclosed_type =3D 125= 70528, next_en_pos =3D 16358, next_en_type =3D WEAK_EN, sos =3D NEUTRA= L_DIR, scan_dir =3D 2, disp_pos =3D 1, disp_prop =3D 6, stack_idx =3D = 4, level_stack =3D {{next_for_neutral_pos =3D 12570672, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12570592, next_for_neutral_type =3D 5, last_strong_type =3D 4, prev_for_neutral_type =3D 4, level =3D 16 '\020', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 142828485, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12570720, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 579820584961= , next_for_neutral_type =3D 1, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 0, next_for_neutral_type =3D 3, last_strong_type =3D 1, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12569882, next_for_neutral_type =3D 0, last_strong_type =3D 3, prev_for_neutral_type =3D 4, level =3D 191 '=E2=96=92', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12569872, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 4, level =3D 191 '=E2=96=92', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12570720, next_for_neutral_type =3D 3, last_strong_type =3D 1, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 720575940504= 98656, next_for_neutral_type =3D 0, last_strong_type =3D 1, prev_for_neutral_type =3D 0, level =3D 45 '-', flags =3D 0 = '\000'}, {next_for_neutral_pos =3D 17182874605, next_for_neutral_type = =3D 0, last_strong_type =3D 4, prev_for_neutral_type =3D 6, level =3D 191 '=E2=96=92', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 17182871045, next_for_neutral_type =3D 2, last_strong_type =3D 1, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12570864, next_for_neutral_type =3D 5, last_strong_type =3D 5, prev_for_neutral_type =3D 4, level =3D 26 '\032', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 17182871012, next_for_neutral_type =3D 5, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 45 '-', flags =3D 0 = '\000'}, {next_for_neutral_pos =3D 10, next_for_neutral_type =3D 2, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 1, next_for_neutral_type =3D 0, last_strong_type =3D 4, prev_for_neutral_type =3D 6, level =3D 191 '=E2=96=92', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 12570848, next_for_neutral_type = =3D 5, last_strong_type =3D 0, prev_for_neutral_type =3D 4, level =3D 16 '\020', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 6, next_for_neutral_type =3D 3, last_strong_type =3D 1, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 17186823872, next_for_neutral_type =3D 3, last_strong_type =3D 2, prev_for_neutral_type =3D 5, level =3D 115 's', flags =3D 8= '\b'}, { next_for_neutral_pos =3D 12570976, next_for_neutral_type = =3D 0, last_strong_type =3D 5, prev_for_neutral_type =3D 7, level =3D 45 '-', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 514, next_for_neutral_type =3D 5, last_strong_type =3D 4, prev_for_neutral_type =3D 3, level =3D 16 '\020', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 17182874605, next_for_neutral_type =3D 3, last_strong_type =3D 4, prev_for_neutral_type =3D 1, level =3D 168 '=E2=96=92', fla= gs =3D 8 '\b'}, { next_for_neutral_pos =3D 0, next_for_neutral_type =3D 2, last_strong_type =3D 2, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 12571040, next_for_neutral_type = =3D 2, last_strong_type =3D 3, prev_for_neutral_type =3D 3, level =3D 26 '\032', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 128004600, next_for_neutral_type = =3D 1, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 1, next_for_neutral_type =3D 1, last_strong_type =3D 4, prev_for_neutral_type =3D 5, level =3D 120 'x', flags =3D 8 '\b'}, { next_for_neutral_pos =3D 145285219, next_for_neutral_type = =3D 0, last_strong_type =3D 6, prev_for_neutral_type =3D 6, level =3D 7 '\a', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 10, next_for_neutral_type =3D 1, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 0, next_for_neutral_type =3D 5, last_strong_type =3D 5, prev_for_neutral_type =3D 7, level =3D 45 '-', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 12571040, next_for_neutral_type = =3D 3, last_strong_type =3D 4, prev_for_neutral_type =3D 1, level =3D 168 '=E2=96=92', flags =3D 8 '\b'}, { next_for_neutral_pos =3D 12571152, next_for_neutral_type = =3D 2, last_strong_type =3D 5, prev_for_neutral_type =3D 3, level =3D 26 '\032', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 2, next_for_neutral_type =3D 0, last_strong_type =3D 3, prev_for_neutral_type =3D 6, level =3D 191 '=E2=96=92', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 12571088, next_for_neutral_type = =3D 5, last_strong_type =3D 1, prev_for_neutral_type =3D 0, level =3D 16 '\020', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 131325225775263212, next_for_neutral_type =3D 1, last_strong_type =3D 2, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 131325225775263212, next_for_neutral_type =3D 3, last_strong_type =3D 0, prev_for_neutral_type =3D 5, level =3D 115 's', flags =3D 8= '\b'}, { next_for_neutral_pos =3D 0, next_for_neutral_type =3D 1, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 10, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 12571168, next_for_neutral_type = =3D 0, last_strong_type =3D 6, prev_for_neutral_type =3D 6, level =3D 7 '\a', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 17186823872, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12571544, next_for_neutral_type =3D 5, last_strong_type =3D 5, prev_for_neutral_type =3D 2, level =3D 144 '\220', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12571344, next_for_neutral_type =3D 4, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 26 '\032', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 2, next_for_neutral_type =3D 0, last_strong_type =3D 3, prev_for_neutral_type =3D 6, level =3D 191 '=E2=96=92', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 0, next_for_neutral_type =3D 6, last_strong_type =3D 7, prev_for_neutral_type =3D 7, level =3D 39 '\'', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 0, next_for_neutral_type =3D 7, last_strong_type =3D 6, prev_for_neutral_type =3D 2, level =3D 39 '\'', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 1794720, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12571312, next_for_neutral_type =3D 5, last_strong_type =3D 0, prev_for_neutral_type =3D 4, level =3D 16 '\020', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 17186043920, next_for_neutral_type =3D 2, last_strong_type =3D 1, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12571328, next_for_neutral_type =3D 4, last_strong_type =3D 1, prev_for_neutral_type =3D 3, level =3D 16 '\020', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12571440, next_for_neutral_type =3D 0, last_strong_type =3D 2, prev_for_neutral_type =3D 0, level =3D 94 '^', flags =3D 0 = '\000'}, {next_for_neutral_pos =3D 12571360, next_for_neutral_type =3D= 4, last_strong_type =3D 5, prev_for_neutral_type =3D 3, level =3D 16 '\020', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 17186043925, next_for_neutral_type =3D 2, last_strong_type =3D 1, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12571544, next_for_neutral_type =3D 5, last_strong_type =3D 5, prev_for_neutral_type =3D 2, level =3D 144 '\220', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12571504, next_for_neutral_type =3D 2, last_strong_type =3D 3, prev_for_neutral_type =3D 3, level =3D 26 '\032', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 128004560, next_for_neutral_type =3D 2, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12571544, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12571552, next_for_neutral_type =3D 0, last_strong_type =3D 1, prev_for_neutral_type =3D 7, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 9, next_for_neutral_type =3D 2, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 0, next_for_neutral_type =3D 5, last_strong_type =3D 2, prev_for_neutral_type =3D 0, level =3D 94 '^', flags =3D 0 = '\000'}, {next_for_neutral_pos =3D 12571600, next_for_neutral_type =3D= 2, last_strong_type =3D 1, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 12572392, next_for_neutral_type = =3D 3, last_strong_type =3D 6, prev_for_neutral_type =3D 4, level =3D 31 '\037', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 3, next_for_neutral_type =3D 0, last_strong_type =3D 2, prev_for_neutral_type =3D 6, level =3D 191 '=E2=96=92', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 12571568, next_for_neutral_type = =3D 1, last_strong_type =3D 6, prev_for_neutral_type =3D 7, level =3D 16 '\020', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 12571568, next_for_neutral_type = =3D 3, last_strong_type =3D 4, prev_for_neutral_type =3D 1, level =3D 168 '=E2=96=92', flags =3D 8 '\b'}, {next_for_neu= tral_pos =3D 0, next_for_neutral_type =3D 0, last_strong_type =3D 6, prev_for_neutral_type =3D 6, level =3D 7 '\a', flags =3D 0 = '\000'}, {next_for_neutral_pos =3D 0, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 7, level =3D 2 '\002', flags =3D 34 '"'}, { next_for_neutral_pos =3D 34594, next_for_neutral_type =3D 7= , last_strong_type =3D 1, prev_for_neutral_type =3D 3, level =3D 31 '\037', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 17189318317, next_for_neutral_type =3D 0, last_strong_type =3D 1, prev_for_neutral_type =3D 7, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 2, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 50, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 17186823872, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 5, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 17182852876, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 145285219, next_for_neutral_type =3D 5, last_strong_type =3D 5, prev_for_neutral_type =3D 2, level =3D 27 '\033', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 0, next_for_neutral_type =3D 1, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 2, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 3, next_for_neutral_type =3D 5, last_strong_type =3D 4, prev_for_neutral_type =3D 0, level =3D 4 '\004', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 0, next_for_neutral_type =3D 5, last_strong_type =3D 0, prev_for_neutral_type =3D 7, level =3D 131 '=E2=96=92', fla= gs =3D 8 '\b'}, { next_for_neutral_pos =3D 0, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 20213088, next_for_neutral_type = =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 12571920, next_for_neutral_type = =3D 6, last_strong_type =3D 2, prev_for_neutral_type =3D 4, level =3D 4 '\004', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 5, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 17187299840, next_for_neutral_type =3D 0, last_strong_type =3D 2, prev_for_neutral_type =3D 5, level =3D 56 '8', flags =3D 9 = '\t'}, { next_for_neutral_pos =3D 12571872, next_for_neutral_type = =3D 4, last_strong_type =3D 7, prev_for_neutral_type =3D 0, level =3D 16 '\020', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 154669397, next_for_neutral_type = =3D 6, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 12571920, next_for_neutral_type = =3D 5, last_strong_type =3D 0, prev_for_neutral_type =3D 4, level =3D 16 '\020', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 12571920, next_for_neutral_type = =3D 0, last_strong_type =3D 5, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 12571936, next_for_neutral_type = =3D 7, last_strong_type =3D 1, prev_for_neutral_type =3D 0, level =3D 16 '\020', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 17186871528, next_for_neutral_type =3D 0, last_strong_type =3D 1, prev_for_neutral_type =3D 7, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 154669397, next_for_neutral_type =3D 2, last_strong_type =3D 1, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12572080, next_for_neutral_type =3D 7, last_strong_type =3D 2, prev_for_neutral_type =3D 5, level =3D 32 ' ', flags =3D 0 = '\000'}, {next_for_neutral_pos =3D 851, next_for_neutral_type =3D 6, last_strong_type =3D 7, prev_for_neutral_type =3D 7, level =3D 39 '\'', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 12572016, next_for_neutral_type = =3D 3, last_strong_type =3D 1, prev_for_neutral_type =3D 3, level =3D 32 ' ', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 1023, next_for_neutral_type =3D 0, last_strong_type =3D 6, prev_for_neutral_type =3D 3, level =3D 191 '=E2=96=92', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 10, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 12572192, next_for_neutral_type = =3D 6, last_strong_type =3D 2, prev_for_neutral_type =3D 3, level =3D 26 '\032', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 154669397, next_for_neutral_type = =3D 0, last_strong_type =3D 4, prev_for_neutral_type =3D 4, level =3D 94 '^', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 12572096, next_for_neutral_type = =3D 4, last_strong_type =3D 5, prev_for_neutral_type =3D 3, level =3D 16 '\020', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 17186049829, next_for_neutral_type =3D 0, last_strong_type =3D 2, prev_for_neutral_type =3D 5, level =3D 191 '=E2=96=92', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12572272, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12572160, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12572160, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 9223372036854775807, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 720576112177= 97120, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 2, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12571560, next_for_neutral_type =3D 0, last_strong_type =3D 5, prev_for_neutral_type =3D 6, level =3D 191 '=E2=96=92', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12572320, next_for_neutral_type =3D 7, last_strong_type =3D 1, prev_for_neutral_type =3D 7, level =3D 24 '\030', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 17186406304, next_for_neutral_type =3D 2, last_strong_type =3D 1, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 4, next_for_neutral_type =3D 0, last_strong_type =3D 1, prev_for_neutral_type =3D 7, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12572320, next_for_neutral_type =3D 5, last_strong_type =3D 2, prev_for_neutral_type =3D 7, level =3D 27 '\033', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 0, next_for_neutral_type =3D 3, last_strong_type =3D 4, prev_for_neutral_type =3D 2, level =3D 232 '=E2=96=92', fla= gs =3D 7 '\a'}, { next_for_neutral_pos =3D 131854557, next_for_neutral_type = =3D 0, last_strong_type =3D 1, prev_for_neutral_type =3D 6, level =3D 6 '\006', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 132654211, next_for_neutral_type = =3D 0, last_strong_type =3D 4, prev_for_neutral_type =3D 3, level =3D 0 '\000', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 12572336, next_for_neutral_type = =3D 3, last_strong_type =3D 2, prev_for_neutral_type =3D 5, level =3D 16 '\020', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 17186406304, next_for_neutral_type =3D 6, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 0, next_for_neutral_type =3D 0, last_strong_type =3D 4, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12572480, next_for_neutral_type =3D 2, last_strong_type =3D 1, prev_for_neutral_type =3D 6, level =3D 25 '\031', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 17186406304, next_for_neutral_type =3D 1, last_strong_type =3D 1, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 142828480, next_for_neutral_type =3D 0, last_strong_type =3D 6, prev_for_neutral_type =3D 2, level =3D 144 '\220', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 17189318357, next_for_neutral_type =3D 0, last_strong_type =3D 1, prev_for_neutral_type =3D 3, level =3D 191 '=E2=96=92', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 17186406304, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 7, level =3D 131 '=E2=96=92', fla= gs =3D 8 '\b'}, { next_for_neutral_pos =3D 12572464, next_for_neutral_type = =3D 7, last_strong_type =3D 1, prev_for_neutral_type =3D 0, level =3D 16 '\020', flags =3D 0 '\000'}, { next_for_neutral_pos =3D 17186823872, next_for_neutral_type =3D 0, last_strong_type =3D 2, prev_for_neutral_type =3D 5, level =3D 106 'j', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 18, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12572608, next_for_neutral_type =3D 3, last_strong_type =3D 3, prev_for_neutral_type =3D 4, level =3D 25 '\031', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 33936, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 0, next_for_neutral_type =3D 2, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 12572656, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 17186406304, next_for_neutral_type =3D 0, last_strong_type =3D 2, prev_for_neutral_type =3D 3, level =3D 144 '\220', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 514, next_for_neutral_type =3D 0, last_strong_type =3D 2, prev_for_neutral_type =3D 5, level =3D 106 'j', flags =3D 0 '\000'}, {next_for_neutral_pos =3D 17189318357, next_for_neutral_type =3D 0, last_strong_type =3D 0, prev_for_neutral_type =3D 0, level =3D 0 '\000', flags =3D 0 '\000'}}, string =3D {lstring =3D 12572720, s =3D 0x4001b0c04 "=E2=96=92mH=E2=96=92M=E2=96=92=E2=96=92\t=E2=96=92=E2=96=92=E2=96=92H=E2= =96=92E=E2=96=92H=E2=96=92M=E2=96=92=E2=96=92O=E2=96=92=E2=96=92=E2=96=92H= =E2=96=92E=E2=96=92H=E2=96=92M=E2=96=92=E2=96=92\025=E2=96=92=E2=96=92=E2= =96=92H=E2=96=92E=E2=96=92H=E2=96=92U=E2=96=92H=E2=96=92E=E2=96=92H=E2=96= =92=E2=96=92=E2=96=92^\n=E2=96=92=E2=96=92H=E2=96=92=C3=B9", schars =3D 33936, bufpos =3D 0, from_disp_str =3D false, unibyte =3D true}, w =3D 0x0, paragraph_dir =3D (unknown: 12572672), separator_limit =3D 17180925455, first_elt =3D false, new_paragraph =3D false, frame_window_p =3D false}, paragraph_embedding =3D (unknown: 33936)} current_matrix_up_to_date_p =3D true used_current_matrix_p =3D true buffer_unchanged_p =3D true temp_scroll_step =3D false count =3D 6 rc =3D 0 centering_position =3D -1 last_line_misfit =3D false beg_unchanged =3D 293 end_unchanged =3D 82 frame_line_height =3D 18 margin =3D 0 use_desired_matrix =3D false itdata =3D 0x0 #7 0x00000004000483bc in redisplay_window_1 (window=3D20233653) at ../../repo/src/xdisp.c:14590 No locals. #8 0x00000004001abd2c in internal_condition_case_1 ( bfun=3D0x40004837d , arg=3D20233653, handlers=3D17187099827, hfun=3D0x4000482f2 ) at ../../repo/src/eval.c:1348 val =3D 2 c =3D 0xc231d0 #9 0x0000000400047595 in redisplay_internal () at ../../repo/src/xdisp.c:14162 mini_window =3D 0 mini_frame =3D 0x8a8e033 w =3D 0x134bdb0 sw =3D 0x134bdb0 fr =3D 0x400a51890 pending =3D false must_finish =3D false match_p =3D true tlbufpos =3D {charpos =3D 0, bytepos =3D 376} tlendpos =3D {charpos =3D 0, bytepos =3D 0} number_of_visible_frames =3D 2 count =3D 3 sf =3D 0x400a51890 polling_stopped_here =3D false tail =3D 0 frame =3D 17190688917 hscroll_retries =3D 0 consider_all_windows_p =3D false update_miniwindow_p =3D false #10 0x0000000400044ff0 in redisplay () at ../../repo/src/xdisp.c:13296 No locals. #11 0x000000040010e39d in read_char (commandflag=3D1, map=3D141772755, prev_event=3D0, used_mouse_menu=3D0xbff2df, end_time=3D0x0) at ../../repo/src/keyboard.c:2482 echo_current =3D true c =3D 0 jmpcount =3D 12579440 local_getcjmp =3D {{Part =3D {12578944, 17181506602}}, {Part =3D { 142828485, 0}}, {Part =3D {12578960, 17180925455}}, {Part =3D= { 17186823872, 17180925455}}, {Part =3D {0, 32}}, {Part =3D { 12579024, 0}}, {Part =3D {12579024, 17180925455}}, {Part =3D = { 17186823872, 0}}, {Part =3D {17189119392, 0}}, {Part =3D {125= 79072, 17180925455}}, {Part =3D {17186823872, 57288}}, {Part =3D { 12579104, 17180926156}}, {Part =3D {12579216, 17181642413}}, = { Part =3D {0, 141772739}}, {Part =3D {12579248, 17181465465}}, { Part =3D {141772739, 0}}} save_jump =3D {{Part =3D {12579416, 0}}, {Part =3D {12578512, 12579= 416}}, { Part =3D {32, 1794720}}, {Part =3D {1, 8}}, {Part =3D {0, 0}}, = {Part =3D { 12578768, 17180927237}}, {Part =3D {142828480, 6}}, {Part =3D= {0, 0}}, {Part =3D {0, 142828480}}, {Part =3D {12578816, 17180937= 994}}, {Part =3D {142828485, 6}}, {Part =3D {0, 352}}, {Part =3D {142828= 480, 0}}, {Part =3D {12578880, 17180925455}}, {Part =3D {171868238= 72, 0}}, {Part =3D {0, 0}}} tem =3D 141772755 save =3D 12579328 previous_echo_area_message =3D 0 also_record =3D 0 reread =3D false recorded =3D false polling_stopped_here =3D false orig_kboard =3D 0xc20730 #12 0x000000040011b9e7 in read_key_sequence (keybuf=3D0xbff4d0, bufsize=3D3= 0, prompt=3D0, dont_downcase_last=3Dfalse, can_return_switch_frame=3Dtrue, fix_current_buffer=3Dtrue, prevent_redisplay=3Dfalse) at ../../repo/src/keyboard.c:9109 interrupted_kboard =3D 0xc20730 interrupted_frame =3D 0x400a51890 key =3D 142828485 used_mouse_menu =3D false echo_local_start =3D 0 last_real_key_start =3D 0 keys_local_start =3D 0 new_binding =3D 0 count =3D 3 t =3D 0 echo_start =3D 0 keys_start =3D 0 current_binding =3D 141772755 first_event =3D 0 first_unbound =3D 31 mock_input =3D 0 fkey =3D {parent =3D 17188032995, map =3D 17188032995, start =3D 0,= end =3D 0} keytran =3D {parent =3D 17187111491, map =3D 17187111491, start =3D= 0, end =3D 0} indec =3D {parent =3D 17188033011, map =3D 17188033011, start =3D 0= , end =3D 0} shift_translated =3D false delayed_switch_frame =3D 0 original_uppercase =3D 0 original_uppercase_position =3D -1 dummyflag =3D false starting_buffer =3D 0x88363c0 fake_prefixed_keys =3D 0 #13 0x000000040010ba20 in command_loop_1 () at ../../repo/src/keyboard.c:13= 70 cmd =3D 488880 keybuf =3D {6271840, 323168, 3, 3, 0, 17182753269, 12580120, 0, 12580192, 17181633637, 4, 0, 12580192, 17180925455, 17186823872, 145721507, 17182765764, 0, 12580336, 0, 12580256, 17180925455, 17186823872, 0, 0, 2, 12580320, 17181622259, 0, 12580304} i =3D 1 prev_modiff =3D 199 prev_buffer =3D 0x88363c0 already_adjusted =3D false #14 0x00000004001abc72 in internal_condition_case ( bfun=3D0x40010b543 , handlers=3D23240, hfun=3D0x40010ab4b ) at ../../repo/src/eval.c:1324 val =3D 149236180 c =3D 0xc23060 #15 0x000000040010b1d9 in command_loop_2 (ignore=3D0) at ../../repo/src/keyboard.c:1112 val =3D 2 #16 0x00000004001ab553 in internal_catch (tag=3D59584, func=3D0x40010b1a7 , arg=3D0) at ../../repo/src/eval.c:= 1091 val =3D 0 c =3D 0xc22ef0 #17 0x000000040010b12a in command_loop () at ../../repo/src/keyboard.c:1091 No locals. #18 0x0000000000000000 in ?? () No symbol table info available. Backtrace stopped: previous frame inner to this frame (corrupt stack?) In GNU Emacs 26.0.50 (build 1, x86_64-w64-mingw32) of 2017-02-23 built on DESKTOP-BFQ4DH1 Repository revision: 16efea3a883ebf633946ee9b9d0681eb55437878 Windowing system distributor 'Microsoft Corp.', version 10.0.14393 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --prefix=3D/mingw64 --with-modules --enable-locallisppath=3D/c/emacs/site-lisp CPPFLAGS=3D-D_WIN32_WINNT=3D_WIN32_WINNT_WIN7 'CFLAGS=3D-O0 -g -ggdb'' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND DBUS NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS MODULES Important settings: value of $LANG: ENG locale-coding-system: cp1252 From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 25 14:42:03 2017 Received: (at 25875) by debbugs.gnu.org; 25 Feb 2017 19:42:03 +0000 Received: from localhost ([127.0.0.1]:56041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chiEF-0000NN-79 for submit@debbugs.gnu.org; Sat, 25 Feb 2017 14:42:03 -0500 Received: from mail-vk0-f47.google.com ([209.85.213.47]:36583) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chiED-0000Mt-Us for 25875@debbugs.gnu.org; Sat, 25 Feb 2017 14:42:02 -0500 Received: by mail-vk0-f47.google.com with SMTP id t8so26799612vke.3 for <25875@debbugs.gnu.org>; Sat, 25 Feb 2017 11:42:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=c5jY9buTUqAc8WljIOpER9xaR1lEQfew9qSOjsrB5d8=; b=dFvdxCgLnHkNZksmpwOA0xBnucQEX8Dx+eYZRNH+3Evfk1H8qT40xsKvrJmKrRaRRu EhP7GO+xD2O3hXITaenJSryy9oIi+zTvRzFMNJLrsfOWU5otCQcfi6cx8xsyjBj+YxL7 Y9eUGs4yKTNuJIUoJp05PyNZZUPPzbugX7kRbaiKrwEKlu6FunNXCuOMBQNM94Js9MBF euRVFHgxyjTltWdnwq/t6j3rgHIXvJRsB6jYzeJgSXvUX3CoCtT4RVfsZU7sPGp3iuaw GU2jWASTFDi72frneVtXA6VL4uH5/Iw9coN8c8F8BgvhiTbIyNnk4elgddDO0xWy7bpr Jvmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=c5jY9buTUqAc8WljIOpER9xaR1lEQfew9qSOjsrB5d8=; b=BZMFpfmXVQ+6RpShRy2RqwJr+OYqZqIAcO6kvHzDQZERzGM+rqw1RUO0msjD3pwya3 uNYyjwwjx1UhMFLOpk9joF6lHrcDu53qn7gUGMwfk+3RP8cnwip/0Uh62Mk1E6D3aWS9 O9vTx1Z+/XABefiw0dRZL6eQMZQdvzaKt+Q45tQhYihG3Y5PgDArq0+Wv98DZC+t87Ok M16IkY3iXcyw9A7jyYk88n7SGdI/wN08Rm0PzUFqcbenAHolzQuzDcyLnbO1S6Ia5laj DC5fzRHoPVznDT8r/5T8zPQTWhS9wiJrFZcszp5+LjprC16e7qcVj/s6BDIV+H0spVdL s4Yw== X-Gm-Message-State: AMke39ljxp9/tTznwhA/IgRAyN5L2QVH0AtVZZbcAW7mtBQhla29fP4nU9ke0rqKtyho3L6OIOWWf6iztU0fVQ== X-Received: by 10.31.93.66 with SMTP id r63mr3992454vkb.126.1488051716196; Sat, 25 Feb 2017 11:41:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.159.37.33 with HTTP; Sat, 25 Feb 2017 11:41:25 -0800 (PST) From: Richard Copley Date: Sat, 25 Feb 2017 19:41:25 +0000 Message-ID: Subject: Re: 26.0.50; Hang logging out of MS-Windows To: 25875@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: 25875 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) Perhaps not a deadlock: I just ran "taskkill /im emacs.exe" and the process woke up and signaled a Lisp error: Debugger entered--Lisp error: (error "Attempt to delete a surrogate minibuffer frame") delete-frame(# t) handle-delete-frame((delete-frame (#))) dframe-handle-delete-frame((delete-frame (#))) funcall-interactively(dframe-handle-delete-frame (delete-frame (#))) call-interactively(dframe-handle-delete-frame nil [(delete-frame (#))]) command-execute(dframe-handle-delete-frame nil [(delete-frame (#))] t) From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 25 15:34:12 2017 Received: (at 25875) by debbugs.gnu.org; 25 Feb 2017 20:34:13 +0000 Received: from localhost ([127.0.0.1]:56060 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chj2i-0003MC-NZ for submit@debbugs.gnu.org; Sat, 25 Feb 2017 15:34:12 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50899) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chj2g-0003Lx-TH for 25875@debbugs.gnu.org; Sat, 25 Feb 2017 15:34:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1chj2X-000812-Mv for 25875@debbugs.gnu.org; Sat, 25 Feb 2017 15:34:04 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chj2X-00080y-K6; Sat, 25 Feb 2017 15:34:01 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1398 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1chj2U-00024v-PJ; Sat, 25 Feb 2017 15:34:01 -0500 Date: Sat, 25 Feb 2017 22:33:20 +0200 Message-Id: <83lgsuqacv.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley In-reply-to: (message from Richard Copley on Sat, 25 Feb 2017 19:35:28 +0000) Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > 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? > (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. > 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? > 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? From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 25 15:36:57 2017 Received: (at 25875) by debbugs.gnu.org; 25 Feb 2017 20:36:57 +0000 Received: from localhost ([127.0.0.1]:56064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chj5N-0003Q8-5T for submit@debbugs.gnu.org; Sat, 25 Feb 2017 15:36:57 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chj5L-0003Pw-G0 for 25875@debbugs.gnu.org; Sat, 25 Feb 2017 15:36:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1chj5D-0000Ww-9O for 25875@debbugs.gnu.org; Sat, 25 Feb 2017 15:36:50 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57932) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chj5D-0000Wq-66; Sat, 25 Feb 2017 15:36:47 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1399 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1chj5B-0007zF-2c; Sat, 25 Feb 2017 15:36:46 -0500 Date: Sat, 25 Feb 2017 22:36:13 +0200 Message-Id: <83k28eqa82.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley In-reply-to: (message from Richard Copley on Sat, 25 Feb 2017 19:41:25 +0000) Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Richard Copley > Date: Sat, 25 Feb 2017 19:41:25 +0000 > > Perhaps not a deadlock: I just ran "taskkill /im emacs.exe" and the > process woke up > and signaled a Lisp error: > > Debugger entered--Lisp error: (error "Attempt to delete a surrogate > minibuffer frame") > delete-frame(# 0000000400a51890> t) Is this indeed a surrogate minibuffer frame? If so, how come it's being deleted? From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 25 16:08:30 2017 Received: (at 25875) by debbugs.gnu.org; 25 Feb 2017 21:08:30 +0000 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 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 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) MIME-Version: 1.0 Received: by 10.159.37.33 with HTTP; Sat, 25 Feb 2017 13:07:51 -0800 (PST) In-Reply-To: <83lgsuqacv.fsf@gnu.org> References: <83lgsuqacv.fsf@gnu.org> From: Richard Copley Date: Sat, 25 Feb 2017 21:07:51 +0000 Message-ID: Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) 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.] From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 25 16:14:34 2017 Received: (at 25875) by debbugs.gnu.org; 25 Feb 2017 21:14:35 +0000 Received: from localhost ([127.0.0.1]:56084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chjfm-0004M4-Ne for submit@debbugs.gnu.org; Sat, 25 Feb 2017 16:14:34 -0500 Received: from mail-ua0-f170.google.com ([209.85.217.170]:34532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chjfl-0004Lp-HY for 25875@debbugs.gnu.org; Sat, 25 Feb 2017 16:14:33 -0500 Received: by mail-ua0-f170.google.com with SMTP id 79so18944260uaq.1 for <25875@debbugs.gnu.org>; Sat, 25 Feb 2017 13:14:33 -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=/un9JWtm7Y/TG0b7ojRPtN5ctWRV98qFXTnZR3NyBwE=; b=vYPqoBjL+eL2i4aIShPQbPeI2f5LXAtJb6rh9m3Z6E5oIYB0fl+WNpUGAi+E6kt2RC 17Jw1OS/ESOYJae8KxCJqVC8vyL0vOUrDcmU1943HeaKk7P9drjuaRBpdZIlip/CkitD h/OtJPc83Bllb7Lb5dD4yvYDJtRwGrhuacRtDIG7c+8GrIyE6KcUht8K1px34hpqE26N +eVqXUcK3cDcTYXHvYHDxOu+VY11ch+lFSs0C8yUcXYghfBHG87PzsX3DiE+KPpckWOe HlMNGN2eX7Q6bnEopLa3HWc+0mb9wrAN+db8m4EkH983h2/0hMCYMQWVbaE6b4SsNdr/ yIYg== 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=/un9JWtm7Y/TG0b7ojRPtN5ctWRV98qFXTnZR3NyBwE=; b=MuX4aDLjyKVbMscy1DoP1IPDI2gAfNhTP8hZWStKwuC9RpoOKy0g8rYelYXlNvHqf9 sitd3yXiR5fnc2w5ElsX2hjUQiaDhEUYqVCwZrvwJljEMk/ovl7k8sVnpH2OOkWZzbO4 ms27Pvwflup+OJV3KQJgS0gTpCu0DUxAajfNH/ovFlynt20HPCDwJu57OGAruFYKJL1i srERFyeFLZg47DNDMgMBvQbIXDX051Sck1I2s3l/fq6a5DwneWnBDAYJb2lgrnkZIU8z cDN2moXJ0/fpUwOeACcePrpqF/+PPcPIpRnz2F6odusvB4vQxnMXoeRPAbbvCxliuClF 9Pxw== X-Gm-Message-State: AMke39ltQaIVIX7P/LFW8g3IX7C9FYQnlicde+GtZvYPmxmi0w3+rWha9VDZ9cvbr9lgN8Fq1Nvk2AMmD+6XcA== X-Received: by 10.159.56.193 with SMTP id w1mr4578991uaf.72.1488057268066; Sat, 25 Feb 2017 13:14:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.159.37.33 with HTTP; Sat, 25 Feb 2017 13:13:57 -0800 (PST) In-Reply-To: <83k28eqa82.fsf@gnu.org> References: <83k28eqa82.fsf@gnu.org> From: Richard Copley Date: Sat, 25 Feb 2017 21:13:57 +0000 Message-ID: Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 25 February 2017 at 20:36, Eli Zaretskii wrote: >> From: Richard Copley >> Date: Sat, 25 Feb 2017 19:41:25 +0000 >> >> Perhaps not a deadlock: I just ran "taskkill /im emacs.exe" and the >> process woke up >> and signaled a Lisp error: >> >> Debugger entered--Lisp error: (error "Attempt to delete a surrogate >> minibuffer frame") >> delete-frame(#> 0000000400a51890> t) > > Is this indeed a surrogate minibuffer frame? If so, how come it's > being deleted? An Ediff control-panel was present. The main frame was the surrogate minibuffer frame for the minibufferless Ediff frame. In that situation, clicking the close button on the main frame gives that same error. I surmise that WM_QUERY_END_SESSION goes down the same code path (?). From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 25 16:31:33 2017 Received: (at 25875) by debbugs.gnu.org; 25 Feb 2017 21:31:33 +0000 Received: from localhost ([127.0.0.1]:56089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chjwD-0004mA-6A for submit@debbugs.gnu.org; Sat, 25 Feb 2017 16:31:33 -0500 Received: from mail-vk0-f41.google.com ([209.85.213.41]:35084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chjwB-0004lv-4h for 25875@debbugs.gnu.org; Sat, 25 Feb 2017 16:31:31 -0500 Received: by mail-vk0-f41.google.com with SMTP id x75so27404799vke.2 for <25875@debbugs.gnu.org>; Sat, 25 Feb 2017 13:31:31 -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=nJf4Uwd4cboqAJy8AcCwT0Px8QRFQMc6WfCkeZuNCFQ=; b=V4udoQOoSPwNIadtjVJs05+oMVJrSCE6GXkLyFZwLF4qiZlbDPvWAOriCv4+qERh8l 1cK1HAhQ74DzmxOsnEdmWtbxAz3DHDVQtD/me5o+poXZAf71Tvfc8LJe87kPRxfrODaK ZCqFhmT0j6V7FPS6eGSs6uPnfmGaWypgSiLLpE9kxJRi/Hm/vjX1SaOaZz3u37D5vB9t JPTjOYml3/sHKXND2vvyzD4cuvdraobkbKp8gOTvVzN9v0Oid3sE8Cu0+Rjw4u2WwMf/ VOdrqEpWGk9IvJj0zfUoXhQjpOtDMuND7Gee4DdCb1zibCHMxvTkSgB4jg4hRljb85gW k6mw== 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=nJf4Uwd4cboqAJy8AcCwT0Px8QRFQMc6WfCkeZuNCFQ=; b=IjiAf0DDNJseUVycokcZEMwzSMKu0mzVWN3DSeBEZsCUyK8UPFyCzb+Cb8/z7is6ce DZWAFxDwOePsH1ceQCwUkWwEKLH0H0324ZBSwH5BNyw4C+TvkM+qhaP5hr8Q3qv+pz5k /GvhW3iRYgFZVGTSr1b/HNH/ri+WFfOb7X6iUDoCwf16U2vdTojPKfj9TIoNM0AyCbiN HfoR+WL3JmDiE5XD+ENGMMIW63EO4LxKB/DLgGPsZ2ou1wsZG6XaGTxRfAHR3SKP10+c Kg7aLOcce+FBgZyWZsbAbfaLpwwrfr3zf2E3WxgpcjxQCDX499i6nejlDncnxJyspxa+ vzWg== X-Gm-Message-State: AMke39mRWd7os09Ml7R9sYyphAse8YZuMja+wxPWUpE4XQidMq3nFQE9Mqiv+RFilZ4M9yDVUwIgHU6oRjlvWw== X-Received: by 10.31.248.142 with SMTP id w136mr3349886vkh.140.1488058285590; Sat, 25 Feb 2017 13:31:25 -0800 (PST) MIME-Version: 1.0 Received: by 10.159.37.33 with HTTP; Sat, 25 Feb 2017 13:30:55 -0800 (PST) In-Reply-To: References: <83lgsuqacv.fsf@gnu.org> From: Richard Copley Date: Sat, 25 Feb 2017 21:30:55 +0000 Message-ID: Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) >>> 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.] Hmm, that doesn't make much sense, does it? I only need those flags in addpm.c, not for the rest of Emacs. Perhaps it's left over from another experiment. I've taken it out of my build script, but I haven't rebuilt because current master doesn't build from pristine: + ./autogen.sh Checking whether you have the necessary tools... (Read INSTALL.REPO for more details on building Emacs) Checking for autoconf (need at least version 2.65) ... ok Checking for automake (need at least version 1.11) ... ok Your system has the required tools. Inferring nt/gnulib.mk from lib/gnulib.mk ... Running 'autoreconf -fi -I m4' ... aclocal-1.15: error: aclocal: file '/msys64/usr/share/aclocal/xsize.m4' does not exist autoreconf: aclocal failed with exit status: 1 From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 25 16:37:47 2017 Received: (at 25875) by debbugs.gnu.org; 25 Feb 2017 21:37:47 +0000 Received: from localhost ([127.0.0.1]:56093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chk2E-0004v8-U9 for submit@debbugs.gnu.org; Sat, 25 Feb 2017 16:37:47 -0500 Received: from mail-ua0-f169.google.com ([209.85.217.169]:36755) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chk2D-0004ux-TH for 25875@debbugs.gnu.org; Sat, 25 Feb 2017 16:37:46 -0500 Received: by mail-ua0-f169.google.com with SMTP id 72so8088717uaf.3 for <25875@debbugs.gnu.org>; Sat, 25 Feb 2017 13:37:45 -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=Xz2VlX9exbV6sFn9aXn+DhGtTkjgwUnOjkS2RhPATJc=; b=Fdc3RuIq2wkiqH/be5tghzQsOmaQa2hNPn6LnxfqIOCz4Rngcg7fHLCs0mYDx1ULpu eWBVrPDc/RSAbir+7X7khB3Y00jgr47cBLfhHre055jpGJv7Nxvsi2Cp2zO7l5ZWy4g2 YH4OP7AOeM1EY54aQOVcb8nVrsntjHFzvVjyR0amCqvI1s/n15E3u1HxGLgvNmB2kV5Z MU2yKJYZr6yZNMAqWP2csFGWqkxVZMnsCQQF9PVj2+LZQt1aOfQmd5AmE62GXju8m9AA CQ+1lsXanVhx8PwiZrvNS4JQO9ngzpeAqTQzKMcKyT1Bo3nL73RaWq4GWTB7NBTHsjmj pcRA== 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=Xz2VlX9exbV6sFn9aXn+DhGtTkjgwUnOjkS2RhPATJc=; b=J/rF6TKGb7T00YXh71DYIic3UOaTvs9t3GmJOSMXq5Lotti6nleJH9SuhKZWtyXPn0 WZJKpX0WC42Brjm4YvEnoku+qGLLE0uJNyi190WH8XwN+iwTIsFaQGEViUm0dlRejWNk uAJ6PC9uEhdb0xb2JNb03wJVJwdrMvwLezZ+YxID//NUmO1eKdHY0HZDmOLh2e44gXAY gvMdc98c/OXBBq/glrRGPLdgHBYvDIlO5jNt8ysKw5y1VyZIKv888Vz2vfeYynUpFNpC YbCWGSqOlv8n/p4YosWz5btULITdb5Aiv8T5nTzmiihj0SnTQwewG7alsQVJ0V1bmB29 HXXw== X-Gm-Message-State: AMke39kEHKs+n7vyxWA43jE05xIX2aVD/5umohVPCe48ZEuDWTUQx830QSkz67//shNnDNj7AZcb8tlsStlCZg== X-Received: by 10.176.64.129 with SMTP id i1mr3404478uad.7.1488058660467; Sat, 25 Feb 2017 13:37:40 -0800 (PST) MIME-Version: 1.0 Received: by 10.159.37.33 with HTTP; Sat, 25 Feb 2017 13:37:10 -0800 (PST) In-Reply-To: References: <83lgsuqacv.fsf@gnu.org> From: Richard Copley Date: Sat, 25 Feb 2017 21:37:10 +0000 Message-ID: Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 25 February 2017 at 21:30, Richard Copley wrote: >>>> 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.] > > Hmm, that doesn't make much sense, does it? I only need those > flags in addpm.c, not for the rest of Emacs. Perhaps it's left over > from another experiment. I've taken it out of my build script, but > I haven't rebuilt because current master doesn't build from pristine: > > + ./autogen.sh > Checking whether you have the necessary tools... > (Read INSTALL.REPO for more details on building Emacs) > Checking for autoconf (need at least version 2.65) ... ok > Checking for automake (need at least version 1.11) ... ok > Your system has the required tools. > Inferring nt/gnulib.mk from lib/gnulib.mk ... > Running 'autoreconf -fi -I m4' ... > aclocal-1.15: error: aclocal: file > '/msys64/usr/share/aclocal/xsize.m4' does not exist > autoreconf: aclocal failed with exit status: 1 Please ignore that -- not sure what I did differently, but the build is running fine now. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 25 17:02:55 2017 Received: (at 25875) by debbugs.gnu.org; 25 Feb 2017 22:02:55 +0000 Received: from localhost ([127.0.0.1]:56097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chkQZ-0005WT-1Q for submit@debbugs.gnu.org; Sat, 25 Feb 2017 17:02:55 -0500 Received: from mail-ua0-f176.google.com ([209.85.217.176]:35454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chkQX-0005WF-Er for 25875@debbugs.gnu.org; Sat, 25 Feb 2017 17:02:53 -0500 Received: by mail-ua0-f176.google.com with SMTP id 40so29973906uau.2 for <25875@debbugs.gnu.org>; Sat, 25 Feb 2017 14:02:53 -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=lDbmci8/4YOUq9Dm6S6co29SyOmtwANuz8Lo/DjodGE=; b=PT+BSTzDG/lB+WGBEgbzi5cVmbXuFwYwBiqN4jO6DaYHJqPNjVI7LsMkgeY55yR+vS ntv7Q/BH2h9Wm/rG4PTQfjTF5+VgsfXTMkx5XVwpgiLosuqUTrF7o9ievemXxLuaS6O+ ee7aJs4GnRcE4sJICcm9+dvdb3Wj5GghV60kx05/S0RFkMOcFPKFvOOXi5E90jlQqgXn Zandbgt89+ihlv3EjKK93Ks4A7pIk+5QN5c2mxraMly9y9QLOUMF1ojGHNpmBDma79zr gtA0LsO853L7YMuOkooa1kSoLy/KIng/oOhmr7k/oSlKb43OnEWS89ZYGqaEKVSlrF7X KMvA== 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=lDbmci8/4YOUq9Dm6S6co29SyOmtwANuz8Lo/DjodGE=; b=lb7+IAPTQBMxfJnltKpeH43aVYuhgIG3zRZloBmBevrNVgJYEGk+BsSL92DdkBAwpl YzU0zEjUJlPezoI27KPBUvBlLZ+G7MfftIRYkrFtsmbSWfTtA7+6tNrJFJLbGFylQC5O P4QGeFUlLcdIwqgvTSXhRAlLAAZEb/FXm3uLbikAoCCwbbeBQ0rdC/2mReAbBPsBgLoc /0smUOAr7J94QIuZBZ+jJFnFV0KLY4NMWOhQL2cWaOw4hsF41Wjk/J7LZYMfQUDxr2Oz k00UcUH6ub7E4PyD8iBCl1mQVjZIxBIEtAKwwCMpz85/QXdD68fOkqtbcRcWTTHxGvvb //LA== X-Gm-Message-State: AMke39mK/2wpayim/C0t6hIBGP2A++tvOv9iBngPYiToDijzAUcInj0bxAiOGqxMOA51wd3vsKwEUj9wqIcxEA== X-Received: by 10.159.56.193 with SMTP id w1mr4648576uaf.72.1488060168045; Sat, 25 Feb 2017 14:02:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.159.37.33 with HTTP; Sat, 25 Feb 2017 14:02:17 -0800 (PST) In-Reply-To: References: <83lgsuqacv.fsf@gnu.org> From: Richard Copley Date: Sat, 25 Feb 2017 22:02:17 +0000 Message-ID: Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) On 25 February 2017 at 21:37, Richard Copley wrote: > On 25 February 2017 at 21:30, Richard Copley wrote: >>>>> 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.] >> >> Hmm, that doesn't make much sense, does it? I only need those >> flags in addpm.c, not for the rest of Emacs. Perhaps it's left over >> from another experiment. I've taken it out of my build script, but >> I haven't rebuilt because current master doesn't build from pristine: Builds fine without that flag, so I'll stop using it. Thanks. A negative test result: from "emacs -Q", this recipe doesn't cause a hang: ;; open an Ediff control panel frame M-x ediff-buffers RET *scratch* RET *Messages* RET ;; Restart the computer. ;; (Result: the computer restarts normally.) Another data point: I observed the same thing (i.e., Windows failing to shut down, followed by Emacs being in a state where it doesn't respond to keyboard and mouse input) on my work Windows 7 laptop. (Didn't attach GDB and didn't try "taskkill.exe" that time.) So this doesn't seem to be related to my hardware or Windows 10. But it could be influenced by my config (which is all but identical on both machines), since I haven't reproduced it from "emacs -Q". From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 26 10:45:23 2017 Received: (at 25875) by debbugs.gnu.org; 26 Feb 2017 15:45:24 +0000 Received: from localhost ([127.0.0.1]:56920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci10l-0001az-Gc for submit@debbugs.gnu.org; Sun, 26 Feb 2017 10:45:23 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45539) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci10j-0001TH-7w for 25875@debbugs.gnu.org; Sun, 26 Feb 2017 10:45:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ci10a-0008S1-Rd for 25875@debbugs.gnu.org; Sun, 26 Feb 2017 10:45:15 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43497) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ci10a-0008Rx-Ob; Sun, 26 Feb 2017 10:45:12 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2009 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ci10Z-0002nX-UM; Sun, 26 Feb 2017 10:45:12 -0500 Date: Sun, 26 Feb 2017 17:44:51 +0200 Message-Id: <83efylq7m4.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley , Ken Brown In-reply-to: (message from Richard Copley on Sat, 25 Feb 2017 21:07:51 +0000) Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows References: <83lgsuqacv.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Richard Copley > Date: Sat, 25 Feb 2017 21:07:51 +0000 > Cc: 25875@debbugs.gnu.org > > 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. OK, supporting that is a relatively new feature, so it's little surprise it needs more work. Ken, could you please take a look? 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. One possible idea is to use SendMessageTimeout instead, with some suitably chosen timeout. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 26 10:47:34 2017 Received: (at 25875) by debbugs.gnu.org; 26 Feb 2017 15:47:34 +0000 Received: from localhost ([127.0.0.1]:56924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci12s-00032i-0n for submit@debbugs.gnu.org; Sun, 26 Feb 2017 10:47:34 -0500 Received: from eggs.gnu.org ([208.118.235.92]:46073) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci12q-00032U-7n for 25875@debbugs.gnu.org; Sun, 26 Feb 2017 10:47:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ci12i-0000dO-0Y for 25875@debbugs.gnu.org; Sun, 26 Feb 2017 10:47:27 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43512) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ci12h-0000dK-TL; Sun, 26 Feb 2017 10:47:23 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2010 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ci12h-0002xM-2d; Sun, 26 Feb 2017 10:47:23 -0500 Date: Sun, 26 Feb 2017 17:47:03 +0200 Message-Id: <83d1e5q7ig.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley In-reply-to: (message from Richard Copley on Sat, 25 Feb 2017 21:13:57 +0000) Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows References: <83k28eqa82.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Richard Copley > Date: Sat, 25 Feb 2017 21:13:57 +0000 > Cc: 25875@debbugs.gnu.org > > On 25 February 2017 at 20:36, Eli Zaretskii wrote: > >> From: Richard Copley > >> Date: Sat, 25 Feb 2017 19:41:25 +0000 > >> > >> Perhaps not a deadlock: I just ran "taskkill /im emacs.exe" and the > >> process woke up > >> and signaled a Lisp error: > >> > >> Debugger entered--Lisp error: (error "Attempt to delete a surrogate > >> minibuffer frame") > >> delete-frame(# >> 0000000400a51890> t) > > > > Is this indeed a surrogate minibuffer frame? If so, how come it's > > being deleted? > > An Ediff control-panel was present. The main frame was the > surrogate minibuffer frame for the minibufferless Ediff frame. In > that situation, clicking the close button on the main frame gives > that same error. I think this frame was an indirect reason for the hang. > I surmise that WM_QUERY_END_SESSION goes down the same code > path (?). Hmm... I don't see WM_QUERY_END_SESSION in our sources. What am I missing? From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 26 10:48:16 2017 Received: (at 25875) by debbugs.gnu.org; 26 Feb 2017 15:48:16 +0000 Received: from localhost ([127.0.0.1]:56928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci13Y-000346-9k for submit@debbugs.gnu.org; Sun, 26 Feb 2017 10:48:16 -0500 Received: from eggs.gnu.org ([208.118.235.92]:46177) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci13X-00033u-JB for 25875@debbugs.gnu.org; Sun, 26 Feb 2017 10:48:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ci13R-0000tO-Pp for 25875@debbugs.gnu.org; Sun, 26 Feb 2017 10:48:10 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43516) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ci13R-0000tK-MN; Sun, 26 Feb 2017 10:48:09 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2011 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ci13Q-000302-P7; Sun, 26 Feb 2017 10:48:09 -0500 Date: Sun, 26 Feb 2017 17:47:48 +0200 Message-Id: <83bmtpq7h7.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley In-reply-to: (message from Richard Copley on Sat, 25 Feb 2017 22:02:17 +0000) Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows References: <83lgsuqacv.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Richard Copley > Date: Sat, 25 Feb 2017 22:02:17 +0000 > Cc: 25875@debbugs.gnu.org > > A negative test result: from "emacs -Q", this recipe > doesn't cause a hang: > > ;; open an Ediff control panel frame > M-x ediff-buffers RET *scratch* RET *Messages* RET > ;; Restart the computer. > ;; (Result: the computer restarts normally.) Probably because the Ediff control frame is not the selected one. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 26 13:04:32 2017 Received: (at 25875) by debbugs.gnu.org; 26 Feb 2017 18:04:32 +0000 Received: from localhost ([127.0.0.1]:57013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci3BP-0001LN-RJ for submit@debbugs.gnu.org; Sun, 26 Feb 2017 13:04:32 -0500 Received: from limerock03.mail.cornell.edu ([128.84.13.243]:56528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci3BO-0001LA-4M for 25875@debbugs.gnu.org; Sun, 26 Feb 2017 13:04:30 -0500 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite4.serverfarm.cornell.edu [10.16.197.9]) by limerock03.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id v1QI4Nxe032084; Sun, 26 Feb 2017 13:04:23 -0500 Received: from [192.168.1.6] (mta-68-175-148-36.twcny.rr.com [68.175.148.36] (may be forged)) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id v1QI4K4Y013501 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sun, 26 Feb 2017 13:04:22 -0500 Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Eli Zaretskii , Richard Copley References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> From: Ken Brown Message-ID: Date: Sun, 26 Feb 2017 13:04:18 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <83efylq7m4.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-PMX-Cornell-Gauge: Gauge=XXXXX X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none; X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On 2/26/2017 10:44 AM, Eli Zaretskii wrote: >> From: Richard Copley >> Yes indeed. Hence "when shutting down or logging out". In this >> case shutting down the computer. > > OK, supporting that is a relatively new feature, so it's little > surprise it needs more work. Ken, could you please take a look? > > 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. The problem might be that 1000 sec is too long for the input thread to sleep. I chose that number arbitrarily, not realizing that the main thread could get stuck waiting for the input thread. What about something like this? --- a/src/w32fns.c +++ b/src/w32fns.c @@ -4801,8 +4801,10 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) case WM_ENDSESSION: my_post_msg (&wmsg, hwnd, msg, wParam, lParam); - /* If we return, the process will be terminated immediately. */ - sleep (1000); + /* Allow time for Emacs to attempt an orderly shutdown. If we + return, the process will be terminated immediately. */ + sleep (5); + return 0; case WM_WINDOWPOSCHANGING: /* Don't restrict the sizing of any kind of frames. If the window With this change, I think Emacs will be killed in at most 5 seconds no matter what state it is in. But I can't test this because I don't know how to reproduce Richard's problem. Ken From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 26 13:26:04 2017 Received: (at 25875) by debbugs.gnu.org; 26 Feb 2017 18:26:05 +0000 Received: from localhost ([127.0.0.1]:57023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci3WF-0001pf-UC for submit@debbugs.gnu.org; Sun, 26 Feb 2017 13:26:04 -0500 Received: from eggs.gnu.org ([208.118.235.92]:42238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci3WE-0001pB-QQ for 25875@debbugs.gnu.org; Sun, 26 Feb 2017 13:26:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ci3W6-0004DI-Gv for 25875@debbugs.gnu.org; Sun, 26 Feb 2017 13:25:57 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45743) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ci3W5-0004DE-VW; Sun, 26 Feb 2017 13:25:54 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2123 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ci3W5-0001su-6B; Sun, 26 Feb 2017 13:25:53 -0500 Date: Sun, 26 Feb 2017 20:25:33 +0200 Message-Id: <834lzgreqq.fsf@gnu.org> From: Eli Zaretskii To: Ken Brown In-reply-to: (message from Ken Brown on Sun, 26 Feb 2017 13:04:18 -0500) Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25875 Cc: rcopley@gmail.com, 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Cc: 25875@debbugs.gnu.org > From: Ken Brown > Date: Sun, 26 Feb 2017 13:04:18 -0500 > > The problem might be that 1000 sec is too long for the input thread to sleep. I chose that number arbitrarily, not realizing that the main thread could get stuck waiting for the input thread. What about something like this? > > --- a/src/w32fns.c > +++ b/src/w32fns.c > @@ -4801,8 +4801,10 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) > > case WM_ENDSESSION: > my_post_msg (&wmsg, hwnd, msg, wParam, lParam); > - /* If we return, the process will be terminated immediately. */ > - sleep (1000); > + /* Allow time for Emacs to attempt an orderly shutdown. If we > + return, the process will be terminated immediately. */ > + sleep (5); > + return 0; > > case WM_WINDOWPOSCHANGING: > /* Don't restrict the sizing of any kind of frames. If the window > > With this change, I think Emacs will be killed in at most 5 seconds no matter what state it is in. But > I can't test this because I don't know how to reproduce Richard's problem. I think the problem in this particular scenario is not that the input thread sleeps too long, it's that whenever it finishes sleeping and returns, Emacs will be killed, so the WM_ENDSESSION message that was posted to the main thread will never have a chance to be processed, and thus orderly shutdown will never happen. That is why I thought about using SendMessageTimeout in the main thread: what we really want is to cause the main thread to wake up and process the WM_ENDSESSION message. Right? From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 26 13:27:27 2017 Received: (at 25875) by debbugs.gnu.org; 26 Feb 2017 18:27:27 +0000 Received: from localhost ([127.0.0.1]:57028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci3Xb-0001rd-1q for submit@debbugs.gnu.org; Sun, 26 Feb 2017 13:27:27 -0500 Received: from mail-ua0-f171.google.com ([209.85.217.171]:33183) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci3XZ-0001rQ-Qd for 25875@debbugs.gnu.org; Sun, 26 Feb 2017 13:27:26 -0500 Received: by mail-ua0-f171.google.com with SMTP id e4so2485456uae.0 for <25875@debbugs.gnu.org>; Sun, 26 Feb 2017 10:27:25 -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=F9dDO9M4tjcQVACMXwxa/JhBEXBurHrQhAYXutQqXiI=; b=OZBrxfYzGFDaSRbpM0auvYAUeORiBs4nvgPWHVblxrfQK6uv/hVZMvyfqSYRy4BYJZ +tXCBjOGVGdmQLJVg/qXjUUIipQX0jqBFveK20xFJF3qXIwOgBOVGXVzZOaO0SBC1HP0 Axin8WPFr9cUO2HKta2nFVaxKTvIY2+Kq952coKkiqINg7Z+a1wJ2ZKBHH6g3grqB7H+ zTtZEdrPwhjDZ4Af0H00ALrxQ/y8VHBuNrSWPbu2QXZ69qeCUX0w2KVTvcHOFqZrPOZk AQ2eMuIPuWEIenQ+9taenzxiZDuujpafR1gqctcmh7cwX0ba3Y+P0aKwFpLqftSSbTSM QZ9Q== 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=F9dDO9M4tjcQVACMXwxa/JhBEXBurHrQhAYXutQqXiI=; b=EgBuPS5iQKW3WsBmLxWESm5p7ejaQJK35Er5qnFwfBpEDC8jOQhcF37TX4jR9WT1xu nWQK4g4tKh7egwzZzxjioX2X/OHKqeR/+iZ3+vmOsMgPCxjIUiVqqRSkQTLgQCjGijvo I7bXr5YygB1noZlNHGB3EkSvEhwT3H8pk6bmezPkq7WdfP+w2cODjZkLgBpGW655K7t4 8iu7C3XL2GtrtaB1iJ69kAqCH7Sj3NDs1/n6J6QqeaXknkzrZkjYz2S1c+rBi3Mp3NLq PUVdQpE24W4w7UClyAr5l5hibcgtgDJTJo/R9s+5/K3C4QKkz+OqTfdu/y23HNOX0h37 r+cA== X-Gm-Message-State: AMke39kxpN8gL5KQcyjX/voxTmGhUA+z0CAWvupjPVdFR4GzDmybNfUtMUXz45XXJL/5hzxuItckL9YLqpbmaw== X-Received: by 10.31.93.66 with SMTP id r63mr5618741vkb.126.1488133639993; Sun, 26 Feb 2017 10:27:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.71.214 with HTTP; Sun, 26 Feb 2017 10:26:49 -0800 (PST) In-Reply-To: <83d1e5q7ig.fsf@gnu.org> References: <83k28eqa82.fsf@gnu.org> <83d1e5q7ig.fsf@gnu.org> From: Richard Copley Date: Sun, 26 Feb 2017 18:26:49 +0000 Message-ID: Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 26 February 2017 at 15:47, Eli Zaretskii wrote: >> From: Richard Copley >> Date: Sat, 25 Feb 2017 21:13:57 +0000 >> Cc: 25875@debbugs.gnu.org >> >> On 25 February 2017 at 20:36, Eli Zaretskii wrote: >> >> From: Richard Copley >> >> Date: Sat, 25 Feb 2017 19:41:25 +0000 >> >> >> >> Perhaps not a deadlock: I just ran "taskkill /im emacs.exe" and the >> >> process woke up >> >> and signaled a Lisp error: >> >> >> >> Debugger entered--Lisp error: (error "Attempt to delete a surrogate >> >> minibuffer frame") >> >> delete-frame(#> >> 0000000400a51890> t) >> > >> > Is this indeed a surrogate minibuffer frame? If so, how come it's >> > being deleted? >> >> An Ediff control-panel was present. The main frame was the >> surrogate minibuffer frame for the minibufferless Ediff frame. In >> that situation, clicking the close button on the main frame gives >> that same error. > > I think this frame was an indirect reason for the hang. > >> I surmise that WM_QUERY_END_SESSION goes down the same code >> path (?). > > Hmm... I don't see WM_QUERY_END_SESSION in our sources. What am I > missing? "surmise", v. 5 a. To form a notion that the thing in question may be so, on slight grounds or without proof; to infer conjecturally. [OED] In other words, just a wild guess I hadn't properly understood your subtle reference to WM_ENDSESSION (22) in your comment on the backtrace. By the time I did notice, I thought I'd already bombarded you enough for one evening so I didn't correct myself. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 26 13:37:49 2017 Received: (at 25875) by debbugs.gnu.org; 26 Feb 2017 18:37:49 +0000 Received: from localhost ([127.0.0.1]:57036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci3hd-00026I-48 for submit@debbugs.gnu.org; Sun, 26 Feb 2017 13:37:49 -0500 Received: from mail-ua0-f170.google.com ([209.85.217.170]:36622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci3hb-000264-3S for 25875@debbugs.gnu.org; Sun, 26 Feb 2017 13:37:47 -0500 Received: by mail-ua0-f170.google.com with SMTP id 72so14972245uaf.3 for <25875@debbugs.gnu.org>; Sun, 26 Feb 2017 10:37:47 -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=UvmM8XHsEza9pB7TvhSzAM7mUCIdHUOa7dP4jSxFVfg=; b=oy7KxQJs+yHmzKCU0tknvY6oDAEKCtiDqwS172G0PovnfIxDI0WA7joY3EOlQKYSHd 4WFYVTUwIjyxbNWNsJ1neH6EJT5pMLEeGgy1t0FIc9AJg2lz9HWrWKU9TFUdyYluOCsi LjXsADHDHEwgVSFVUty1T2042h8zLOSvTSKG3MoaxGVOM8BX4habwUKoiA8Rk9lp8yAB 1MoDlhwMEG3zvi4XCfVZY5L+gYwXxbCFOZrVmAJIemCXc2jRFlkOEq2H0abEuAk3H6fj M1dJxniodNI3FRWab5qfNF9aj9XuSchbzxpb9P1wAUMxoIiGu6LDHfoXdygpUdDrLjH1 dLHA== 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=UvmM8XHsEza9pB7TvhSzAM7mUCIdHUOa7dP4jSxFVfg=; b=bA3J7VSMYKY/4vDpNaT/DbGG7OVeItLTLmI9ZZlBfc/hK8FC1uy3NQO1nibHTdYKZr 2SjbagpwNfH89FMa6iG8/8QV/2u2iEf+RnrFklqsFZCuut47UHUzsrTDPZPLY9xvLukO m5h/6vOsX059r3FCKP19e5Pr1J5yHmJkTg7kjtq3QvQpX5/aj35Q3uof5HFqn2mnc/K4 G+/vIUiO2AbCx6a8edp5r+8+flEDLHRsg+dJqZ/a6y37bjhQILJgnGTmKKCTiU4KAFAX Z3nCe9BItFXT4Zm7c6YrHA220kUe4VitfCvI+xTb4AEnOglLN+XSeUVK6jWDXC+ZaBZF NkYQ== X-Gm-Message-State: AMke39ku3Wa3xXMsx0CqQ/miYvE+LTKoZ+GlOScVVVY6M1sWTaMgejneK9nSDoP72xj7mLEd9Sn7eTCA1Uvjdw== X-Received: by 10.31.59.197 with SMTP id i188mr4045385vka.45.1488134261550; Sun, 26 Feb 2017 10:37:41 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.71.214 with HTTP; Sun, 26 Feb 2017 10:37:41 -0800 (PST) Received: by 10.176.71.214 with HTTP; Sun, 26 Feb 2017 10:37:41 -0800 (PST) In-Reply-To: <83bmtpq7h7.fsf@gnu.org> References: <83lgsuqacv.fsf@gnu.org> <83bmtpq7h7.fsf@gnu.org> From: Richard Copley Date: Sun, 26 Feb 2017 18:37:41 +0000 Message-ID: Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Eli Zaretskii Content-Type: multipart/alternative; boundary=001a1142f17809b4130549734281 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --001a1142f17809b4130549734281 Content-Type: text/plain; charset=UTF-8 On 26 February 2017 at 15:47, Eli Zaretskii wrote: >> From: Richard Copley >> Date: Sat, 25 Feb 2017 22:02:17 +0000 >> Cc: 25875@debbugs.gnu.org >> >> A negative test result: from "emacs -Q", this recipe >> doesn't cause a hang: >> >> ;; open an Ediff control panel frame >> M-x ediff-buffers RET *scratch* RET *Messages* RET >> ;; Restart the computer. >> ;; (Result: the computer restarts normally.) > > Probably because the Ediff control frame is not the selected one. It would have been, with that recipe. --001a1142f17809b4130549734281 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On 26 February 2017 at 15:47, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Rich= ard Copley <rcopley@gmail.com&g= t;
>> Date: Sat, 25 Feb 2017 22:02:17 +0000
>> Cc: 25875@debbugs.gnu.org
>>>> A negative test result: from "emacs -Q", this recipe>> doesn't cause a hang:
>>
>> ;; open an Edif= f control panel frame
>> M-x ediff-buffers RET *scratch* RET *Mess= ages* RET
>> ;; Restart the computer.
>> ;; (Result: the = computer restarts normally.)
>
> Probably because the Ediff con= trol frame is not the selected one.

It would have been, with that re= cipe.
--001a1142f17809b4130549734281-- From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 26 13:58:35 2017 Received: (at 25875) by debbugs.gnu.org; 26 Feb 2017 18:58:35 +0000 Received: from localhost ([127.0.0.1]:57047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci41j-0002YA-5t for submit@debbugs.gnu.org; Sun, 26 Feb 2017 13:58:35 -0500 Received: from limerock04.mail.cornell.edu ([128.84.13.244]:59924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci41h-0002Xx-9u for 25875@debbugs.gnu.org; Sun, 26 Feb 2017 13:58:33 -0500 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock04.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id v1QIwR1s002057; Sun, 26 Feb 2017 13:58:27 -0500 Received: from [192.168.1.6] (mta-68-175-148-36.twcny.rr.com [68.175.148.36] (may be forged)) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id v1QIwPm6002600 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sun, 26 Feb 2017 13:58:26 -0500 Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Eli Zaretskii References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> From: Ken Brown Message-ID: <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> Date: Sun, 26 Feb 2017 13:58:23 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <834lzgreqq.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Cornell-Gauge: Gauge=XXXXX X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none; X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 25875 Cc: rcopley@gmail.com, 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On 2/26/2017 1:25 PM, Eli Zaretskii wrote: >> Cc: 25875@debbugs.gnu.org >> From: Ken Brown >> Date: Sun, 26 Feb 2017 13:04:18 -0500 >> >> The problem might be that 1000 sec is too long for the input thread to sleep. I chose that number arbitrarily, not realizing that the main thread could get stuck waiting for the input thread. What about something like this? >> >> --- a/src/w32fns.c >> +++ b/src/w32fns.c >> @@ -4801,8 +4801,10 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) >> >> case WM_ENDSESSION: >> my_post_msg (&wmsg, hwnd, msg, wParam, lParam); >> - /* If we return, the process will be terminated immediately. */ >> - sleep (1000); >> + /* Allow time for Emacs to attempt an orderly shutdown. If we >> + return, the process will be terminated immediately. */ >> + sleep (5); >> + return 0; >> >> case WM_WINDOWPOSCHANGING: >> /* Don't restrict the sizing of any kind of frames. If the window >> >> With this change, I think Emacs will be killed in at most 5 seconds no matter what state it is in. But >> I can't test this because I don't know how to reproduce Richard's problem. > > I think the problem in this particular scenario is not that the input > thread sleeps too long, it's that whenever it finishes sleeping and > returns, Emacs will be killed, so the WM_ENDSESSION message that was > posted to the main thread will never have a chance to be processed, > and thus orderly shutdown will never happen. > > That is why I thought about using SendMessageTimeout in the main > thread: what we really want is to cause the main thread to wake up and > process the WM_ENDSESSION message. Right? Yes, that would obviously be better. But in any case, I don't think we want the input thread to sleep for 1000 seconds. If we can't arrange an orderly shutdown, we should give up after a reasonable amount of time. Ken From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 26 14:25:47 2017 Received: (at 25875) by debbugs.gnu.org; 26 Feb 2017 19:25:47 +0000 Received: from localhost ([127.0.0.1]:57059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci4S2-0003Ai-P9 for submit@debbugs.gnu.org; Sun, 26 Feb 2017 14:25:46 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50292) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci4S1-0003AV-QV for 25875@debbugs.gnu.org; Sun, 26 Feb 2017 14:25:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ci4Rt-0004U0-KP for 25875@debbugs.gnu.org; Sun, 26 Feb 2017 14:25:40 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46095) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ci4Rt-0004Tq-HA; Sun, 26 Feb 2017 14:25:37 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2191 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ci4Rs-0000Pa-P9; Sun, 26 Feb 2017 14:25:37 -0500 Date: Sun, 26 Feb 2017 21:25:17 +0200 Message-Id: <8337f0rbz6.fsf@gnu.org> From: Eli Zaretskii To: Ken Brown In-reply-to: <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> (message from Ken Brown on Sun, 26 Feb 2017 13:58:23 -0500) Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25875 Cc: rcopley@gmail.com, 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Cc: rcopley@gmail.com, 25875@debbugs.gnu.org > From: Ken Brown > Date: Sun, 26 Feb 2017 13:58:23 -0500 > > > I think the problem in this particular scenario is not that the input > > thread sleeps too long, it's that whenever it finishes sleeping and > > returns, Emacs will be killed, so the WM_ENDSESSION message that was > > posted to the main thread will never have a chance to be processed, > > and thus orderly shutdown will never happen. > > > > That is why I thought about using SendMessageTimeout in the main > > thread: what we really want is to cause the main thread to wake up and > > process the WM_ENDSESSION message. Right? > > Yes, that would obviously be better. OK. Can you propose a patch that Richard could try? Or should I do that? > But in any case, I don't think we want the input thread to sleep for > 1000 seconds. If we can't arrange an orderly shutdown, we should > give up after a reasonable amount of time. Yes, I agree. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 26 18:38:31 2017 Received: (at 25875) by debbugs.gnu.org; 26 Feb 2017 23:38:31 +0000 Received: from localhost ([127.0.0.1]:57188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci8Od-00029f-7e for submit@debbugs.gnu.org; Sun, 26 Feb 2017 18:38:31 -0500 Received: from limerock03.mail.cornell.edu ([128.84.13.243]:40522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci8Ob-00029S-Ev for 25875@debbugs.gnu.org; Sun, 26 Feb 2017 18:38:30 -0500 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock03.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id v1QNcNPY015487; Sun, 26 Feb 2017 18:38:23 -0500 Received: from [192.168.1.6] (mta-68-175-148-36.twcny.rr.com [68.175.148.36] (may be forged)) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id v1QNcL3l025882 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sun, 26 Feb 2017 18:38:22 -0500 Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Eli Zaretskii References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> From: Ken Brown Message-ID: Date: Sun, 26 Feb 2017 18:38:19 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <8337f0rbz6.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Cornell-Gauge: Gauge=XXXXX X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none; X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 25875 Cc: rcopley@gmail.com, 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On 2/26/2017 2:25 PM, Eli Zaretskii wrote: >> Cc: rcopley@gmail.com, 25875@debbugs.gnu.org >> From: Ken Brown >> Date: Sun, 26 Feb 2017 13:58:23 -0500 >> >>> I think the problem in this particular scenario is not that the input >>> thread sleeps too long, it's that whenever it finishes sleeping and >>> returns, Emacs will be killed, so the WM_ENDSESSION message that was >>> posted to the main thread will never have a chance to be processed, >>> and thus orderly shutdown will never happen. >>> >>> That is why I thought about using SendMessageTimeout in the main >>> thread: what we really want is to cause the main thread to wake up and >>> process the WM_ENDSESSION message. Right? >> >> Yes, that would obviously be better. > > OK. Can you propose a patch that Richard could try? Here's a quick and dirty attempt. If I haven't made a mistake, it replaces every relevant call to SendMessage by a call to SendMessageTimeout with a 100ms timeout. --- a/src/w32term.c +++ b/src/w32term.c @@ -537,6 +537,15 @@ x_update_begin (struct frame *f) } +#undef SendMessage +#define SendMessage DebugSendMessage + +static LRESULT WINAPI +DebugSendMessage (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) +{ + return SendMessageTimeoutA (hWnd, Msg, wParam, lParam, 0, 100, NULL); +} + /* Start update of window W. */ static void Ken From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 03:15:00 2017 Received: (at 25875) by debbugs.gnu.org; 27 Feb 2017 08:15:00 +0000 Received: from localhost ([127.0.0.1]:57487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciGSS-0000bi-2U for submit@debbugs.gnu.org; Mon, 27 Feb 2017 03:15:00 -0500 Received: from mail-ua0-f169.google.com ([209.85.217.169]:34357) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciGSQ-0000bW-E0 for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 03:14:58 -0500 Received: by mail-ua0-f169.google.com with SMTP id f54so17790952uaa.1 for <25875@debbugs.gnu.org>; Mon, 27 Feb 2017 00:14:58 -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=U3arFsRWhwjI5TvlYIVzi56+B2LULZ0MnNc5Gfl7gO4=; b=XLMFcj57g+tELIRUGp2ad2OUYrrr4x38BKECbfmhoGWRTdYRQiyvIqRxUnFzJtqZ7p 4Tm7lNe6jUEgN1pA0P+CYGHBaivBDB7CA2h+D10AeuCocnk3TvvW39w1++tfdnH9lxaF droc+LbkQbsreBOuUNmMbZi1wmrVYVsuvdkNZZMdiL+skzrG4Taqa78b/jrGVNiY2qxg c8/iIR4w5Wuvlp3DLs+hjiAonlMfCdDFpiA6Bt9Xgn4WnCunHLcXJc0qV3i5CX+WNUwI lVJGL5eRaIS9hzvsynL1fGyMLUmpn+0h3oopyDJt1/+QZ7ad4ngzYfmKf68yE0Vr1CgF dh3A== 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=U3arFsRWhwjI5TvlYIVzi56+B2LULZ0MnNc5Gfl7gO4=; b=iBgWJ2xw9fkwdfgPqZGw7th7mIbGgPluMALVxEWmxsjXtQhvKvXta3T4Wt59EuIQ1I 9Rlfyo+3OlIa6tuLjeZZXls1a8hRcIXL/qirUgKry4x+xDcUpALoJW06MIBumaaHVzn7 AqKbeX/gj+5Wu4PySz33pmysiSp3fpfijswSduZCW1bitSux1YWH3IFKBg8NN9SybQgz PUcSpnpxIxLcloT9Tn3+bJdGlyL7lDICFWz/iMnQVZpjUUZalBEwke6++TBMmGqgTMMy Rhj5L/mfYn2nIMJli6Olf5sqt5CuAjzTYubc4Gszc6QpLIVjD59RBy5/nBbBhgisyXfh c90g== X-Gm-Message-State: AMke39m40AQqVcFHHAsMwKZZVt7oWcRTXpQVyGXlsHn9eCxTfN994uRrqhHjiHm7QpWQujtMzEVkp3ytey7qwA== X-Received: by 10.31.4.211 with SMTP id 202mr6875825vke.105.1488183292817; Mon, 27 Feb 2017 00:14:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.71.214 with HTTP; Mon, 27 Feb 2017 00:14:22 -0800 (PST) In-Reply-To: References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> From: Richard Copley Date: Mon, 27 Feb 2017 08:14:22 +0000 Message-ID: Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Ken Brown Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25875 Cc: Eli Zaretskii , 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 26 February 2017 at 23:38, Ken Brown wrote: > On 2/26/2017 2:25 PM, Eli Zaretskii wrote: >>> >>> Cc: rcopley@gmail.com, 25875@debbugs.gnu.org >>> From: Ken Brown >>> Date: Sun, 26 Feb 2017 13:58:23 -0500 >>> >>>> I think the problem in this particular scenario is not that the input >>>> thread sleeps too long, it's that whenever it finishes sleeping and >>>> returns, Emacs will be killed, so the WM_ENDSESSION message that was >>>> posted to the main thread will never have a chance to be processed, >>>> and thus orderly shutdown will never happen. >>>> >>>> That is why I thought about using SendMessageTimeout in the main >>>> thread: what we really want is to cause the main thread to wake up and >>>> process the WM_ENDSESSION message. Right? >>> >>> >>> Yes, that would obviously be better. >> >> >> OK. Can you propose a patch that Richard could try? > > > Here's a quick and dirty attempt. If I haven't made a mistake, it replaces > every relevant call to SendMessage by a call to SendMessageTimeout with a > 100ms timeout. > > --- a/src/w32term.c > +++ b/src/w32term.c > @@ -537,6 +537,15 @@ x_update_begin (struct frame *f) > } > > > +#undef SendMessage > +#define SendMessage DebugSendMessage > + > +static LRESULT WINAPI > +DebugSendMessage (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) > +{ > + return SendMessageTimeoutA (hWnd, Msg, wParam, lParam, 0, 100, NULL); > +} > + > /* Start update of window W. */ > > static void > > Ken Sorry Ken, I can't sabotage myself like that, I have work to do. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 10:36:52 2017 Received: (at 25875) by debbugs.gnu.org; 27 Feb 2017 15:36:52 +0000 Received: from localhost ([127.0.0.1]:58453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciNM4-0007gm-Ah for submit@debbugs.gnu.org; Mon, 27 Feb 2017 10:36:52 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciNM2-0007gX-IR for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 10:36:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciNLu-000501-38 for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 10:36:45 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59739) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciNLt-0004zx-Vr; Mon, 27 Feb 2017 10:36:42 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2744 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ciNLt-0003HT-7A; Mon, 27 Feb 2017 10:36:41 -0500 Date: Mon, 27 Feb 2017 17:36:23 +0200 Message-Id: <83shmzprwo.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley In-reply-to: (message from Richard Copley on Mon, 27 Feb 2017 08:14:22 +0000) Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org, kbrown@cornell.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Richard Copley > Date: Mon, 27 Feb 2017 08:14:22 +0000 > Cc: Eli Zaretskii , 25875@debbugs.gnu.org > > > Here's a quick and dirty attempt. If I haven't made a mistake, it replaces > > every relevant call to SendMessage by a call to SendMessageTimeout with a > > 100ms timeout. > > > > --- a/src/w32term.c > > +++ b/src/w32term.c > > @@ -537,6 +537,15 @@ x_update_begin (struct frame *f) > > } > > > > > > +#undef SendMessage > > +#define SendMessage DebugSendMessage > > + > > +static LRESULT WINAPI > > +DebugSendMessage (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) > > +{ > > + return SendMessageTimeoutA (hWnd, Msg, wParam, lParam, 0, 100, NULL); > > +} > > + > > /* Start update of window W. */ > > > > static void > > > > Ken > > Sorry Ken, I can't sabotage myself like that, I have work to do. This could be a misunderstanding: the above change is not supposed to sabotage anything, it's supposed to be a 100% compatible change for the current behavior when all threads are running, and also provide a "fire escape" when the addressee of the message is for some reason stuck, as we think happens in your scenario. If you are unwilling to make such a sweeping change, could you at least replace the call SendMessage in my_show_window with SendMessageTimeoutA, using the above patch as a template? TIA From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 14:05:01 2017 Received: (at 25875) by debbugs.gnu.org; 27 Feb 2017 19:05:01 +0000 Received: from localhost ([127.0.0.1]:58659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciQbU-0005nW-RB for submit@debbugs.gnu.org; Mon, 27 Feb 2017 14:05:01 -0500 Received: from mail-ua0-f182.google.com ([209.85.217.182]:34831) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciQbT-0005nJ-8S for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 14:04:59 -0500 Received: by mail-ua0-f182.google.com with SMTP id 40so67303885uau.2 for <25875@debbugs.gnu.org>; Mon, 27 Feb 2017 11:04:59 -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=OvVxgGspKqT5vIsJdAM7UKH/NJGLxjGW+JWN9Ih5uz4=; b=QkRtMJQyEkZpM9qQ4Z5FutBY90Jf3eFDlU3l8hiFGB0rf1V5/nqIyUJT7VhYrnlXuf wR+HFULVCxnyu+vKxL8YZLLjbF65oEF8WzHRsAZoE2ovF0wwYWBb8RJ1/bxon/ivyXA4 7hy7HJ2axTJbl8doS4sHZ9aTCW/5/S0Fcz9ILj2+L/Y50H7CxJyEtHhDfkqzSFjzNR1N Y5atk8n/UcnaaOIaSBFg8clcFeZiiETVD9PCxutmpc3iz17XSxJG6Y3zf/8g0fWyDPo3 ZHfn3DPoV6N9TfctIBLzfZDSdxc+ne4PuBGoXda/z1JQ+V7rj39I15nLbSO6lzYZGbnP P/0g== 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=OvVxgGspKqT5vIsJdAM7UKH/NJGLxjGW+JWN9Ih5uz4=; b=iECPMMlmKRSou5KMRCJ6XFMhc/z1v+kFyVOW+sAntE+AWut7tL5K+fBAFpdhu2xmgq GDPEKyoJUTuY7buOrCHb3Szd/V7E+oHsfEJVhfbboDADAKFHfh1xRYkCnOzT6dxasDsC RqG/8CGRoPQMrNmuf0Ie3GgpQpgiYhB8C/hzewRfBm8F394DIU1kMy4Q3TQgYAA2sriq tvrx+siiFa0yRR/67qNQzkRY3f1O+7n3n2GBnOHF8bFpRicaN4QTwkdeoqH5xa9CQxA+ lh8ov5B3ialQUQ4ezfPfCbBYz2Ln4nAlbrq7eDGc4dMGdYsTeHrotGmOkhRljKQG7MFu B9vw== X-Gm-Message-State: AMke39k083RmRFZqq5A0Kc6MDXpr/EUi8OQQsDu8794bdqWMgkliOf5BsynlgPpQSu1JYNMOw6c24O00NrJfBA== X-Received: by 10.31.59.197 with SMTP id i188mr6035129vka.45.1488222293647; Mon, 27 Feb 2017 11:04:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.71.214 with HTTP; Mon, 27 Feb 2017 11:04:23 -0800 (PST) In-Reply-To: <83shmzprwo.fsf@gnu.org> References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <83shmzprwo.fsf@gnu.org> From: Richard Copley Date: Mon, 27 Feb 2017 19:04:23 +0000 Message-ID: Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org, Ken Brown X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 27 February 2017 at 15:36, Eli Zaretskii wrote: >> From: Richard Copley >> Date: Mon, 27 Feb 2017 08:14:22 +0000 >> Cc: Eli Zaretskii , 25875@debbugs.gnu.org >> >> > Here's a quick and dirty attempt. If I haven't made a mistake, it replaces >> > every relevant call to SendMessage by a call to SendMessageTimeout with a >> > 100ms timeout. >> > >> > --- a/src/w32term.c >> > +++ b/src/w32term.c >> > @@ -537,6 +537,15 @@ x_update_begin (struct frame *f) >> > } >> > >> > >> > +#undef SendMessage >> > +#define SendMessage DebugSendMessage >> > + >> > +static LRESULT WINAPI >> > +DebugSendMessage (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) >> > +{ >> > + return SendMessageTimeoutA (hWnd, Msg, wParam, lParam, 0, 100, NULL); >> > +} >> > + >> > /* Start update of window W. */ >> > >> > static void >> > >> > Ken >> >> Sorry Ken, I can't sabotage myself like that, I have work to do. > > This could be a misunderstanding: the above change is not supposed to > sabotage anything, it's supposed to be a 100% compatible change for > the current behavior when all threads are running, and also provide a > "fire escape" when the addressee of the message is for some reason > stuck, as we think happens in your scenario. >From the docs for SendMessageTimeout: "If the function succeeds, the return value is nonzero.". We're going to cast that to HWND and pretend it's a scrollbar? (See `my_create_vscrollbar()' in "w32term.c".) Then what happens? Ken, what happened when you tested this? > If you are unwilling to make such a sweeping change, could you at > least replace the call SendMessage in my_show_window with > SendMessageTimeoutA, using the above patch as a template? I will think about it, but I'll ignore the patch :) From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 14:17:13 2017 Received: (at 25875) by debbugs.gnu.org; 27 Feb 2017 19:17:13 +0000 Received: from localhost ([127.0.0.1]:58664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciQnJ-00064E-0W for submit@debbugs.gnu.org; Mon, 27 Feb 2017 14:17:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52733) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciQnH-000641-J8 for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 14:17:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciQn9-0002vC-7s for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 14:17:06 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34722) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciQn9-0002v7-4G; Mon, 27 Feb 2017 14:17:03 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2885 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ciQn8-0005cy-7T; Mon, 27 Feb 2017 14:17:02 -0500 Date: Mon, 27 Feb 2017 21:16:51 +0200 Message-Id: <83fuizphp8.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley In-reply-to: (message from Richard Copley on Mon, 27 Feb 2017 19:04:23 +0000) Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <83shmzprwo.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org, kbrown@cornell.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Richard Copley > Date: Mon, 27 Feb 2017 19:04:23 +0000 > Cc: Ken Brown , 25875@debbugs.gnu.org > > >> > +static LRESULT WINAPI > >> > +DebugSendMessage (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) > >> > +{ > >> > + return SendMessageTimeoutA (hWnd, Msg, wParam, lParam, 0, 100, NULL); > >> > +} > >> > + > >> > /* Start update of window W. */ > >> > > >> > static void > >> > > >> > Ken > >> > >> Sorry Ken, I can't sabotage myself like that, I have work to do. > > > > This could be a misunderstanding: the above change is not supposed to > > sabotage anything, it's supposed to be a 100% compatible change for > > the current behavior when all threads are running, and also provide a > > "fire escape" when the addressee of the message is for some reason > > stuck, as we think happens in your scenario. > > >From the docs for SendMessageTimeout: > "If the function succeeds, the return value is nonzero.". > We're going to cast that to HWND and pretend it's a scrollbar? No, the result is returned in the last argument of SendMessageTimeout (which shouldn't be NULL for getting hold of that, of course). From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 14:24:01 2017 Received: (at 25875) by debbugs.gnu.org; 27 Feb 2017 19:24:01 +0000 Received: from localhost ([127.0.0.1]:58672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciQtt-0006ET-0X for submit@debbugs.gnu.org; Mon, 27 Feb 2017 14:24:01 -0500 Received: from mail-ua0-f175.google.com ([209.85.217.175]:35124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciQtr-0006EG-HV for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 14:24:00 -0500 Received: by mail-ua0-f175.google.com with SMTP id 40so67890635uau.2 for <25875@debbugs.gnu.org>; Mon, 27 Feb 2017 11:23:59 -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=unJYytu4O0dqblmBJBAMygfMBORPbTKhrPWWfUjkt/Q=; b=B+xFDciaFiQIY6Tlyk56d5Jvt7aPxU27wx3BS4GHOFL00KXzoojw2k4dcoKeVTddW4 +5AKHz3VF2FvC8SgC3xhtjjwz9qbHUcOEeFLSq1FTYIODUo+pEz0lj6aftuv8Xv7yQhM IGX+iAK88x06rN3Ts/neAAb040wY4NTYbeGU2uhxl0VNHr9wDfrl/C2NNAFo+OZGqDpv kUhdmc8KYy7Jhw5zjKYjreYvZx5sSXKy19F7kqV46ERB24k+os36m/ADP6IKOWUn1A7F E3MsdmFi1Qr9Os7ttvOoWb4w1MbFe67mo1PITg8+PML4nNiSb7RT4/bqxPgqVD6c3Lsf 2KHw== 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=unJYytu4O0dqblmBJBAMygfMBORPbTKhrPWWfUjkt/Q=; b=udj6wxS2vsT8BLCnLk60X/LXkzZsXNdsSamL5eEcGnNdT2iWuej7urVICWf+BjqxRR J/mUFcJ80vaTI9lL/4aZJrWCxa3obN04GA1av6NeoxsZuZ8TXCUi6mZ+wUxdnOIvTlAE 1KcKzcnbm1Z3c2a/UMvw5ifE2o6nbkTGC7sWRgb8RAbk46UYKoPGr6TwdJ0jV8PywaRR tiBzi80eqMvQfMTCc9tPa//ttzVVWbPdmfQ2DcRUCtoUYlFISqRHdQNbNL4E7WFOEU39 G02Ts2eGaZcPZmzFamAR61Encsn9QrIWlI9dbd02VMH8BUJGUjRYkD3yJr6yydn/jcLF zhhA== X-Gm-Message-State: AMke39m3ASmNIE5xcH0ctSN1mOZd8NmQjdb19XXyj1+13S48SNtoTyPEQYVXkGAcCWtBWfdWpSoGMqBSpGcc3w== X-Received: by 10.159.33.4 with SMTP id 4mr9248451uab.156.1488223432034; Mon, 27 Feb 2017 11:23:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.71.214 with HTTP; Mon, 27 Feb 2017 11:23:21 -0800 (PST) In-Reply-To: <83fuizphp8.fsf@gnu.org> References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <83shmzprwo.fsf@gnu.org> <83fuizphp8.fsf@gnu.org> From: Richard Copley Date: Mon, 27 Feb 2017 19:23:21 +0000 Message-ID: Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org, Ken Brown X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 27 February 2017 at 19:16, Eli Zaretskii wrote: >> From: Richard Copley >> Date: Mon, 27 Feb 2017 19:04:23 +0000 >> Cc: Ken Brown , 25875@debbugs.gnu.org >> >> >> > +static LRESULT WINAPI >> >> > +DebugSendMessage (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) >> >> > +{ >> >> > + return SendMessageTimeoutA (hWnd, Msg, wParam, lParam, 0, 100, NULL); >> >> > +} >> >> > + >> >> > /* Start update of window W. */ >> >> > >> >> > static void >> >> > >> >> > Ken >> >> >> >> Sorry Ken, I can't sabotage myself like that, I have work to do. >> > >> > This could be a misunderstanding: the above change is not supposed to >> > sabotage anything, it's supposed to be a 100% compatible change for >> > the current behavior when all threads are running, and also provide a >> > "fire escape" when the addressee of the message is for some reason >> > stuck, as we think happens in your scenario. >> >> >From the docs for SendMessageTimeout: >> "If the function succeeds, the return value is nonzero.". >> We're going to cast that to HWND and pretend it's a scrollbar? > > No, the result is returned in the last argument of SendMessageTimeout > (which shouldn't be NULL for getting hold of that, of course). My point exactly. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 14:31:27 2017 Received: (at 25875) by debbugs.gnu.org; 27 Feb 2017 19:31:27 +0000 Received: from localhost ([127.0.0.1]:58677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciR15-0006PW-Bc for submit@debbugs.gnu.org; Mon, 27 Feb 2017 14:31:27 -0500 Received: from mail-ua0-f179.google.com ([209.85.217.179]:36782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciR13-0006PI-TA for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 14:31:26 -0500 Received: by mail-ua0-f179.google.com with SMTP id 72so46288269uaf.3 for <25875@debbugs.gnu.org>; Mon, 27 Feb 2017 11:31:25 -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=5T/ak3+9BUSrSYJtaPkvmix1ZM0g91H1WWY/Ee4sOeo=; b=N7ddGF2LxbCjyX26wwvcHZxfFm45tqMYuZ/+G5KnuLxJ9wluJjJ4HTjGbsHwaKlfXW vrN1bqFG7Tf2qaIdyv87jIBOUhEqWVfKsE5Sr5A2fN41lH8L54lFIar9rkbYHOfHL0FW wQxf6n63VITwE3liqbKylgP6irunVGhmYqF8G1n6jvZBJh5f0g2allqM8is39yO7V29z 9YNbibeL++vp+ZlbBiJ+clBD0cES3L4Xa5PkN26ht35i776Z6HGi7ngf8INLqEAqPOfr GT84cN+AnBkdTi159G0gfSVnVYa0Pef4J19SUkFcPie3piM6gw/B9Q9JvJz9HkGrRqau /8QA== 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=5T/ak3+9BUSrSYJtaPkvmix1ZM0g91H1WWY/Ee4sOeo=; b=If2lw1mbWdQr1aLVFpQD7yBEHlRN3OBDNkizq//VSZ0+roFb86FKkx4YkknWCV0z5+ TLI59mbAAFqvOkPRiE2KixPeABVAoBTWtnc6cRF2SoFaamyVX655/baVPf41DOdkAdHp YNFJ8MTXjXKsaX5Bw1paMVImDt0kdIP6bJ6fNw3ueyCu5baHkoD03rVV5lTJhwirzd9g TSBkXQm3WB5z6loNYRqkGD5m8pMw9CmoneHkUDs4radWqb4jeq/aeTmZyf1xmG1ZGMOw 5ZDgVwkm0UrADXaK2dEzgClxQU0HzldxHKE5AF0ou99FKSnHqBOmPu0vLfkV8FNtf8f0 8IFA== X-Gm-Message-State: AMke39kN+/hBzNjj2hLWle4jJAcJ0CAF4H+VOS2svZNmxpNbtOGw/J9aB5QIApnfDJnIEoxMuGhvpAOk8ZqHHw== X-Received: by 10.31.205.133 with SMTP id d127mr7839597vkg.18.1488223880374; Mon, 27 Feb 2017 11:31:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.71.214 with HTTP; Mon, 27 Feb 2017 11:30:49 -0800 (PST) In-Reply-To: References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <83shmzprwo.fsf@gnu.org> <83fuizphp8.fsf@gnu.org> From: Richard Copley Date: Mon, 27 Feb 2017 19:30:49 +0000 Message-ID: Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org, Ken Brown X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) If you want to block or delay a shutdown in recent Windows versions you need to use ShutdownBlockReasonCreate (it's unfortunate, but we lazy programmers proved we couldn't be trusted, collectively, to handle WM_QUERY_ENDSESSION correctly, so the arms race had to be escalated in order to allow users to shut down their computers reliably). Ken, what was the original change intended to guard against? What would people be doing with Emacs that can't simply be abandoned? Did you have a particular example in mind? From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 14:39:29 2017 Received: (at 25875) by debbugs.gnu.org; 27 Feb 2017 19:39:29 +0000 Received: from localhost ([127.0.0.1]:58683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciR8r-0006aD-4M for submit@debbugs.gnu.org; Mon, 27 Feb 2017 14:39:29 -0500 Received: from limerock02.mail.cornell.edu ([128.84.13.242]:47113) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciR8p-0006a0-JX for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 14:39:27 -0500 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite4.serverfarm.cornell.edu [10.16.197.9]) by limerock02.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id v1RJdLea014905; Mon, 27 Feb 2017 14:39:21 -0500 Received: from [192.168.1.6] (mta-68-175-148-36.twcny.rr.com [68.175.148.36] (may be forged)) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id v1RJdJKd010538 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 27 Feb 2017 14:39:20 -0500 Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Richard Copley , Eli Zaretskii References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <83shmzprwo.fsf@gnu.org> <83fuizphp8.fsf@gnu.org> From: Ken Brown Message-ID: Date: Mon, 27 Feb 2017 14:39:17 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Cornell-Gauge: Gauge=XXXXX X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none; X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On 2/27/2017 2:30 PM, Richard Copley wrote: > If you want to block or delay a shutdown in recent > Windows versions you need to use > ShutdownBlockReasonCreate (it's unfortunate, but > we lazy programmers proved we couldn't be trusted, > collectively, to handle WM_QUERY_ENDSESSION > correctly, so the arms race had to be escalated in > order to allow users to shut down their computers > reliably). In spite of the careless mistake in my patch, you could still test Eli's suggestion of using SendMessageTimeout instead of SendMessage, at least in my_show_window. > Ken, what was the original change intended to guard > against? What would people be doing with Emacs that > can't simply be abandoned? Did you have a particular > example in mind? Bug#23483. Ken From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 14:46:59 2017 Received: (at 25875) by debbugs.gnu.org; 27 Feb 2017 19:46:59 +0000 Received: from localhost ([127.0.0.1]:58687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciRG6-0006ka-Ti for submit@debbugs.gnu.org; Mon, 27 Feb 2017 14:46:59 -0500 Received: from mail-ua0-f171.google.com ([209.85.217.171]:33133) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciRG5-0006kM-L6 for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 14:46:58 -0500 Received: by mail-ua0-f171.google.com with SMTP id e4so34311626uae.0 for <25875@debbugs.gnu.org>; Mon, 27 Feb 2017 11:46:57 -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=XDA2pSKmekaARmqXFJGaC/Nqi2uk6/dJh467aFGUpek=; b=J0I/xPVtRmHHG0k1dShvkt3vr+DXy+3+VRQjZ3s3BitMjqwiJyJBJArv3eVCG8+dfo V/45/Om3bjYxwxSu9onVE05pIyQA9O5DcCasJ+m3sXo6zcSXGN/eL2RGgyDXtB+i2oTL AhJNG2PT3sIfoA3WedX2s306pFkGjxbAKT7SKYN+YoZSaOT91C8F/EMP94rsJEwYbIAS VG5fSUzOC2YVGKsZgHnyIl1KgSeQZGdSOQ+G1FQ6wM15hmBpFgi1fNRyLAuwk1o42oyA Utzj/416LaAhZxeRT2oBFvpvn3d68dvK3l4bc1aSj/kJpYODWUMVNn1gpKLKHWDIfYiI mXhg== 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=XDA2pSKmekaARmqXFJGaC/Nqi2uk6/dJh467aFGUpek=; b=iZ2l29J53PjnbcUP6ueV4Ob9rfF4oenBScF8kR7GyFo70Gt95bsC3ovM6PNFnOxCmb LVr3C5ZbF07GTbBMGfwMxaWjS4Qtcek8FvSMeyBm7ct/A8Z6sotJCFfR/1/TOu5zCLkS R8DGYf/1RUU3uvIhMJTwnzYa7CNIGvLWkeCywyXJksIdvIOoy7bj40ArILWsOm30Qpkv bNSPUeduLH2XKP+zx3LWAdrZKFkqU87yT7VkTZ8jkPocw2jS6/biGZ3S8KbdgX/DHbFt B+NfARdNcmwb9G0gWzfN9nAATiFnWpwS45UF7wJJ66N9mS55yk7XX9yCHHdQUNDlrcI8 shew== X-Gm-Message-State: AMke39lBaVYuXieynyxLi6/iLVyGUQLygQ7dns+CN1M9wpUwriSsxkSxgN61VZr1ySCQ3JClr9LfkKR3M5tAhA== X-Received: by 10.31.59.197 with SMTP id i188mr6103696vka.45.1488224812018; Mon, 27 Feb 2017 11:46:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.71.214 with HTTP; Mon, 27 Feb 2017 11:46:21 -0800 (PST) In-Reply-To: References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <83shmzprwo.fsf@gnu.org> <83fuizphp8.fsf@gnu.org> From: Richard Copley Date: Mon, 27 Feb 2017 19:46:21 +0000 Message-ID: Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Ken Brown Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25875 Cc: Eli Zaretskii , 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 27 February 2017 at 19:39, Ken Brown wrote: > On 2/27/2017 2:30 PM, Richard Copley wrote: >> >> If you want to block or delay a shutdown in recent >> Windows versions you need to use >> ShutdownBlockReasonCreate (it's unfortunate, but >> we lazy programmers proved we couldn't be trusted, >> collectively, to handle WM_QUERY_ENDSESSION >> correctly, so the arms race had to be escalated in >> order to allow users to shut down their computers >> reliably). > > > In spite of the careless mistake in my patch, you could still test Eli's > suggestion of using SendMessageTimeout instead of SendMessage, at least in > my_show_window. I can't, not really. Remember, I don't have a recipe. I'll never be able to observe whether it's working or not. (Am I missing something?) >> Ken, what was the original change intended to guard >> against? What would people be doing with Emacs that >> can't simply be abandoned? Did you have a particular >> example in mind? > > > Bug#23483. That's not a real issue, in my opinion. It's already covered, by autosave. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 14:57:02 2017 Received: (at 25875) by debbugs.gnu.org; 27 Feb 2017 19:57:02 +0000 Received: from localhost ([127.0.0.1]:58695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciRPq-0006yN-5m for submit@debbugs.gnu.org; Mon, 27 Feb 2017 14:57:02 -0500 Received: from mail-ua0-f170.google.com ([209.85.217.170]:36008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciRPo-0006y4-Ou for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 14:57:01 -0500 Received: by mail-ua0-f170.google.com with SMTP id 72so47067481uaf.3 for <25875@debbugs.gnu.org>; Mon, 27 Feb 2017 11:57:00 -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=myiEYD6lYbdmHJafmnuergBYFhhHIU+1MOYckwzm3Ps=; b=pV5XzEid8i5v+SWrm5HCqK5l+aJhrl/J/mogUWKjtnNcZd61LA7jMS2BDdH4aAqEQn 93y/a80N5se3/sSVmxzMl2JxK6p83OK3BvjaXPaz99NNutgg0fAKTK2oxFrtfMIWfNeR MHelcprvSjLLzjiagH27TuEIibQlSKjJJhQMb5DslZ2M9jZjLLTiI3KX9aqWnN+SOIKh ykAM3LiP4ZeHWYh3VH9eRsijA+KFVWVhMWDSxXcoy1afbPCXj79vH/8FBaDWp7IRnS1g JGx1Vp3TASBkp52Z1CzH1aW9wDSAKvSZRcA0pjziMcidu72/34497C0qSakUE3CRRIqs E8WQ== 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=myiEYD6lYbdmHJafmnuergBYFhhHIU+1MOYckwzm3Ps=; b=hP7nx0UfVqRkQQDFZLUPt3XpfBq8p0jFketHBDLho0FDFWQ1d3zra14g4ytb0jDbwu DhQ309JCQgfzVTkLIqxKCK0RFsqLwJCL9tRlIyt3e+WBIlp7qNd8ETIW7rlhYdkAaNAc bM/2TSSphYLrotDkIIxahKzpR+CevASYRHLX0o2JWNPWYunwRI3xILD0QlzSbV5JZzex Watqyag03KT8DySLKIA+qWz3BHFwte8SULevPbej1L2JWsP2Hfxlmwy85xTSUZL9/oad hH3S39oA3K/Q/9Y8sk+OY+TszW2DJjwTLsuwkqL5h5jhLKGg6ECvFiFlErjkzv9m1ZsT JD8w== X-Gm-Message-State: AMke39nVchoFXdWXWh8qmQS/yEQqGWAelBnkYf6jhN2PDJWJtXXReIWec5Pjib1SspCa+5XB+OGXZHz5uzba2Q== X-Received: by 10.31.93.66 with SMTP id r63mr8289756vkb.126.1488225415117; Mon, 27 Feb 2017 11:56:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.71.214 with HTTP; Mon, 27 Feb 2017 11:56:24 -0800 (PST) In-Reply-To: References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <83shmzprwo.fsf@gnu.org> <83fuizphp8.fsf@gnu.org> From: Richard Copley Date: Mon, 27 Feb 2017 19:56:24 +0000 Message-ID: Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Ken Brown Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25875 Cc: Eli Zaretskii , 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 27 February 2017 at 19:46, Richard Copley wrote: > On 27 February 2017 at 19:39, Ken Brown wrote: >> On 2/27/2017 2:30 PM, Richard Copley wrote: >>> >>> If you want to block or delay a shutdown in recent >>> Windows versions you need to use >>> ShutdownBlockReasonCreate (it's unfortunate, but >>> we lazy programmers proved we couldn't be trusted, >>> collectively, to handle WM_QUERY_ENDSESSION >>> correctly, so the arms race had to be escalated in >>> order to allow users to shut down their computers >>> reliably). >> >> >> In spite of the careless mistake in my patch, you could still test Eli's >> suggestion of using SendMessageTimeout instead of SendMessage, at least in >> my_show_window. > > I can't, not really. Remember, I don't have a recipe. > I'll never be able to observe whether it's working or not. > (Am I missing something?) > >>> Ken, what was the original change intended to guard >>> against? What would people be doing with Emacs that >>> can't simply be abandoned? Did you have a particular >>> example in mind? >> >> >> Bug#23483. > > That's not a real issue, in my opinion. It's already covered, > by autosave. There are programs like the OP in #23483 described, which interrupt a shutdown to ask the user whether to save. Some of them even call themselves "programmers' text editors" (shudder). Emacs autosave is and always has been a better solution. You can shoot yourself in the foot by making small but important changes and then immediately shutting down Windows. But you'd almost have to be doing it on purpose. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 15:19:34 2017 Received: (at 25875) by debbugs.gnu.org; 27 Feb 2017 20:19:34 +0000 Received: from localhost ([127.0.0.1]:58709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciRle-0007U4-CU for submit@debbugs.gnu.org; Mon, 27 Feb 2017 15:19:34 -0500 Received: from limerock01.mail.cornell.edu ([128.84.13.241]:41430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciRlc-0007Tr-3O for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 15:19:32 -0500 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite4.serverfarm.cornell.edu [10.16.197.9]) by limerock01.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id v1RKJORJ015079; Mon, 27 Feb 2017 15:19:25 -0500 Received: from [192.168.1.6] (mta-68-175-148-36.twcny.rr.com [68.175.148.36] (may be forged)) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id v1RKJNcJ031246 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 27 Feb 2017 15:19:24 -0500 Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Richard Copley References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <83shmzprwo.fsf@gnu.org> <83fuizphp8.fsf@gnu.org> From: Ken Brown Message-ID: <126703a8-f5ad-723e-2fba-4b642556972e@cornell.edu> Date: Mon, 27 Feb 2017 15:19:21 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Cornell-Gauge: Gauge=XXXXX X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none; X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 25875 Cc: Eli Zaretskii , 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On 2/27/2017 2:56 PM, Richard Copley wrote: > On 27 February 2017 at 19:46, Richard Copley wrote: >> On 27 February 2017 at 19:39, Ken Brown wrote: >>> On 2/27/2017 2:30 PM, Richard Copley wrote: >>>> >>>> If you want to block or delay a shutdown in recent >>>> Windows versions you need to use >>>> ShutdownBlockReasonCreate (it's unfortunate, but >>>> we lazy programmers proved we couldn't be trusted, >>>> collectively, to handle WM_QUERY_ENDSESSION >>>> correctly, so the arms race had to be escalated in >>>> order to allow users to shut down their computers >>>> reliably). >>> >>> >>> In spite of the careless mistake in my patch, you could still test Eli's >>> suggestion of using SendMessageTimeout instead of SendMessage, at least in >>> my_show_window. >> >> I can't, not really. Remember, I don't have a recipe. >> I'll never be able to observe whether it's working or not. >> (Am I missing something?) >> >>>> Ken, what was the original change intended to guard >>>> against? What would people be doing with Emacs that >>>> can't simply be abandoned? Did you have a particular >>>> example in mind? >>> >>> >>> Bug#23483. >> >> That's not a real issue, in my opinion. It's already covered, >> by autosave. No, it isn't covered. We don't know that the auto-save files are up-to-date at the time of shutdown. > There are programs like the OP in #23483 described, which > interrupt a shutdown to ask the user whether to save. Some of > them even call themselves "programmers' text editors" (shudder). > Emacs autosave is and always has been a better solution. > You can shoot yourself in the foot by making small but important > changes and then immediately shutting down Windows. But you'd > almost have to be doing it on purpose. I think it's reasonable for Emacs to attempt an orderly shutdown when the system is being shutdown, rather than just allowing the system to kill it. You've found a bug in my implementation of this, and I'm happy to try to fix it. Ken From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 15:28:05 2017 Received: (at 25875) by debbugs.gnu.org; 27 Feb 2017 20:28:05 +0000 Received: from localhost ([127.0.0.1]:58718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciRtt-0007gO-Fo for submit@debbugs.gnu.org; Mon, 27 Feb 2017 15:28:05 -0500 Received: from eggs.gnu.org ([208.118.235.92]:42227) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciRts-0007fu-2k for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 15:28:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciRth-0008SO-VY for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 15:27:58 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35551) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciRth-0008SK-SC; Mon, 27 Feb 2017 15:27:53 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2919 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ciRth-0007cE-1m; Mon, 27 Feb 2017 15:27:53 -0500 Date: Mon, 27 Feb 2017 22:27:41 +0200 Message-Id: <83efyjpef6.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley In-reply-to: (message from Richard Copley on Mon, 27 Feb 2017 19:46:21 +0000) Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <83shmzprwo.fsf@gnu.org> <83fuizphp8.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org, kbrown@cornell.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Richard Copley > Date: Mon, 27 Feb 2017 19:46:21 +0000 > Cc: Eli Zaretskii , 25875@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. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 15:52:55 2017 Received: (at 25875) by debbugs.gnu.org; 27 Feb 2017 20:52:55 +0000 Received: from localhost ([127.0.0.1]:58734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciSHv-0008FO-7Z for submit@debbugs.gnu.org; Mon, 27 Feb 2017 15:52:55 -0500 Received: from mail-ua0-f182.google.com ([209.85.217.182]:34151) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciSHt-0008FA-3d for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 15:52:53 -0500 Received: by mail-ua0-f182.google.com with SMTP id f54so40013091uaa.1 for <25875@debbugs.gnu.org>; Mon, 27 Feb 2017 12:52:53 -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=NcBOE9i1kFjNTZvdZEb2nFmUeOwduwis/cdngeXvVB8=; b=OzatRdZxd4golWaP7MfVWNyvumHCikF9OEq37NmBoAHivtPuREpKEyfMhuGnBEcE8o oHYEXpAU1SykxUpefvlfIznq6k+pP2D5nU5jT/pEv2h4JvYZjJ9uGOazcpwwfcXc8tA/ 8mPRDsYm8fu5Irj6zLTHmj/f5rJUoBpCuy7cMSK56sb27UAzvkcxtqGS+OQ0GVOAvgyj okBZoFDg4Qmdd/p3j9uyaz6bJ/wq4gzT4LwfC/87zZXphMEFjjPcAGNx5JWuLD6oPuhh 098Goxk4YSTDKro6YIhoWFVu0m/1XN4pFXqxLsf3zLGgxYQZE2LXqX62KFgywBPlSQZI Aa2g== 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=NcBOE9i1kFjNTZvdZEb2nFmUeOwduwis/cdngeXvVB8=; b=jqmzfMPsLwbCZojH20Qn7E2mEJ7kOoguGFnT7BLsivvvL8WfjAQkUWsl6YkjqljUam 1+yr4X1952xB1txY7ucIrLMHL3ui9yDzzEPzBG5OaG4CDe0u4IZueP5GhFyIZvMpnWeN WOJXcOeAGz97indz4qcv5f8g/2NzeIAkLzbKt7IeH/iBAFriGOcJJLpU6QpiHaeMEueE l/KzCzBU+a5R8IK3Ya8pFhxlUCiVB4lP4chykNvxx3WfBtd98B9L8Y50LzkwxYzy9pDW mYxzE6HA7Nwuppme2vNmmwcKTFrxHaJxT6JvzNyuGsYBTsNpjwpQlQqx0dIqyUrmfczb NAPw== X-Gm-Message-State: AMke39ma3bJ+dHHsm3Am2sXF3R/HVK50JPtxSyGAB1ejD3ovN/MeQyBAUZCDRr5SGBXaDz3iCWLSyYGGviFZeA== X-Received: by 10.31.248.142 with SMTP id w136mr7646286vkh.140.1488228767385; Mon, 27 Feb 2017 12:52:47 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.71.214 with HTTP; Mon, 27 Feb 2017 12:52:16 -0800 (PST) In-Reply-To: <83efyjpef6.fsf@gnu.org> References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <83shmzprwo.fsf@gnu.org> <83fuizphp8.fsf@gnu.org> <83efyjpef6.fsf@gnu.org> From: Richard Copley Date: Mon, 27 Feb 2017 20:52:16 +0000 Message-ID: Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org, Ken Brown X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 27 February 2017 at 20:27, Eli Zaretskii wrote: >> From: Richard Copley >> Date: Mon, 27 Feb 2017 19:46:21 +0000 >> Cc: Eli Zaretskii , 25875@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 From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 15:58:26 2017 Received: (at 25875) by debbugs.gnu.org; 27 Feb 2017 20:58:26 +0000 Received: from localhost ([127.0.0.1]:58739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciSNF-0008N2-Sp for submit@debbugs.gnu.org; Mon, 27 Feb 2017 15:58:26 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciSNE-0008Mp-MI for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 15:58:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciSN6-0008MO-Cr for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 15:58:19 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35875) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciSN6-0008MK-9X; Mon, 27 Feb 2017 15:58:16 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2938 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ciSN5-000855-EI; Mon, 27 Feb 2017 15:58:15 -0500 Date: Mon, 27 Feb 2017 22:58:03 +0200 Message-Id: <83bmtnpd0k.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley In-reply-to: (message from Richard Copley on Mon, 27 Feb 2017 20:52:16 +0000) Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <83shmzprwo.fsf@gnu.org> <83fuizphp8.fsf@gnu.org> <83efyjpef6.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org, kbrown@cornell.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Richard Copley > Date: Mon, 27 Feb 2017 20:52:16 +0000 > Cc: Ken Brown , 25875@debbugs.gnu.org > > 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 No, it's the main thread that calls SendMessage, to tell the input thread to draw something. And since the input thread is inside 'sleep', the SendMessage call never returns, and the main thread never gets around to checking its input queue, where there's an event bound to kill-emacs, waiting to be processed. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 16:10:30 2017 Received: (at 25875) by debbugs.gnu.org; 27 Feb 2017 21:10:30 +0000 Received: from localhost ([127.0.0.1]:58747 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciSYw-0000DB-At for submit@debbugs.gnu.org; Mon, 27 Feb 2017 16:10:30 -0500 Received: from mail-ua0-f179.google.com ([209.85.217.179]:33103) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciSYu-0000Cy-H4 for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 16:10:28 -0500 Received: by mail-ua0-f179.google.com with SMTP id e4so36800791uae.0 for <25875@debbugs.gnu.org>; Mon, 27 Feb 2017 13:10:28 -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=o1/ajrDVff6hQItYTtlDrtIMIpBcON+MksxYBjaFt9Q=; b=pspb9OZurpx34dZvgOrYd5E3sNpLkdpGg7+6OuwmE1/jz0xaCctjAHDhsNJkrRVvxv B4KX+iPVCkssvxC47XTWehBfJCO+8bbpPoKVIRT4IOL+mhiU5ygCGHFP+A157YRWCW6R Cn9kfD5izd1Jax8ig/kLNt7PSLy43jGMgaQwijOxbBLm0GsnRS2wxAzKBKFxneokWFLW XJ11AzpW7zbXeVnY1HUQTPLPylkyhK+XeI0oBNu4zNsN/KgBdj8ewoKjaEUcq158MCcW a50AsgzmpfzEBpUYZRL3hlqa3K/Egm1gsoLcrNIdWdiIuEupEv3wAjIfNJmpZJsdhkpV J9SA== 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=o1/ajrDVff6hQItYTtlDrtIMIpBcON+MksxYBjaFt9Q=; b=FJkR4c0n8PIUaA8Hq4YpKFBlUSE6rm1Kn5nb6F8V75ZIAM1NKkmVpj7kVGIlYchZbj Bu4pwOLLuq7eAw7TMC/4eLd6P/QuF8wFc/+kT/7Ywx8v8t2uLDFGqPkCvgxHWCNqD1Wv AaWDd54DSiOMCjin8Xfc9V3407xi0ENp5UtbV6kh0KPNcO+lOYLXe+DSrhzf8P6CV3Gh yxmPjItYouPiPa605aUZy98nK/PWgAhAU5qrpDDPhQp1mSdC+hVHRzMphE+3JTtsessI bTiD53ghDGNAu1rJrrKAYx1KvpXKGbWqDvYiMExNj18yjREQ/E6QdmXrLwuxhFwcXNS3 jLAg== X-Gm-Message-State: AMke39nHL8IkyFFmg1yj5I1pJ22XWQgL0xGQ7UdgLPQGoDzynYfCmp0CxboHyaXwGSvp8IHUyFp3AEY9EXHCuQ== X-Received: by 10.176.82.16 with SMTP id i16mr7571705uaa.77.1488229823070; Mon, 27 Feb 2017 13:10:23 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.71.214 with HTTP; Mon, 27 Feb 2017 13:09:52 -0800 (PST) In-Reply-To: <83bmtnpd0k.fsf@gnu.org> References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <83shmzprwo.fsf@gnu.org> <83fuizphp8.fsf@gnu.org> <83efyjpef6.fsf@gnu.org> <83bmtnpd0k.fsf@gnu.org> From: Richard Copley Date: Mon, 27 Feb 2017 21:09:52 +0000 Message-ID: Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org, Ken Brown X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 27 February 2017 at 20:58, Eli Zaretskii wrote: >> From: Richard Copley >> Date: Mon, 27 Feb 2017 20:52:16 +0000 >> Cc: Ken Brown , 25875@debbugs.gnu.org >> >> 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 > > No, it's the main thread that calls SendMessage, to tell the input > thread to draw something. And since the input thread is inside > 'sleep', the SendMessage call never returns, and the main thread never > gets around to checking its input queue, where there's an event bound > to kill-emacs, waiting to be processed. Please Eli, read what I said again. It might not be right, but you misunderstood it. I know the input thread isn't calling SendMessage. It's callling PostMessage and then sleep. I'm suggesting that the input thread should call SendMessage. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 17:37:41 2017 Received: (at 25875) by debbugs.gnu.org; 27 Feb 2017 22:37:41 +0000 Received: from localhost ([127.0.0.1]:58799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciTvJ-0002Bw-AH for submit@debbugs.gnu.org; Mon, 27 Feb 2017 17:37:41 -0500 Received: from limerock01.mail.cornell.edu ([128.84.13.241]:40596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciTvH-0002Bi-Fo for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 17:37:39 -0500 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock01.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id v1RMbXME008540; Mon, 27 Feb 2017 17:37:33 -0500 Received: from [192.168.1.4] (mta-68-175-148-36.twcny.rr.com [68.175.148.36] (may be forged)) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id v1RMbVfW021240 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 27 Feb 2017 17:37:32 -0500 Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Richard Copley References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> From: Ken Brown Message-ID: <648f03f0-e4d4-c04e-afbf-d8ef8741b15e@cornell.edu> Date: Mon, 27 Feb 2017 17:37:36 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------D449AD32CFD6AC8A636BF736" X-PMX-Cornell-Gauge: Gauge=XXXXX X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none; X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 25875 Cc: Eli Zaretskii , 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) This is a multi-part message in MIME format. --------------D449AD32CFD6AC8A636BF736 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 2/27/2017 3:14 AM, Richard Copley wrote: > Sorry Ken, I can't sabotage myself like that, I have work to do. FWIW, I'm attaching a corrected version of the patch. With one exception, it only replaces SendMessage by SendMessageTimeout in cases where the return value of SendMessage was not used. In the exceptional case, the return value was only tested to see if it was 0 or not, so I think the replacement is still correct. Richard, it's your call whether or not it's worthwhile for you to run with this patch for a while and see what happens. I understand that this might not give a definitive answer. I still want to eventually apply the patch I posted in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25875#41, which I think will solve the problem in a less satisfactory way. But I'd rather hold off on that in the hope that we'll get some evidence as to whether we've correctly diagnosed the problem. Ken --------------D449AD32CFD6AC8A636BF736 Content-Type: text/plain; charset=UTF-8; name="SendMessageTimeout.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="SendMessageTimeout.patch" ZGlmZiAtLWdpdCBhL3NyYy93MzJ0ZXJtLmMgYi9zcmMvdzMydGVybS5jCmluZGV4IGQ2Yjc4 ZmQuLmJhNjQ2ZmIgMTAwNjQ0Ci0tLSBhL3NyYy93MzJ0ZXJtLmMKKysrIGIvc3JjL3czMnRl cm0uYwpAQCAtNTQ4LDcgKzU0OCw4IEBAIHhfdXBkYXRlX3dpbmRvd19iZWdpbiAoc3RydWN0 IHdpbmRvdyAqdykKICAgLyogSGlkZSB0aGUgc3lzdGVtIGNhcmV0IGR1cmluZyBhbiB1cGRh dGUuICAqLwogICBpZiAodzMyX3VzZV92aXNpYmxlX3N5c3RlbV9jYXJldCAmJiB3MzJfc3lz dGVtX2NhcmV0X2h3bmQpCiAgICAgewotICAgICAgU2VuZE1lc3NhZ2UgKHczMl9zeXN0ZW1f Y2FyZXRfaHduZCwgV01fRU1BQ1NfSElERV9DQVJFVCwgMCwgMCk7CisgICAgICBTZW5kTWVz c2FnZVRpbWVvdXQgKHczMl9zeXN0ZW1fY2FyZXRfaHduZCwgV01fRU1BQ1NfSElERV9DQVJF VCwgMCwgMCwKKwkJCSAgMCwgMTAwLCBOVUxMKTsKICAgICB9CiAKICAgdy0+b3V0cHV0X2N1 cnNvciA9IHctPmN1cnNvcjsKQEAgLTcxNCw3ICs3MTUsOCBAQCB4X3VwZGF0ZV93aW5kb3df ZW5kIChzdHJ1Y3Qgd2luZG93ICp3LCBib29sIGN1cnNvcl9vbl9wLAogICAgICB4X3VwZGF0 ZV93aW5kb3dfYmVnaW4uICAqLwogICBpZiAodzMyX3VzZV92aXNpYmxlX3N5c3RlbV9jYXJl dCAmJiB3MzJfc3lzdGVtX2NhcmV0X2h3bmQpCiAgICAgewotICAgICAgU2VuZE1lc3NhZ2Ug KHczMl9zeXN0ZW1fY2FyZXRfaHduZCwgV01fRU1BQ1NfU0hPV19DQVJFVCwgMCwgMCk7Cisg ICAgICBTZW5kTWVzc2FnZVRpbWVvdXQgKHczMl9zeXN0ZW1fY2FyZXRfaHduZCwgV01fRU1B Q1NfU0hPV19DQVJFVCwgMCwgMCwKKwkJCSAgMCwgMTAwLCBOVUxMKTsKICAgICB9CiB9CiAK QEAgLTM2NjgsOCArMzY3MCw4IEBAIHN0YXRpYyBCT09MCiBteV9zaG93X3dpbmRvdyAoc3Ry dWN0IGZyYW1lICpmLCBIV05EIGh3bmQsIGludCBob3cpCiB7CiAjaWZuZGVmIEFUVEFDSF9U SFJFQURTCi0gIHJldHVybiBTZW5kTWVzc2FnZSAoRlJBTUVfVzMyX1dJTkRPVyAoZiksIFdN X0VNQUNTX1NIT1dXSU5ET1csCi0JCSAgICAgIChXUEFSQU0pIGh3bmQsIChMUEFSQU0pIGhv dyk7CisgIHJldHVybiBTZW5kTWVzc2FnZVRpbWVvdXQgKEZSQU1FX1czMl9XSU5ET1cgKGYp LCBXTV9FTUFDU19TSE9XV0lORE9XLAorCQkJICAgICAoV1BBUkFNKSBod25kLCAoTFBBUkFN KSBob3csIDAsIDEwMCwgTlVMTCk7CiAjZWxzZQogICByZXR1cm4gU2hvd1dpbmRvdyAoaHdu ZCwgaG93KTsKICNlbmRpZgpAQCAtMzY4Nyw3ICszNjg5LDggQEAgbXlfc2V0X3dpbmRvd19w b3MgKEhXTkQgaHduZCwgSFdORCBod25kQWZ0ZXIsCiAgIHBvcy5jeCA9IGN4OwogICBwb3Mu Y3kgPSBjeTsKICAgcG9zLmZsYWdzID0gZmxhZ3M7Ci0gIFNlbmRNZXNzYWdlIChod25kLCBX TV9FTUFDU19TRVRXSU5ET1dQT1MsIChXUEFSQU0pICZwb3MsIDApOworICBTZW5kTWVzc2Fn ZVRpbWVvdXQgKGh3bmQsIFdNX0VNQUNTX1NFVFdJTkRPV1BPUywgKFdQQVJBTSkgJnBvcywg MCwKKwkJICAgICAgMCwgMTAwLCBOVUxMKTsKICNlbHNlCiAgIFNldFdpbmRvd1BvcyAoaHdu ZCwgaHduZEFmdGVyLCB4LCB5LCBjeCwgY3ksIGZsYWdzKTsKICNlbmRpZgpAQCAtMzY5Nywy OSArMzcwMCwzMSBAQCBteV9zZXRfd2luZG93X3BvcyAoSFdORCBod25kLCBIV05EIGh3bmRB ZnRlciwKIHN0YXRpYyB2b2lkCiBteV9zZXRfZm9jdXMgKHN0cnVjdCBmcmFtZSAqIGYsIEhX TkQgaHduZCkKIHsKLSAgU2VuZE1lc3NhZ2UgKEZSQU1FX1czMl9XSU5ET1cgKGYpLCBXTV9F TUFDU19TRVRGT0NVUywKLQkgICAgICAgKFdQQVJBTSkgaHduZCwgMCk7CisgIFNlbmRNZXNz YWdlVGltZW91dCAoRlJBTUVfVzMyX1dJTkRPVyAoZiksIFdNX0VNQUNTX1NFVEZPQ1VTLAor CQkgICAgICAoV1BBUkFNKSBod25kLCAwLCAwLCAxMDAsIE5VTEwpOwogfQogI2VuZGlmCiAK IHN0YXRpYyB2b2lkCiBteV9zZXRfZm9yZWdyb3VuZF93aW5kb3cgKEhXTkQgaHduZCkKIHsK LSAgU2VuZE1lc3NhZ2UgKGh3bmQsIFdNX0VNQUNTX1NFVEZPUkVHUk9VTkQsIChXUEFSQU0p IGh3bmQsIDApOworICBTZW5kTWVzc2FnZVRpbWVvdXQgKGh3bmQsIFdNX0VNQUNTX1NFVEZP UkVHUk9VTkQsIChXUEFSQU0pIGh3bmQsIDAsCisJCSAgICAgIDAsIDEwMCwgTlVMTCk7CiB9 CiAKIAogc3RhdGljIHZvaWQKIG15X2Rlc3Ryb3lfd2luZG93IChzdHJ1Y3QgZnJhbWUgKiBm LCBIV05EIGh3bmQpCiB7Ci0gIFNlbmRNZXNzYWdlIChGUkFNRV9XMzJfV0lORE9XIChmKSwg V01fRU1BQ1NfREVTVFJPWVdJTkRPVywKLQkgICAgICAgKFdQQVJBTSkgaHduZCwgMCk7Cisg IFNlbmRNZXNzYWdlVGltZW91dCAoRlJBTUVfVzMyX1dJTkRPVyAoZiksIFdNX0VNQUNTX0RF U1RST1lXSU5ET1csCisJCSAgICAgIChXUEFSQU0pIGh3bmQsIDAsIDAsIDEwMCwgTlVMTCk7 CiB9CiAKIHN0YXRpYyB2b2lkCiBteV9icmluZ193aW5kb3dfdG9fdG9wIChIV05EIGh3bmQp CiB7Ci0gIFNlbmRNZXNzYWdlIChod25kLCBXTV9FTUFDU19CUklOR1RPVE9QLCAoV1BBUkFN KSBod25kLCAwKTsKKyAgU2VuZE1lc3NhZ2VUaW1lb3V0IChod25kLCBXTV9FTUFDU19CUklO R1RPVE9QLCAoV1BBUkFNKSBod25kLCAwLAorCQkgICAgICAwLCAxMDAsIE5VTEwpOwogfQog CiAvKiBDcmVhdGUgYSBzY3JvbGwgYmFyIGFuZCByZXR1cm4gdGhlIHNjcm9sbCBiYXIgdmVj dG9yIGZvciBpdC4gIFcgaXMKQEAgLTY1MzgsNyArNjU0Myw4IEBAIHhfaWNvbmlmeV9mcmFt ZSAoc3RydWN0IGZyYW1lICpmKQogICB4X3NldF9iaXRtYXBfaWNvbiAoZik7CiAKICAgLyog U2ltdWxhdGUgdGhlIHVzZXIgbWluaW1pemluZyB0aGUgZnJhbWUuICAqLwotICBTZW5kTWVz c2FnZSAoRlJBTUVfVzMyX1dJTkRPVyAoZiksIFdNX1NZU0NPTU1BTkQsIFNDX01JTklNSVpF LCAwKTsKKyAgU2VuZE1lc3NhZ2VUaW1lb3V0IChGUkFNRV9XMzJfV0lORE9XIChmKSwgV01f U1lTQ09NTUFORCwgU0NfTUlOSU1JWkUsIDAsCisJCSAgICAgIDAsIDEwMCwgTlVMTCk7CiAK ICAgU0VUX0ZSQU1FX1ZJU0lCTEUgKGYsIDApOwogICBTRVRfRlJBTUVfSUNPTklGSUVEIChm LCB0cnVlKTsK --------------D449AD32CFD6AC8A636BF736-- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 18:04:04 2017 Received: (at 25875) by debbugs.gnu.org; 27 Feb 2017 23:04:04 +0000 Received: from localhost ([127.0.0.1]:58812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciUKp-0002mx-Rn for submit@debbugs.gnu.org; Mon, 27 Feb 2017 18:04:04 -0500 Received: from mail-ua0-f182.google.com ([209.85.217.182]:33662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciUKo-0002mU-97 for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 18:04:02 -0500 Received: by mail-ua0-f182.google.com with SMTP id e4so39625421uae.0 for <25875@debbugs.gnu.org>; Mon, 27 Feb 2017 15:04:02 -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=zwVQYTBrjSxpU6pLncFe+xvA+dXCphHdXEdkTOxUEKc=; b=bz6Ud8MFY6rOv1/if7hRqzJxgjS517lIU134JF0MMwR01pUYQ5EVoewlZ0BziGqO5j abn5HRhHxK6hfjXqTkryPVmPNWsrK1dygaQjXRSSiT3advQaEhTaMTWoWFC9lHR3QGCP F6ZSBdOIdMr9AIdoUekHO5sMOtgHcwtpsuRoKgAZzC+8mdUGO2gma/+3hDfu4rkgGbrh LHWUtfUqnuWZGX3mz/ArXZyx/2JggI15H9J1hco+SMFqwP8StZrY/OLgGJD8uLH2WBVl gFJ7Z6bGJwI9OWTIpSEB4K05TrBc8S3vH+0OUpa17RyT5aljxP0Xa1DRGCeEKs10eAwJ p12g== 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=zwVQYTBrjSxpU6pLncFe+xvA+dXCphHdXEdkTOxUEKc=; b=QQPCsrOBP7y0IrMrVni3SUChl2CqL3neYEq7CVO/b88vsWeFGI8dYvqW19fdygAdM0 CnrzIvWcPLHpxxQXtDnpP+pw8qQRVe/cmVXTIW2c3HWPfkqmganhuY4LqtBbIEKMW3DM Xx1hSulAYKFGQk6na4RMu0g2N6mqOSHe3Q2UG60CNxphbER6laodi+afNUojaFtsNYaK FgRVFZjWiEtujqa4Fu/YwlhV578tTTHHxZ2cnMHIElhe5kVuuqEMnzSXtIw4Y75O3NWX 0nDDgjSp7dK5lI6sDLfhgKxW/n1e1gHwTbBn4zPMzhI7eVXWLExPnpCWMwnHQQPUCEy+ uENw== X-Gm-Message-State: AMke39nT24f7YDcBXjWxWEgfZ7fT5rEToqy9iplxVpr6X+Kj+K1PCWRGbWpobw3n0hR1J9TeCJDmqLVBnO8TWg== X-Received: by 10.176.7.106 with SMTP id h97mr8875712uah.52.1488236636703; Mon, 27 Feb 2017 15:03:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.71.214 with HTTP; Mon, 27 Feb 2017 15:03:26 -0800 (PST) In-Reply-To: <648f03f0-e4d4-c04e-afbf-d8ef8741b15e@cornell.edu> References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <648f03f0-e4d4-c04e-afbf-d8ef8741b15e@cornell.edu> From: Richard Copley Date: Mon, 27 Feb 2017 23:03:26 +0000 Message-ID: Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Ken Brown Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25875 Cc: Eli Zaretskii , 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 27 February 2017 at 22:37, Ken Brown wrote: > On 2/27/2017 3:14 AM, Richard Copley wrote: >> >> Sorry Ken, I can't sabotage myself like that, I have work to do. > > > FWIW, I'm attaching a corrected version of the patch. With one exception, > it only replaces SendMessage by SendMessageTimeout in cases where the return > value of SendMessage was not used. In the exceptional case, the return > value was only tested to see if it was 0 or not, so I think the replacement > is still correct. > > Richard, it's your call whether or not it's worthwhile for you to run with > this patch for a while and see what happens. I understand that this might > not give a definitive answer. > > I still want to eventually apply the patch I posted in > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25875#41, which I think will > solve the problem in a less satisfactory way. But I'd rather hold off on > that in the hope that we'll get some evidence as to whether we've correctly > diagnosed the problem. Please imagine: I report back after a week (or two, or four) and tell you that Emacs didn't prevent any Windows shutdowns. In that time I might have attempted to shut down Windows a handful of times. Will you have learned anything, anything at all? If the answer is yes, I'll be happy to help. Otherwise I'd just be wasting your time. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 22:31:24 2017 Received: (at 25875) by debbugs.gnu.org; 28 Feb 2017 03:31:24 +0000 Received: from localhost ([127.0.0.1]:58887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciYVX-0000Mb-P2 for submit@debbugs.gnu.org; Mon, 27 Feb 2017 22:31:24 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49227) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciYVW-0000MO-03 for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 22:31:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciYVN-0005d8-KY for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 22:31:16 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40271) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciYVN-0005d2-Hw; Mon, 27 Feb 2017 22:31:13 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3127 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ciYVM-0005Nn-A1; Mon, 27 Feb 2017 22:31:13 -0500 Date: Tue, 28 Feb 2017 05:30:50 +0200 Message-Id: <83a897outx.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley In-reply-to: (message from Richard Copley on Mon, 27 Feb 2017 21:09:52 +0000) Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <83shmzprwo.fsf@gnu.org> <83fuizphp8.fsf@gnu.org> <83efyjpef6.fsf@gnu.org> <83bmtnpd0k.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org, kbrown@cornell.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Richard Copley > Date: Mon, 27 Feb 2017 21:09:52 +0000 > Cc: Ken Brown , 25875@debbugs.gnu.org > > >> 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 > > > > No, it's the main thread that calls SendMessage, to tell the input > > thread to draw something. And since the input thread is inside > > 'sleep', the SendMessage call never returns, and the main thread never > > gets around to checking its input queue, where there's an event bound > > to kill-emacs, waiting to be processed. > > Please Eli, read what I said again. It might not be right, but you > misunderstood it. > I know the input thread isn't calling SendMessage. It's callling PostMessage and > then sleep. I'm suggesting that the input thread should call SendMessage. The input thread doesn't call PostMessage. It calls post_message, which is a private messaging mechanism between the input thread and the main thread, implemented in w32xfns.c and based on a critical section. IOW, we don't use the Windows messaging in that case. So I don't see how calling SendMessage will help in this situation. Am I missing something? From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 22:35:39 2017 Received: (at 25875) by debbugs.gnu.org; 28 Feb 2017 03:35:39 +0000 Received: from localhost ([127.0.0.1]:58892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciYZf-0000SE-DI for submit@debbugs.gnu.org; Mon, 27 Feb 2017 22:35:39 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciYZd-0000S1-Nb for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 22:35:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciYZV-00071h-JX for 25875@debbugs.gnu.org; Mon, 27 Feb 2017 22:35:32 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40298) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciYZV-00071d-H4; Mon, 27 Feb 2017 22:35:29 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3131 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ciYZU-0008An-Gd; Mon, 27 Feb 2017 22:35:29 -0500 Date: Tue, 28 Feb 2017 05:35:06 +0200 Message-Id: <8360jvoumt.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley In-reply-to: (message from Richard Copley on Mon, 27 Feb 2017 23:03:26 +0000) Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <648f03f0-e4d4-c04e-afbf-d8ef8741b15e@cornell.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org, kbrown@cornell.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Richard Copley > Date: Mon, 27 Feb 2017 23:03:26 +0000 > Cc: Eli Zaretskii , 25875@debbugs.gnu.org > > Please imagine: I report back after a week (or two, or four) and tell > you that Emacs didn't prevent any Windows shutdowns. In that time > I might have attempted to shut down Windows a handful of times. > > Will you have learned anything, anything at all? How representative would the above sample be, relative to the frequency of the problem you see when shutting down Windows? If you see such problems almost every shutdown, then yes, we'd be learning a lot. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 28 01:37:42 2017 Received: (at 25875) by debbugs.gnu.org; 28 Feb 2017 06:37:42 +0000 Received: from localhost ([127.0.0.1]:58962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cibPq-0006VN-2y for submit@debbugs.gnu.org; Tue, 28 Feb 2017 01:37:42 -0500 Received: from mail-ua0-f180.google.com ([209.85.217.180]:36854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cibPo-0006V7-2h for 25875@debbugs.gnu.org; Tue, 28 Feb 2017 01:37:40 -0500 Received: by mail-ua0-f180.google.com with SMTP id 72so3194824uaf.3 for <25875@debbugs.gnu.org>; Mon, 27 Feb 2017 22:37:40 -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=Kb5+gBus21PymI1pRbr/OD93q0dZ42qRb7I3zioB87o=; b=gDiHjFRXQIctrierVKjYcD7t0CZjkNalS9Edqv4RGsNoW/Z9cN+ybkbGBuGVm9WWQa yu8m4ZKY8sxad2kdF9Exi3/6ov70sjEcUtxOaLr3y4rmPvLMEM+JT1nx/BwwPrEoxZfk 6FWfwdX/tSmlWnm3v/De8oXrZ/wjgFlPNcKQva8GAgjIldGYTSqwKY+RbkFbSI9M3XOV op6QRbuW34+d1nF8rn4eH8vu0/VB2YkoJFqhz3t4MY4wXLOYADvoiwJNRTU1SIELKl+H yOuA/EeJpgnrFfJ02/piZO8UwSwLO0w3vzNMHoE0vFcOUCymXGBThFgWvLcackZIDpZJ giPw== 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=Kb5+gBus21PymI1pRbr/OD93q0dZ42qRb7I3zioB87o=; b=inFXXo8BbS/QO+m8VR+0LLHpy1oek3aw5bq/gtFjQ78gbQErlKFmmUGh8mhbAceTyx dMsukJcRHhAUmnjWWeK1qRL8wmKdw3oF2gPhbnfwBmt6o0KJELWAeIpOzumnwlV/Qj0W jBoE9vmMPyhn3zxJZhxgZExBng1Wr+8mrLjWZg3oh2+31Wc63OQask/JhiGM7YuqbGkM viufH/p3SMqI5Zothj6u+dl49xyf7Hg7uSNLGC80aLmFJ54dTLb/epolA5sTHAh2F9ZU /n/ZW1s9eLpgfZNSAdFRaoNsqNog4IfbzHJMgdiVRLNP2m270ZWpwf2t+lcyfMVDPWJE b8uw== X-Gm-Message-State: AMke39mpmO438Qn+aRqVMsruQ40vxgxkQPlwyL0PJIhYtX37Pgw9nI9OAz+29PBrfcBwAvLuBzasHTpLfswk4Q== X-Received: by 10.159.48.147 with SMTP id j19mr330595uab.6.1488263854200; Mon, 27 Feb 2017 22:37:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.71.214 with HTTP; Mon, 27 Feb 2017 22:37:03 -0800 (PST) In-Reply-To: <83a897outx.fsf@gnu.org> References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <83shmzprwo.fsf@gnu.org> <83fuizphp8.fsf@gnu.org> <83efyjpef6.fsf@gnu.org> <83bmtnpd0k.fsf@gnu.org> <83a897outx.fsf@gnu.org> From: Richard Copley Date: Tue, 28 Feb 2017 06:37:03 +0000 Message-ID: Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org, Ken Brown X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 28 February 2017 at 03:30, Eli Zaretskii wrote: >> From: Richard Copley >> Date: Mon, 27 Feb 2017 21:09:52 +0000 >> Cc: Ken Brown , 25875@debbugs.gnu.org >> >> >> 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 >> > >> > No, it's the main thread that calls SendMessage, to tell the input >> > thread to draw something. And since the input thread is inside >> > 'sleep', the SendMessage call never returns, and the main thread never >> > gets around to checking its input queue, where there's an event bound >> > to kill-emacs, waiting to be processed. >> >> Please Eli, read what I said again. It might not be right, but you >> misunderstood it. >> I know the input thread isn't calling SendMessage. It's callling PostMessage and >> then sleep. I'm suggesting that the input thread should call SendMessage. > > The input thread doesn't call PostMessage. It calls post_message, > which is a private messaging mechanism between the input thread and > the main thread, implemented in w32xfns.c and based on a critical > section. IOW, we don't use the Windows messaging in that case. So I > don't see how calling SendMessage will help in this situation. Am I > missing something? I see, thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 28 02:21:43 2017 Received: (at 25875) by debbugs.gnu.org; 28 Feb 2017 07:21:43 +0000 Received: from localhost ([127.0.0.1]:58989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cic6R-00012f-Gz for submit@debbugs.gnu.org; Tue, 28 Feb 2017 02:21:43 -0500 Received: from mail-ua0-f174.google.com ([209.85.217.174]:33802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cic6O-00012N-J1 for 25875@debbugs.gnu.org; Tue, 28 Feb 2017 02:21:40 -0500 Received: by mail-ua0-f174.google.com with SMTP id f54so4098262uaa.1 for <25875@debbugs.gnu.org>; Mon, 27 Feb 2017 23:21:40 -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=ER/NhZgxNvLPYaVUblvDUbj/DRslxwsL6TvOO3S/DM0=; b=ioD2OHOsjCOvclHNFzCkZk1VeOqB7gnzaQRW/NXEd32xPNkLFV9/h+cK2iUW6oETL7 bbYxAV9EalnBRqhGHuuRopXoXKbVL/85img9G5qjs/Q0gM6FmWOPD8+oogay34PpRkdA hZ4wtc2RMKEKpBZDmi3QSFlgPNXwl+I5PI64p7HnmKpX9tCyBAP5WGyEsYNovLfIE5fg Qjkaq6lJM13VZqgsnN+IJrj5WiHHwd+rNg/Aqk+lEJwiNUd1mm1fG+tMw61CzyFrMqOH QqmubY0h8xxJDFDJdSjHn549StvSrantAGStm8Fkbenpm6u8phrbidMzQYet572R1b+9 ZSjA== 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=ER/NhZgxNvLPYaVUblvDUbj/DRslxwsL6TvOO3S/DM0=; b=D8+lMgeui9RnUmDMdI6AqJF7VtifCyIcuFwXDsZEZYJa7w9uMfUL96cxI+j1TXEi6S WfHGkjJlZj+NaBRlk/M+P5VhBL4QoDXGEBrnCmoOECcgCwiud64utYVdsPFNa1pnTh1X 1+h3uzgQKlEXsb2xiEzOn9hWw5B5uoLmKqWSUyU+4zzvDqC/TP0XQyhB07gluBEZ6P1p +s/4/EWPpxrpVeRxSHgxDxFR8Y2Br19FvEPFRSdLxRHYrMh4Edrc0NJmrmxh+EuxVlrN La/pfHAUOZw3qqhDptYprrBaP1UAwTnSbENd5l2afOlUXRZx15kZfOnilZQF7XagZbAP 29UQ== X-Gm-Message-State: AMke39mI+y/iw8tAL6yiw/FBNGKmbWEsj5ZeDco4rJmH5lsooW9dJ51ANuLuuuV42v81v2vOKBcyb9pKdGL3pg== X-Received: by 10.31.190.142 with SMTP id o136mr384470vkf.73.1488266495083; Mon, 27 Feb 2017 23:21:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.71.214 with HTTP; Mon, 27 Feb 2017 23:21:04 -0800 (PST) In-Reply-To: <8360jvoumt.fsf@gnu.org> References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <648f03f0-e4d4-c04e-afbf-d8ef8741b15e@cornell.edu> <8360jvoumt.fsf@gnu.org> From: Richard Copley Date: Tue, 28 Feb 2017 07:21:04 +0000 Message-ID: Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org, Ken Brown X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 28 February 2017 at 03:35, Eli Zaretskii wrote: >> From: Richard Copley >> Date: Mon, 27 Feb 2017 23:03:26 +0000 >> Cc: Eli Zaretskii , 25875@debbugs.gnu.org >> >> Please imagine: I report back after a week (or two, or four) and tell >> you that Emacs didn't prevent any Windows shutdowns. In that time >> I might have attempted to shut down Windows a handful of times. >> >> Will you have learned anything, anything at all? > > How representative would the above sample be, relative to the > frequency of the problem you see when shutting down Windows? If you > see such problems almost every shutdown, then yes, we'd be learning a > lot. In the nine months since Ken's change, I've noticed a problem with Emacs twice. Ken, Eli, are you going to be running Emacs with that patch installed? I can't get my head around the idea. If we don't care whether or not the action in question has finished when SendMessage returns, then why are we using SendMessage? And if we do care, then shouldn't I expect weird bugs caused by timing out when the system's under load? From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 28 10:36:36 2017 Received: (at 25875) by debbugs.gnu.org; 28 Feb 2017 15:36:36 +0000 Received: from localhost ([127.0.0.1]:60432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cijpM-0001p2-Gz for submit@debbugs.gnu.org; Tue, 28 Feb 2017 10:36:36 -0500 Received: from eggs.gnu.org ([208.118.235.92]:42919) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cijpL-0001om-Ed for 25875@debbugs.gnu.org; Tue, 28 Feb 2017 10:36:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cijpD-0004BR-IV for 25875@debbugs.gnu.org; Tue, 28 Feb 2017 10:36:30 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49069) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cijpD-0004BN-Em; Tue, 28 Feb 2017 10:36:27 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3412 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cijpC-0004BD-9J; Tue, 28 Feb 2017 10:36:26 -0500 Date: Tue, 28 Feb 2017 17:36:02 +0200 Message-Id: <834lzepbtp.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley In-reply-to: (message from Richard Copley on Tue, 28 Feb 2017 07:21:04 +0000) Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <648f03f0-e4d4-c04e-afbf-d8ef8741b15e@cornell.edu> <8360jvoumt.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org, kbrown@cornell.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Richard Copley > Date: Tue, 28 Feb 2017 07:21:04 +0000 > Cc: Ken Brown , 25875@debbugs.gnu.org > > > How representative would the above sample be, relative to the > > frequency of the problem you see when shutting down Windows? If you > > see such problems almost every shutdown, then yes, we'd be learning a > > lot. > > In the nine months since Ken's change, I've noticed a problem with > Emacs twice. Then I guess it would be better to just push those changes and see if they do any harm. > Ken, Eli, are you going to be running Emacs with that patch installed? I never use the master branch for serious work, so it doesn't matter what I do. In addition, I almost never shut down my systems. > I can't get my head around the idea. If we don't care whether or not > the action in question has finished when SendMessage returns, > then why are we using SendMessage? And if we do care, then > shouldn't I expect weird bugs caused by timing out when the system's > under load? If a window procedure doesn't process messages for more than 5 sec, Windows will put "Not Responding" on its caption bar. So I think the 100 msec number in Ken's patch should be changed to something like 6000, and then we are fine, because even on a busy system this should be long enough. And if Emacs (and the OS) is about to shut down, it's even less of a problem to ignore a message that timed out, IMO. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 28 11:40:08 2017 Received: (at 25875-done) by debbugs.gnu.org; 28 Feb 2017 16:40:08 +0000 Received: from localhost ([127.0.0.1]:60477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cikoq-0003Mh-5E for submit@debbugs.gnu.org; Tue, 28 Feb 2017 11:40:08 -0500 Received: from limerock02.mail.cornell.edu ([128.84.13.242]:56805) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cikoo-0003M2-KQ for 25875-done@debbugs.gnu.org; Tue, 28 Feb 2017 11:40:07 -0500 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock02.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id v1SGe0wa015489; Tue, 28 Feb 2017 11:40:00 -0500 Received: from [192.168.1.4] (mta-68-175-148-36.twcny.rr.com [68.175.148.36] (may be forged)) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id v1SGdxGZ030163 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 28 Feb 2017 11:39:59 -0500 Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Eli Zaretskii , Richard Copley References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <648f03f0-e4d4-c04e-afbf-d8ef8741b15e@cornell.edu> <8360jvoumt.fsf@gnu.org> <834lzepbtp.fsf@gnu.org> From: Ken Brown Message-ID: <7708fd40-e6dd-8022-4acf-9c86630cce19@cornell.edu> Date: Tue, 28 Feb 2017 11:40:05 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <834lzepbtp.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Cornell-Gauge: Gauge=XXXXX X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none; X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 25875-done Cc: 25875-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On 2/28/2017 10:36 AM, Eli Zaretskii wrote: >> From: Richard Copley >> In the nine months since Ken's change, I've noticed a problem with >> Emacs twice. > > Then I guess it would be better to just push those changes and see if > they do any harm. >> I can't get my head around the idea. If we don't care whether or not >> the action in question has finished when SendMessage returns, >> then why are we using SendMessage? And if we do care, then >> shouldn't I expect weird bugs caused by timing out when the system's >> under load? > > If a window procedure doesn't process messages for more than 5 sec, > Windows will put "Not Responding" on its caption bar. So I think the > 100 msec number in Ken's patch should be changed to something like > 6000, and then we are fine, because even on a busy system this should > be long enough. And if Emacs (and the OS) is about to shut down, it's > even less of a problem to ignore a message that timed out, IMO. I've pushed the patch (with 6000 msec) and am closing the bug. Richard, please reopen if you ever see the problem again. I'm leaving the sleep(1000) in w32_wnd_proc, at least for now, because I want to find out about it if the problem isn't really fixed. Maybe I'll add a FIXME comment. Ken From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 28 11:45:05 2017 Received: (at 25875) by debbugs.gnu.org; 28 Feb 2017 16:45:05 +0000 Received: from localhost ([127.0.0.1]:60484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciktc-0003Uc-PM for submit@debbugs.gnu.org; Tue, 28 Feb 2017 11:45:05 -0500 Received: from eggs.gnu.org ([208.118.235.92]:40179) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cikta-0003Tp-TC for 25875@debbugs.gnu.org; Tue, 28 Feb 2017 11:45:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciktR-0006dr-4R for 25875@debbugs.gnu.org; Tue, 28 Feb 2017 11:44:57 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50095) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciktR-0006dj-12; Tue, 28 Feb 2017 11:44:53 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3493 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ciktQ-0008TI-DB; Tue, 28 Feb 2017 11:44:52 -0500 Date: Tue, 28 Feb 2017 18:44:28 +0200 Message-Id: <83varunu37.fsf@gnu.org> From: Eli Zaretskii To: Ken Brown In-reply-to: <7708fd40-e6dd-8022-4acf-9c86630cce19@cornell.edu> (message from Ken Brown on Tue, 28 Feb 2017 11:40:05 -0500) Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <648f03f0-e4d4-c04e-afbf-d8ef8741b15e@cornell.edu> <8360jvoumt.fsf@gnu.org> <834lzepbtp.fsf@gnu.org> <7708fd40-e6dd-8022-4acf-9c86630cce19@cornell.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25875 Cc: rcopley@gmail.com, 25875@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Cc: 25875-done@debbugs.gnu.org > From: Ken Brown > Date: Tue, 28 Feb 2017 11:40:05 -0500 > > I've pushed the patch (with 6000 msec) and am closing the bug. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 28 13:59:53 2017 Received: (at 25875) by debbugs.gnu.org; 28 Feb 2017 18:59:53 +0000 Received: from localhost ([127.0.0.1]:60557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cin05-0008T7-JZ for submit@debbugs.gnu.org; Tue, 28 Feb 2017 13:59:53 -0500 Received: from mail-ua0-f174.google.com ([209.85.217.174]:36153) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cin04-0008Ss-1h for 25875@debbugs.gnu.org; Tue, 28 Feb 2017 13:59:52 -0500 Received: by mail-ua0-f174.google.com with SMTP id 72so24264374uaf.3 for <25875@debbugs.gnu.org>; Tue, 28 Feb 2017 10:59:51 -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=ajYpcjl7Q7V9OiOuHU0dKj/WNXqwqDN/yUCRMib/ZhY=; b=Uz391++Elvm1Jvi+GVuD9VY0sYE+qSFGFb8lhSZ8W/WIcxP896L4DmQmxdDLfA+6hT +dtoTmwWQEZnFbgW8wgN3bFuY05E8IzCozZjbDfsJcTVr8eFUuUKv8aaP8TejW5WSZ+G mfOw5hU4jr4Ln4eSg363dFtOeQL4zB6BuaH3Ff1q7kkMqk5+pj7ALSWHP6aEo/oW19Nf 6Ux/c6V2AiAN7F/hRz8/Z1oTye3WxmB+/gEuDIxKVApJ1vXOMr5B+0LX44DbTl1MaJuh MMnBlRPME/wxGYNOGAllYzlpR49UZ8XN52sANmqcdurYcVyqW8/oEywXQMD7XFFvtMa8 0Vyg== 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=ajYpcjl7Q7V9OiOuHU0dKj/WNXqwqDN/yUCRMib/ZhY=; b=IwdgZgUDeymdvI0ZPlb8u2YSG6LkRDPuhXEKhU4CgnXMDWotXRDc4EWgwdQkrgD5Kc acCU7kb10NTAh/R0Hci4B2ReIe4rCg5PQEZIJzv07EILNo/IVvrpPZhM2Kjkf0aRDSE+ ORpbOw2v2PZRtTBZBoBFJSawcDrlIOuwj2P3WjRev/KzkqEWXaa/eJzrgxKtah3/UoBf rvAfFncFwxWBO3pWcp7tWuBCUlvcK721r3/AJc4vFbdlEUx0m7K3r52GS38opM65a8w3 /AYXhyP4OeNst3opTGunwP8bGnpF1EsfXWLZ0o8vePZw7da3Q6CfLFcDiI1q8GVjIo+k zL1g== X-Gm-Message-State: AMke39n9VULPQrNfsr722EuID+IVQ9na6UYp/bhmaN3keNUHz4f2YlXukVY3PcfAiAa5dPvdI+gG+5ixnki3zw== X-Received: by 10.31.4.211 with SMTP id 202mr1882583vke.105.1488308386380; Tue, 28 Feb 2017 10:59:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.71.214 with HTTP; Tue, 28 Feb 2017 10:59:15 -0800 (PST) In-Reply-To: <83varunu37.fsf@gnu.org> References: <83lgsuqacv.fsf@gnu.org> <83efylq7m4.fsf@gnu.org> <834lzgreqq.fsf@gnu.org> <3f07808e-ab1c-d6b5-9ea0-dfc4c6fd6fc9@cornell.edu> <8337f0rbz6.fsf@gnu.org> <648f03f0-e4d4-c04e-afbf-d8ef8741b15e@cornell.edu> <8360jvoumt.fsf@gnu.org> <834lzepbtp.fsf@gnu.org> <7708fd40-e6dd-8022-4acf-9c86630cce19@cornell.edu> <83varunu37.fsf@gnu.org> From: Richard Copley Date: Tue, 28 Feb 2017 18:59:15 +0000 Message-ID: Subject: Re: bug#25875: 26.0.50; Hang logging out of MS-Windows To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25875 Cc: 25875@debbugs.gnu.org, Ken Brown X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 28 February 2017 at 16:44, Eli Zaretskii wrote: >> Cc: 25875-done@debbugs.gnu.org >> From: Ken Brown >> Date: Tue, 28 Feb 2017 11:40:05 -0500 >> >> I've pushed the patch (with 6000 msec) and am closing the bug. > > Thanks. Thank you both. From unknown Fri Jun 20 20:10:55 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 29 Mar 2017 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator