From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 17 06:06:56 2025 Received: (at submit) by debbugs.gnu.org; 17 Jan 2025 11:06:56 +0000 Received: from localhost ([127.0.0.1]:36155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tYkBf-0003Ho-3n for submit@debbugs.gnu.org; Fri, 17 Jan 2025 06:06:56 -0500 Received: from lists.gnu.org ([2001:470:142::17]:43222) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tYkBc-0003HQ-Ic for submit@debbugs.gnu.org; Fri, 17 Jan 2025 06:06:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tYkBV-0008Oc-TT for bug-gnu-emacs@gnu.org; Fri, 17 Jan 2025 06:06:42 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1] helo=mail.qxqx.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tYkBP-0001Ry-6l for bug-gnu-emacs@gnu.org; Fri, 17 Jan 2025 06:06:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=6C0UMZK9d9Grvxe1c6uG8+cB0s2A/6SBicnsmiib2zc=; b=uyvWX8NxlvYsVwTOLe+OaW7Suo AnKYS85bLo+nnasZnwsjCz6uQcVk4iEn3qej8q0mAFUyMI0B2S4NIIoWersmMnTChM7kso3errdDC WBLdlgmJ8YBlWbxo2cbU8YXfSIT0fKqpKIUeagBbv9fVxoS3BhFdvTkAG9Lr/we7cLOM=; From: Daniel Mendler To: bug-gnu-emacs@gnu.org Subject: 30.0.93; restart-emacs does not reliably restart Emacs X-Debbugs-Cc: Date: Fri, 17 Jan 2025 12:06:30 +0100 Message-ID: <871px1lmx5.fsf@daniel-mendler.de> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a01:4f8:c012:9177::1; envelope-from=mail@daniel-mendler.de; helo=mail.qxqx.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) 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: -0.1 (/) Sometimes `restart-emacs' fails to restart Emacs. In my setup this happens in particular after recompiling my init.el and then invoking `restart-emacs'. This is an unfortunate coincidence, since my only motivation to restart Emacs is in the case where I've applied significant configuration changes. My Emacs is started from .xsession via `exec emacs' since EXWM is my window manager. Unfortunately I've not managed to create a minimal recipe so far. Has this problem been observed before? In GNU Emacs 30.0.93 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.18.2, Xaw scroll bars) Windowing system distributor 'The X.Org Foundation', version 11.0.12101015 System Description: Debian GNU/Linux trixie/sid Configured using: 'configure --with-tree-sitter --with-native-compilation --with-x-toolkit=athena --with-dbus --without-selinux --without-threads --without-gsettings --without-gpm --with-cairo --with-cairo-xcb --disable-gc-mark-trace --with-xinput2' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM LUCID ZLIB From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 17 06:15:39 2025 Received: (at 75629) by debbugs.gnu.org; 17 Jan 2025 11:15:40 +0000 Received: from localhost ([127.0.0.1]:36166 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tYkKA-0003kS-Tf for submit@debbugs.gnu.org; Fri, 17 Jan 2025 06:15:39 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:50123 helo=mail.qxqx.de) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tYkK2-0003jb-Ol for 75629@debbugs.gnu.org; Fri, 17 Jan 2025 06:15:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:To:From:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=zTgkNg284sCEC+R3IVrhAJh95rmGvVCRcHCQ3APRRXU=; b=o1FU34ovcn5nl1Z7Wwkbe2vpb2 vLw7zI/mt32dSjX1q2v8lvVhw/3LQP4/xGENY/DRViCkmN2C2uIVXZW63AmY97OYsUWIBQMz5heuW TLfCimGHU1jhED4SQK68dZlRmQiqpiaIMi4fu+d+F/2WYcnpeH81FUN/iX1QSBYD8I+8=; From: Daniel Mendler To: 75629@debbugs.gnu.org Subject: Re: bug#75629: 30.0.93; restart-emacs does not reliably restart Emacs In-Reply-To: <871px1lmx5.fsf@daniel-mendler.de> (Daniel Mendler's message of "Fri, 17 Jan 2025 12:06:30 +0100") References: <871px1lmx5.fsf@daniel-mendler.de> Date: Fri, 17 Jan 2025 12:15:22 +0100 Message-ID: <87tt9xd73p.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 75629 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: -1.7 (-) Daniel Mendler writes: > Sometimes `restart-emacs' fails to restart Emacs. In my setup this > happens in particular after recompiling my init.el and then invoking > `restart-emacs'. This is an unfortunate coincidence, since my only > motivation to restart Emacs is in the case where I've applied > significant configuration changes. My Emacs is started from .xsession > via `exec emacs' since EXWM is my window manager. Unfortunately I've not > managed to create a minimal recipe so far. Has this problem been > observed before? > > In GNU Emacs 30.0.93 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo > version 1.18.2, Xaw scroll bars) > Windowing system distributor 'The X.Org Foundation', version 11.0.12101015 > System Description: Debian GNU/Linux trixie/sid > > Configured using: > 'configure --with-tree-sitter > --with-native-compilation --with-x-toolkit=athena --with-dbus > --without-selinux --without-threads --without-gsettings --without-gpm > --with-cairo --with-cairo-xcb --disable-gc-mark-trace --with-xinput2' > > Configured features: > CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG LIBOTF LIBSYSTEMD > LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP > SOUND SQLITE3 TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM > XINPUT2 XPM LUCID ZLIB I've found the following backtrace in my .xsession-errors file. It seems that Emacs is somehow crashing during shutdown. So maybe the problem is not really about restart, but about some redisplay problem happening during shutdown. X protocol error: BadDrawable (invalid Pixmap or Window parameter) on protocol request 62 Serial no: 6422 Failing resource ID (if any): 0x60014c Minor code: 0 This is a bug! Please report this to bug-gnu-emacs@gnu.org! Backtrace: emacs(emacs_backtrace+0x3b) [0x55943fdecdfb] emacs(terminate_due_to_signal+0x6f) [0x55943fca1f4b] emacs(+0x8a4db) [0x55943fca24db] emacs(+0x8759c) [0x55943fc9f59c] emacs(redisplay_preserve_echo_area+0xc5) [0x55943fcfd5c5] emacs(Fdelete_process+0x106) [0x55943feb8946] emacs(Ffuncall+0xf6) [0x55943fe5eae6] ~/.config/emacs/eln-cache/30.0.93-9cf938b6/server-0cc44189-400d6018.eln(F7365727665722d73746f70_server_stop_0+0x34a) [0x7f3042f90d3a] emacs(Ffuncall+0xf6) [0x55943fe5eae6] ~/.config/emacs/eln-cache/30.0.93-9cf938b6/server-0cc44189-400d6018.eln(F7365727665722d666f7263652d73746f70_server_force_stop_0+0x9c) [0x7f3042f91cfc] emacs(Ffuncall+0xf6) [0x55943fe5eae6] ~/.local/share/emacs/bin/../lib/emacs/30.0.93/native-lisp/30.0.93-9cf938b6/preloaded/subr-13adf6a6-122bc881.eln(F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_148+0x156) [0x7f30467b9c06] emacs(Ffuncall+0xf6) [0x55943fe5eae6] emacs(+0x24718d) [0x55943fe5f18d] emacs(run_hook_with_args+0xd2) [0x55943fe5a9d2] ~/.local/share/emacs/bin/../lib/emacs/30.0.93/native-lisp/30.0.93-9cf938b6/preloaded/subr-13adf6a6-122bc881.eln(F72756e2d686f6f6b2d71756572792d6572726f722d776974682d74696d656f7574_run_hook_query_error_with_timeout_0+0x33) [0x7f30467b9c63] emacs(Ffuncall+0xf6) [0x55943fe5eae6] emacs(Fkill_emacs+0xca) [0x55943fca1e30] emacs(+0x89219) [0x55943fca1219] emacs(+0x17bebb) [0x55943fd93ebb] emacs(+0x17c08b) [0x55943fd9408b] /lib/x86_64-linux-gnu/libX11.so.6(_XError+0x11c) [0x7f304ebe26dc] /lib/x86_64-linux-gnu/libX11.so.6(+0x4524f) [0x7f304ebdf24f] /lib/x86_64-linux-gnu/libX11.so.6(+0x452fd) [0x7f304ebdf2fd] /lib/x86_64-linux-gnu/libX11.so.6(_XReply+0x1fd) [0x7f304ebe048d] /lib/x86_64-linux-gnu/libX11.so.6(XGetWindowProperty+0x112) [0x7f304ebc44e2] emacs(+0x182049) [0x55943fd9a049] emacs(+0x1890fa) [0x55943fda10fa] emacs(+0x1918fd) [0x55943fda98fd] emacs(gobble_input+0x111) [0x55943fdd3da1] emacs(unblock_input+0x55) [0x55943fdd5945] emacs(redisplay_preserve_echo_area+0xb2) [0x55943fcfd5b2] emacs(Fdelete_process+0x106) [0x55943feb8946] emacs(exec_byte_code+0x3dd) [0x55943fea79ed] emacs(Ffuncall+0xf6) [0x55943fe5eae6] emacs(Fapply+0x2e8) [0x55943fe5eff8] emacs(exec_byte_code+0x3dd) [0x55943fea79ed] emacs(Ffuncall+0xf6) [0x55943fe5eae6] ~/.config/emacs/eln-cache/30.0.93-9cf938b6/xcb-708db4e5-752e3495.eln(F7863623a2d636f6e6e656374696f6e2d73656e74696e656c_xcb_connection_sentinel_0+0x95) [0x7f3042f40945] emacs(Ffuncall+0xf6) [0x55943fe5eae6] emacs(Fapply+0x150) [0x55943fe5ee60] ... Aborted From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 17 08:12:52 2025 Received: (at 75629) by debbugs.gnu.org; 17 Jan 2025 13:12:52 +0000 Received: from localhost ([127.0.0.1]:36367 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tYm9b-00048s-P2 for submit@debbugs.gnu.org; Fri, 17 Jan 2025 08:12:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42530) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tYm9Z-00048e-8E for 75629@debbugs.gnu.org; Fri, 17 Jan 2025 08:12:50 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tYm9T-0005LO-4J; Fri, 17 Jan 2025 08:12:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=3RlpWOLN5MHWQazI/all4hTmu2toyT3/V2s9CH0mFI0=; b=JwE66gbQzTBd myqMfqzxb0NWUdwWYAK/mfCwmWwqc1Lb09JlReAzpXdxcqLmbkU22bc9iut2PKuXuq0yIKoW2pOls Fyp/56LgKBoXNP6ADiEOlyfnEtDWnZjnwRb4DeWaJ2odTDU+HYIcB6ycLy48zXzsIsMQ1G+pRoUBY WemydC4xVpzCyuT6+QadhQUGFIOrgYGTIyMAmdZ+boiMct6S8AvCSAN2mZLY7EQOslYO0jX3orr1Z 90TlvHtPrfbVc83cMHNfaFdY55qBeFWd5BMEee51zu4eH8wch651iMt1t58bENenkRyiZxebl551S e9pQt7LqmNGLVeearkiXQg==; Date: Fri, 17 Jan 2025 15:12:39 +0200 Message-Id: <86sepheg8o.fsf@gnu.org> From: Eli Zaretskii To: Daniel Mendler In-Reply-To: <871px1lmx5.fsf@daniel-mendler.de> (bug-gnu-emacs@gnu.org) Subject: Re: bug#75629: 30.0.93; restart-emacs does not reliably restart Emacs References: <871px1lmx5.fsf@daniel-mendler.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75629 Cc: 75629@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: -3.3 (---) > Date: Fri, 17 Jan 2025 12:06:30 +0100 > From: Daniel Mendler via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Sometimes `restart-emacs' fails to restart Emacs. In my setup this > happens in particular after recompiling my init.el and then invoking > `restart-emacs'. This is an unfortunate coincidence, since my only > motivation to restart Emacs is in the case where I've applied > significant configuration changes. My Emacs is started from .xsession > via `exec emacs' since EXWM is my window manager. Unfortunately I've not > managed to create a minimal recipe so far. Has this problem been > observed before? No, not that I know of. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 17 08:16:26 2025 Received: (at 75629) by debbugs.gnu.org; 17 Jan 2025 13:16:26 +0000 Received: from localhost ([127.0.0.1]:36379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tYmD3-0004MZ-GW for submit@debbugs.gnu.org; Fri, 17 Jan 2025 08:16:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34452) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tYmD1-0004M8-3H for 75629@debbugs.gnu.org; Fri, 17 Jan 2025 08:16:23 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tYmCv-0005rs-1G; Fri, 17 Jan 2025 08:16:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=dN1DFIM/WBDQbgUD6sH0/NisNrhBoJDzjlKFVAh+2FQ=; b=Wo2CE/5vLLGv 7dY4SBBAMKoK2X18xQAxiatE991jvIK2J4PKYCUo4Li3mN9fGODVPC+ynRQUVPISyBuol0Hc9f7pI tj6mVHglTwlf6p1F0fFFVWpor91MkJk7sg6lzPb5Py9DZUkmToM8CLYkIbCaqhULUBZ0oeKa4byIN KS/jUzEri93KRdL5rbPJIFs0C2GkdeCt/RU4NINhRIW86dKLokE1EosRJ5T5GtYtV9+fRo9nmLQSs Zd1tbqWp/9i7npvR23YmHRyg4M0YwdunfNA883r/RWGn+0o+keSZ1OIJ2CxMcukJEgCwPjvCxOoqM 7czz/5IfBBUH8kAF6cve6A==; Date: Fri, 17 Jan 2025 15:16:12 +0200 Message-Id: <86r051eg2r.fsf@gnu.org> From: Eli Zaretskii To: Daniel Mendler In-Reply-To: <87tt9xd73p.fsf@daniel-mendler.de> (bug-gnu-emacs@gnu.org) Subject: Re: bug#75629: 30.0.93; restart-emacs does not reliably restart Emacs References: <871px1lmx5.fsf@daniel-mendler.de> <87tt9xd73p.fsf@daniel-mendler.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75629 Cc: 75629@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: -3.3 (---) > Date: Fri, 17 Jan 2025 12:15:22 +0100 > From: Daniel Mendler via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > I've found the following backtrace in my .xsession-errors file. It seems > that Emacs is somehow crashing during shutdown. So maybe the problem is > not really about restart, but about some redisplay problem happening > during shutdown. > > X protocol error: BadDrawable (invalid Pixmap or Window parameter) on protocol request 62 > Serial no: 6422 > Failing resource ID (if any): 0x60014c > Minor code: 0 > This is a bug! Please report this to bug-gnu-emacs@gnu.org! So please run Emacs under GDB, and in X synchronous mode (see etc/DEBUG for details), and when it crashes during shutdown, show the full backtrace produced by GDB (the "thread apply all bt" command when GDB kicks in). I think I understand what causes this problem, but more detailed backtrace is needed to make sure my understanding is correct and the solution is right. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 30 08:53:17 2025 Received: (at 75629) by debbugs.gnu.org; 30 Jan 2025 13:53:17 +0000 Received: from localhost ([127.0.0.1]:45012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tdUyq-0007iY-Kn for submit@debbugs.gnu.org; Thu, 30 Jan 2025 08:53:16 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:34287 helo=mail.qxqx.de) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tdUyn-0007iF-7p for 75629@debbugs.gnu.org; Thu, 30 Jan 2025 08:53:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9gh9slz3OXjrHE7OKFSZUUkIwPgj0b0OfJ3HRXKNtME=; b=JKwAPkQ/czs9tDQFIpANH8d/kN 6MOKU2DB7SLaunNUv2om1p8gSF+bnNjiaQFhQ5zv8QXIAvqNaGjrEK6HqFgc8qKfIPY2y3GWYQGGM mMuEuhzbfuW5rnkyjqARte6q32zqhHoJV4/5FNpRwDvfyN4fPYnIG/KdZM1ZQsbXpFs0=; From: Daniel Mendler To: Eli Zaretskii Subject: Re: bug#75629: 30.0.93; restart-emacs does not reliably restart Emacs In-Reply-To: <86r051eg2r.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 17 Jan 2025 15:16:12 +0200") References: <871px1lmx5.fsf@daniel-mendler.de> <87tt9xd73p.fsf@daniel-mendler.de> <86r051eg2r.fsf@gnu.org> Date: Thu, 30 Jan 2025 14:53:01 +0100 Message-ID: <874j1g76iq.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 75629 Cc: 75629@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: -1.7 (-) Eli Zaretskii writes: >> Date: Fri, 17 Jan 2025 12:15:22 +0100 >> From: Daniel Mendler via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> I've found the following backtrace in my .xsession-errors file. It seems >> that Emacs is somehow crashing during shutdown. So maybe the problem is >> not really about restart, but about some redisplay problem happening >> during shutdown. >> >> X protocol error: BadDrawable (invalid Pixmap or Window parameter) on protocol request 62 >> Serial no: 6422 >> Failing resource ID (if any): 0x60014c >> Minor code: 0 >> This is a bug! Please report this to bug-gnu-emacs@gnu.org! > > So please run Emacs under GDB, and in X synchronous mode (see > etc/DEBUG for details), and when it crashes during shutdown, show the > full backtrace produced by GDB (the "thread apply all bt" command when > GDB kicks in). > > I think I understand what causes this problem, but more detailed > backtrace is needed to make sure my understanding is correct and the > solution is right. I am sorry, but I failed to obtain a more detailed backtrace. The problem does not seem to occur at all with (x-synchronize t). Also I have difficulties running gdb from the .xsession. In my case, Emacs is started by X, since it acts as window manager. When Emacs crashes after M-x restart-emacs (without x-synchronize), I cannot access the gdb repl. Daniel From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 30 10:35:41 2025 Received: (at 75629) by debbugs.gnu.org; 30 Jan 2025 15:35:41 +0000 Received: from localhost ([127.0.0.1]:47266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tdWZw-0005Lb-KT for submit@debbugs.gnu.org; Thu, 30 Jan 2025 10:35:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36066) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tdWZs-0005LG-Sg for 75629@debbugs.gnu.org; Thu, 30 Jan 2025 10:35:37 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tdWZl-0002fM-DJ; Thu, 30 Jan 2025 10:35:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Kn0pmqTudap92mOKO0gNH/sfcIBjwD9YaQ2Us6hOvgM=; b=c8irCiKbaZ8t wJNa+PnrATM71vg6L2cllB4VPCE7UaC4dgL6Dr3ZPTn2zdGddqZc4cCh8ALupRCJTXg07/s8FT/nP NDRCtWHEZ+8jKlRsJmr9Rpkg/5PgP5Taf4U2Q/RiddcoYRGjsfs/KdDLa8RQgWvk7DCTKkLn0TcVT wJzPdYFJr/ZEM1tWnLk3MhNz53JRVupKIGJBu+sgP/MIuczvOMJ1isAZsNqw8Vqi1iLAjEGQaLa7y 4wSICH8z+j2dGTOYZ1Q/RcTb3HU8QMTy859i3R1FJhoxIiORUYLiTQnfXHty74DAkBH6eorHOoLO+ ocj/VBaw28AV/c8vfV8Sjg==; Date: Thu, 30 Jan 2025 17:35:22 +0200 Message-Id: <86ldusjow5.fsf@gnu.org> From: Eli Zaretskii To: Daniel Mendler , Po Lu In-Reply-To: <874j1g76iq.fsf@daniel-mendler.de> (message from Daniel Mendler on Thu, 30 Jan 2025 14:53:01 +0100) Subject: Re: bug#75629: 30.0.93; restart-emacs does not reliably restart Emacs References: <871px1lmx5.fsf@daniel-mendler.de> <87tt9xd73p.fsf@daniel-mendler.de> <86r051eg2r.fsf@gnu.org> <874j1g76iq.fsf@daniel-mendler.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75629 Cc: 75629@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: -3.3 (---) > From: Daniel Mendler > Cc: 75629@debbugs.gnu.org > Date: Thu, 30 Jan 2025 14:53:01 +0100 > > Eli Zaretskii writes: > > >> Date: Fri, 17 Jan 2025 12:15:22 +0100 > >> From: Daniel Mendler via "Bug reports for GNU Emacs, > >> the Swiss army knife of text editors" > >> > >> I've found the following backtrace in my .xsession-errors file. It seems > >> that Emacs is somehow crashing during shutdown. So maybe the problem is > >> not really about restart, but about some redisplay problem happening > >> during shutdown. > >> > >> X protocol error: BadDrawable (invalid Pixmap or Window parameter) on protocol request 62 > >> Serial no: 6422 > >> Failing resource ID (if any): 0x60014c > >> Minor code: 0 > >> This is a bug! Please report this to bug-gnu-emacs@gnu.org! > > > > So please run Emacs under GDB, and in X synchronous mode (see > > etc/DEBUG for details), and when it crashes during shutdown, show the > > full backtrace produced by GDB (the "thread apply all bt" command when > > GDB kicks in). > > > > I think I understand what causes this problem, but more detailed > > backtrace is needed to make sure my understanding is correct and the > > solution is right. > > I am sorry, but I failed to obtain a more detailed backtrace. The > problem does not seem to occur at all with (x-synchronize t). Also I > have difficulties running gdb from the .xsession. In my case, Emacs is > started by X, since it acts as window manager. When Emacs crashes after > M-x restart-emacs (without x-synchronize), I cannot access the gdb repl. Can you use the recipe in the node "Crashing" of the Emacs manual to produce a readable backtrace from what you have in .xsession-errors? If thyat succeeds, please post the backtreace. And maybe Po Lu (CC'ed) has some advice how to debug this further? Or why redisplay_preserve_echo_area signals a BadDrawable error in this case? Can we do something (like set some C variable or bind some Lisp variable) to prevent fatal X errors in redisplay when we are shutting down Emacs? From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 30 10:57:49 2025 Received: (at 75629) by debbugs.gnu.org; 30 Jan 2025 15:57:49 +0000 Received: from localhost ([127.0.0.1]:47349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tdWvN-0006Pm-5W for submit@debbugs.gnu.org; Thu, 30 Jan 2025 10:57:49 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:39363 helo=mail.qxqx.de) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tdWvK-0006PX-6e for 75629@debbugs.gnu.org; Thu, 30 Jan 2025 10:57:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3ezz4k4fPLdr858hdydoncrGw9fACE48M7z93MKqUaQ=; b=zfbNDlW1hP7xw3LbGIROVZxx92 kGviR1kpV0h/M9ezni8QlyS7TJGhQ4au0FHIVus7+Yg4x7xCcAzxSaN6SXywLteepLaG3Ionzs0+6 m41O6hw0BToD6T5VMFawI/GpvGnFqrAueHHIaKi+UfOijW/jGR/bw/AVu0j0cwgdnwjU=; From: Daniel Mendler To: Eli Zaretskii Subject: Re: bug#75629: 30.0.93; restart-emacs does not reliably restart Emacs In-Reply-To: <86ldusjow5.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 30 Jan 2025 17:35:22 +0200") References: <871px1lmx5.fsf@daniel-mendler.de> <87tt9xd73p.fsf@daniel-mendler.de> <86r051eg2r.fsf@gnu.org> <874j1g76iq.fsf@daniel-mendler.de> <86ldusjow5.fsf@gnu.org> Date: Thu, 30 Jan 2025 16:57:38 +0100 Message-ID: <875xlw1eh9.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 75629 Cc: Po Lu , 75629@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: -1.7 (-) Eli Zaretskii writes: >> From: Daniel Mendler >> Cc: 75629@debbugs.gnu.org >> Date: Thu, 30 Jan 2025 14:53:01 +0100 >> >> Eli Zaretskii writes: >> >> >> Date: Fri, 17 Jan 2025 12:15:22 +0100 >> >> From: Daniel Mendler via "Bug reports for GNU Emacs, >> >> the Swiss army knife of text editors" >> >> >> >> I've found the following backtrace in my .xsession-errors file. It seems >> >> that Emacs is somehow crashing during shutdown. So maybe the problem is >> >> not really about restart, but about some redisplay problem happening >> >> during shutdown. >> >> >> >> X protocol error: BadDrawable (invalid Pixmap or Window parameter) on protocol request 62 >> >> Serial no: 6422 >> >> Failing resource ID (if any): 0x60014c >> >> Minor code: 0 >> >> This is a bug! Please report this to bug-gnu-emacs@gnu.org! >> > >> > So please run Emacs under GDB, and in X synchronous mode (see >> > etc/DEBUG for details), and when it crashes during shutdown, show the >> > full backtrace produced by GDB (the "thread apply all bt" command when >> > GDB kicks in). >> > >> > I think I understand what causes this problem, but more detailed >> > backtrace is needed to make sure my understanding is correct and the >> > solution is right. >> >> I am sorry, but I failed to obtain a more detailed backtrace. The >> problem does not seem to occur at all with (x-synchronize t). Also I >> have difficulties running gdb from the .xsession. In my case, Emacs is >> started by X, since it acts as window manager. When Emacs crashes after >> M-x restart-emacs (without x-synchronize), I cannot access the gdb repl. > > Can you use the recipe in the node "Crashing" of the Emacs manual to > produce a readable backtrace from what you have in .xsession-errors? > If thyat succeeds, please post the backtreace. So far no success due to lack of debug info. I have to rebuild Emacs. > And maybe Po Lu (CC'ed) has some advice how to debug this further? Or > why redisplay_preserve_echo_area signals a BadDrawable error in this > case? Can we do something (like set some C variable or bind some Lisp > variable) to prevent fatal X errors in redisplay when we are shutting > down Emacs? Would it be possible to first delete all remaining frames before proceeding with the shutdown? Daniel From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 30 11:36:53 2025 Received: (at 75629) by debbugs.gnu.org; 30 Jan 2025 16:36:53 +0000 Received: from localhost ([127.0.0.1]:47429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tdXXB-0008HA-4X for submit@debbugs.gnu.org; Thu, 30 Jan 2025 11:36:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59488) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tdXX8-0008Gw-KW for 75629@debbugs.gnu.org; Thu, 30 Jan 2025 11:36:51 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tdXX2-0004en-Ff; Thu, 30 Jan 2025 11:36:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=pZ3PWu6Kk8MfHffevuAII/hnLcjrQnt5B9gWkZMHD20=; b=sPngwALUjrZz meoNqDlIv+ttzaS0CzDjt23KGPA2bd7n52Y2Kknu7XnPWXqXrPn2z1UvOCqsfXHonmpiMfKkfahqT JPgv+ztvtvYevpcwWQHFq+w1Y8PDAJNUB/dLxLTplR9U/DHTk+oXGGHralgh0h9o8fRXd6pxOnwTw kx7jkBS1GzqdMUW3XOjoQQLuGDeiSAveETHMKIlcqWB4CwdIMwaoSPbiPOEtDIs03diHMGUM8tyjD 6ktWHpKuv7KCtY83WuL/e4N5Ww/G+T9UfzWfcrEsD6lL+BBXzyYT3V+9WF8+PILg0l3qPduH1QEYD 0kL1xLjKIAPlU9MQ5wnEpg==; Date: Thu, 30 Jan 2025 18:36:39 +0200 Message-Id: <86ikpwjm20.fsf@gnu.org> From: Eli Zaretskii To: Daniel Mendler In-Reply-To: <875xlw1eh9.fsf@daniel-mendler.de> (message from Daniel Mendler on Thu, 30 Jan 2025 16:57:38 +0100) Subject: Re: bug#75629: 30.0.93; restart-emacs does not reliably restart Emacs References: <871px1lmx5.fsf@daniel-mendler.de> <87tt9xd73p.fsf@daniel-mendler.de> <86r051eg2r.fsf@gnu.org> <874j1g76iq.fsf@daniel-mendler.de> <86ldusjow5.fsf@gnu.org> <875xlw1eh9.fsf@daniel-mendler.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75629 Cc: luangruo@yahoo.com, 75629@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: -3.3 (---) > From: Daniel Mendler > Cc: Po Lu , 75629@debbugs.gnu.org > Date: Thu, 30 Jan 2025 16:57:38 +0100 > > Eli Zaretskii writes: > > >> I am sorry, but I failed to obtain a more detailed backtrace. The > >> problem does not seem to occur at all with (x-synchronize t). Also I > >> have difficulties running gdb from the .xsession. In my case, Emacs is > >> started by X, since it acts as window manager. When Emacs crashes after > >> M-x restart-emacs (without x-synchronize), I cannot access the gdb repl. > > > > Can you use the recipe in the node "Crashing" of the Emacs manual to > > produce a readable backtrace from what you have in .xsession-errors? > > If thyat succeeds, please post the backtreace. > > So far no success due to lack of debug info. I have to rebuild Emacs. OK, please do, I think it will help to have a usable backtrace. > > And maybe Po Lu (CC'ed) has some advice how to debug this further? Or > > why redisplay_preserve_echo_area signals a BadDrawable error in this > > case? Can we do something (like set some C variable or bind some Lisp > > variable) to prevent fatal X errors in redisplay when we are shutting > > down Emacs? > > Would it be possible to first delete all remaining frames before > proceeding with the shutdown? That'd be worse, I think. The problem happens in kill-emacs-hook, which In your case shuts down the server process, but in general could ask the user some question, see run-hook-query-error-with-timeout. If we don't have a frame, we cannot ask.