From unknown Fri Jun 20 07:11:48 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#47334 <47334@debbugs.gnu.org> To: bug#47334 <47334@debbugs.gnu.org> Subject: Status: 27.1; Incompatibility between daemon, desktop and highlight-changes-mode Reply-To: bug#47334 <47334@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:11:48 +0000 retitle 47334 27.1; Incompatibility between daemon, desktop and highlight-c= hanges-mode reassign 47334 emacs submitter 47334 Gilles severity 47334 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 22 21:14:47 2021 Received: (at submit) by debbugs.gnu.org; 23 Mar 2021 01:14:47 +0000 Received: from localhost ([127.0.0.1]:59178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOVd9-0005Mz-7I for submit@debbugs.gnu.org; Mon, 22 Mar 2021 21:14:47 -0400 Received: from lists.gnu.org ([209.51.188.17]:34860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOUx3-0004Nj-FZ for submit@debbugs.gnu.org; Mon, 22 Mar 2021 20:31:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOUx3-00049s-8r for bug-gnu-emacs@gnu.org; Mon, 22 Mar 2021 20:31:17 -0400 Received: from mail-qv1-xf2e.google.com ([2607:f8b0:4864:20::f2e]:38726) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lOUx0-0007op-GL for bug-gnu-emacs@gnu.org; Mon, 22 Mar 2021 20:31:16 -0400 Received: by mail-qv1-xf2e.google.com with SMTP id t5so9645011qvs.5 for ; Mon, 22 Mar 2021 17:31:13 -0700 (PDT) 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=ssSh7z8T0DdRE359uInBDMtJplUlsGXKjlMvtQ8ZztQ=; b=Z9w2pq68rmYCSCqTFamyqHnDSJ2FKSnWaaFOJTf5mFeH7TwlH1x25o56dEqLhuQVto v8vjd1cwFcngNz/rVOw88cI9ogswYRY7GR2AZcy669YnZPk8ZWiEeWpKBm5oGl8y7C2G ZvJdfrMKMNqSgq5YCRqs/KGFYnlYKmGtor92I8mbPHVdqs2B+cQzEiHd3BgKPZivmMOS 88Z+rDRkMs1qGJbJQXdeA/+oXDcXdlZaLGMGOruutD/OSICbIkCNSPgOkB4OCcRYMYly EEKU9FJaV65QsAK5nHnIEiuMpWbLDPFmg97uhhcbC1Mw5VylxqCbbYg2dbFdxvElY4yw n9QQ== 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=ssSh7z8T0DdRE359uInBDMtJplUlsGXKjlMvtQ8ZztQ=; b=XN4wGA6bTFfsSsAw/VVoRr6uENQY2jAc7+5Awd88DvQQshuvmZo1AC5F5zySYjPhm4 WAnv0soBCQ5X2IYx7hnZ3vAtOqcXmx7MyhHG3ps+dXqj7Yk4rolAqPznsb175vSArkcs YY43fGenVwrXeDVMaCy3v1l6o3iWe5DCwY5YQImY8/oxsuE6Sng2j07tXuLUgGkx7Oti dgxUnnfxXvh7MkhoOqIWRtFcgrxQbUc30CcIu0nT6+tcyLi3Z21notaGROsVAw9S9o0/ HytOTx6o6SueIZewStsRDdRWCpLTwdutYHAl+bnaDE4V7zqi7/9q79aPu73ykLD1JHCO TWdQ== X-Gm-Message-State: AOAM530eQ6MvuwMfglDyopCABOlaBGZ/z1YiJOYNGSc8VesRwXDHeRmE E44eLxn9CDHbwhsESiOEyeGLEi81h9Zi5j6GxkUjIYy1MiUqtg== X-Google-Smtp-Source: ABdhPJxk33Hec/8LKrdkXdkWv4YIaeso3hwn0mXb6kY1rqYzMPnzD5RYd/vWYhHt8w1eMZPujsaDi3sivAholsuITq8= X-Received: by 2002:a05:6214:20ad:: with SMTP id 13mr2314559qvd.35.1616459472674; Mon, 22 Mar 2021 17:31:12 -0700 (PDT) MIME-Version: 1.0 From: Gilles Date: Tue, 23 Mar 2021 01:30:36 +0100 Message-ID: Subject: 27.1; Incompatibility between daemon, desktop and highlight-changes-mode To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::f2e; envelope-from=gilles.peskine@gmail.com; helo=mail-qv1-xf2e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 22 Mar 2021 21:14:46 -0400 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 (--) When restoring a desktop session where a buffer has highlight-changes-mode enabled, if Emacs is starting in daemon mode, it locks up before opening the socket. There is no error message. If Emacs is not starting in daemon mode, or if the desktop session file does not list highlight-changes-mode, everything is fine. I have observed this problem both with Emacs 27.1 on macOS and with Emacs 26.3 on Ubuntu 20.04. Below I give the server an explicit name for convenience but this is optional to reproduce the bug. Here is a precise recipe to reproduce. (Lines beginning with a letter are shell commands; lines beginning with `|` are terminal output.) mkdir -p /var/tmp/bugs/emacs-daemon-desktop-highlight-changes/.emacs.d cd /var/tmp/bugs/emacs-daemon-desktop-highlight-changes echo "(setq desktop-restore-frames nil)" >.emacs.d/init.el echo "(desktop-save-mode)" >>.emacs.d/init.el HOME=$PWD emacs --no-site-file -nw .emacs.d/init.el # C-x C-c y ; Exit, saving the session cp .emacs.d/.emacs.desktop desktop.ok.el HOME=$PWD emacs --no-site-file --daemon=foo | Wrote /var/tmp/bugs/emacs-daemon-desktop-highlight-changes/.emacs.d/.emacs.desktop.lock | Desktop: 1 frame, 1 buffer restored. | Starting Emacs daemon. emacsclient -s foo -c -nw # C-x b RET ; Switch to init.el # M-x highlight-changes-mode RET # M-x kill-emacs RET cp .emacs.d/.emacs.desktop desktop.bad.el HOME=$PWD emacs --no-site-file --daemon=foo At this point, there are two Emacs processes (the original one and its daemon child), but they do not reach the point of creating the server socket. No message is displayed on the terminal. On the other hand, if I kill the Emacs processes and run ``HOME=$PWD emacs --no-site-file -nw``, Emacs starts normally. Here are the working (desktop.ok.el) and non-working (desktop.bad.el) versions of .emacs.desktop from above. ---------------------------------------------------------------- ;; -*- mode: emacs-lisp; lexical-binding:t; coding: utf-8-emacs; -*- ;; -------------------------------------------------------------------------- ;; Desktop File for Emacs ;; -------------------------------------------------------------------------- ;; Created Tue Mar 23 00:57:14 2021 ;; Desktop file format version 208 ;; Emacs version 27.1 ;; Global section: (setq desktop-saved-frameset nil) (setq desktop-missing-file-warning nil) (setq tags-file-name nil) (setq tags-table-list nil) (setq search-ring nil) (setq regexp-search-ring nil) (setq register-alist nil) (setq file-name-history nil) ;; Buffer section -- buffers listed in same order as in buffer list: (desktop-create-buffer 208 "/var/tmp/bugs/emacs-daemon-desktop-highlight-changes/.emacs.d/init.el" "init.el" 'emacs-lisp-mode '(eldoc-mode) 1 '(nil nil) nil nil '((buffer-display-time 24665 11993 439843 0) (buffer-file-coding-system . prefer-utf-8-unix)) '((mark-ring nil))) ---------------------------------------------------------------- ;; -*- mode: emacs-lisp; lexical-binding:t; coding: utf-8-emacs; -*- ;; -------------------------------------------------------------------------- ;; Desktop File for Emacs ;; -------------------------------------------------------------------------- ;; Created Tue Mar 23 00:58:04 2021 ;; Desktop file format version 208 ;; Emacs version 27.1 ;; Global section: (setq desktop-saved-frameset nil) (setq desktop-missing-file-warning nil) (setq tags-file-name nil) (setq tags-table-list nil) (setq search-ring nil) (setq regexp-search-ring nil) (setq register-alist nil) (setq file-name-history nil) ;; Buffer section -- buffers listed in same order as in buffer list: (desktop-create-buffer 208 "/var/tmp/bugs/emacs-daemon-desktop-highlight-changes/.emacs.d/init.el" "init.el" 'emacs-lisp-mode '(eldoc-mode highlight-changes-mode) 1 '(nil nil) nil nil '((buffer-display-time 24665 12038 824402 0) (buffer-file-coding-system . prefer-utf-8-unix) (highlight-changes-mode . t)) '((mark-ring nil))) ---------------------------------------------------------------- In GNU Emacs 27.1 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95)) of 2020-08-12 built on builder10-14.porkrind.org Windowing system distributor 'Apple', version 10.3.2022 System Description: macOS 11.2.3 Configured using: 'configure --with-ns '--enable-locallisppath=/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules' Configured features: NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS JSON PDUMPER Important settings: value of $LC_CTYPE: UTF-8 value of $LANG: en_FR.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 44980 8398) (symbols 48 5927 1) (strings 32 15288 1607) (string-bytes 1 506711) (vectors 16 10173) (vector-slots 8 126873 5444) (floats 8 20 38) (intervals 56 191 0) (buffers 1000 11)) From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 23 06:07:06 2021 Received: (at 47334) by debbugs.gnu.org; 23 Mar 2021 10:07:06 +0000 Received: from localhost ([127.0.0.1]:59598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOdwI-0003pi-72 for submit@debbugs.gnu.org; Tue, 23 Mar 2021 06:07:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOdwG-0003pD-2Y for 47334@debbugs.gnu.org; Tue, 23 Mar 2021 06:07:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51187) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lOdw9-0000F5-UY; Tue, 23 Mar 2021 06:06:58 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4607 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lOdw5-00056d-5N; Tue, 23 Mar 2021 06:06:54 -0400 Date: Tue, 23 Mar 2021 12:06:59 +0200 Message-Id: <83h7l289q4.fsf@gnu.org> From: Eli Zaretskii To: Gilles In-Reply-To: (message from Gilles on Tue, 23 Mar 2021 01:30:36 +0100) Subject: Re: bug#47334: 27.1; Incompatibility between daemon, desktop and highlight-changes-mode References: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 47334 Cc: 47334@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 (-) > From: Gilles > Date: Tue, 23 Mar 2021 01:30:36 +0100 > > When restoring a desktop session where a buffer has > highlight-changes-mode enabled, if Emacs is starting in daemon mode, it > locks up before opening the socket. There is no error message. > > If Emacs is not starting in daemon mode, or if the desktop session file > does not list highlight-changes-mode, everything is fine. > > I have observed this problem both with Emacs 27.1 on macOS and with > Emacs 26.3 on Ubuntu 20.04. Below I give the server an explicit name for > convenience but this is optional to reproduce the bug. > > Here is a precise recipe to reproduce. (Lines beginning with a letter > are shell commands; lines beginning with `|` are terminal output.) Thanks. Since you already have a working setup for reproducing the problem, could you please attach GDB to the daemon when it hangs, and show both a C-level and a Lisp-level backtrace? (This could be tricky if you don't have a working GDB installed on your macOS system, because LLDB isn't supported by src/.gdbinit init file. But maybe you could do this on Ubuntu?) This could go a long way towards identifying the problematic piece of code. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 27 21:07:12 2021 Received: (at 47334) by debbugs.gnu.org; 28 Mar 2021 01:07:12 +0000 Received: from localhost ([127.0.0.1]:45176 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQJtY-00077y-A9 for submit@debbugs.gnu.org; Sat, 27 Mar 2021 21:07:12 -0400 Received: from mail-qt1-f169.google.com ([209.85.160.169]:33665) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQJtT-00077j-2z for 47334@debbugs.gnu.org; Sat, 27 Mar 2021 21:07:10 -0400 Received: by mail-qt1-f169.google.com with SMTP id 1so6352765qtb.0 for <47334@debbugs.gnu.org>; Sat, 27 Mar 2021 18:07:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sFvlilFu2bakznhk1D9aIhdoDHUKglXmxn1+jfe0IH0=; b=K4lY02Y7Tat1bw0wF7F/SFcD8ozznARfJHncloXh3zzTRQU0sTNCGrRGQtvfvBjlaf JWYwpn0qvTYXmoVajpub35UYfrS4MI4vMPN/HulvAtwv3eKjWdVsap3o9oYL5Kv3xY+L btuJ4UN63sIGS/ErzX0s3wDFnyx5nk05U4Tidq1uByKv+TLuUG51Ctk3xv1Jl1w/IxKo S+dD4RP2W4sTTAGl6d1nUe/HO5EXoL0iDsAb7p3ak4SW9ksewuj6CIFSJE9MoqiNKsOQ 8kcp3MEzkOK2Us8Ypjnh3JJuhDUQ2NaspiLqqR9CpmzJGive7GTY+1or+dJIH66pHGke 6Xgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sFvlilFu2bakznhk1D9aIhdoDHUKglXmxn1+jfe0IH0=; b=Oroi5TfRTfg4TongpTf1yA+prmgV2hej3oHqenzciMxf+WrrmiI/NdmJPef9+EBqv3 Wiv/EXHM/IH17h2IiQ5yc+VLmnsK6G+6cImxp7++UfjEOH6mKooZoCsZKNcmXYdq/IfT g410NIK6c0OY0SOwLTiuWbvvSgntwsap+XPWmOfd/DJPGtUVW+x/C5zQb4eLx3wZrlcn usN8ShMEpPhuMEkeeOwYLSKJiDd/563Wvx3J11EkxjcS2vv6ebFHQKpWzpNzN41a+WId vW7uddI6AOTEgvywR0id7figVr4gdsbQkvmGcGr9bCuIWBmnjHzMD2c8oVKs0ZXrvHWS R2aw== X-Gm-Message-State: AOAM531nWvZ2sv5ocS/A1E19lyykOkHi6H5S2WquOfYj8VGnJ4h14dHF 8fYv0iOZHCoAxpQxPWl34Ye+lJW6TU+vbAoQEdI= X-Google-Smtp-Source: ABdhPJzbwjbiEyuz/v9+OX40F5822SelLxxlDpoRXebV9swMr7IQrjEMWq52fUoU/oLFf2M7mKVGfKu4ztUZ1tLhuZo= X-Received: by 2002:a05:622a:1748:: with SMTP id l8mr17856928qtk.73.1616893621631; Sat, 27 Mar 2021 18:07:01 -0700 (PDT) MIME-Version: 1.0 References: <83h7l289q4.fsf@gnu.org> In-Reply-To: <83h7l289q4.fsf@gnu.org> From: Gilles Date: Sun, 28 Mar 2021 03:06:25 +0200 Message-ID: Subject: Re: bug#47334: 27.1; Incompatibility between daemon, desktop and highlight-changes-mode To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47334 Cc: 47334@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.0 (-) Hello, I've done some further debugging (analysis below) and can reproduce the mute Emacs problem just by throwing an error from `after-init-hook'. I filed a separate bug for that: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=47439 The incompatibility between highlight-changes-mode, desktop and daemon startup exists regardless of the daemon-not-starting bug since highlight-changes-mode is not restored correctly. The daemon-not-starting bug just made it harder to figure out what was going on. ---------------------------------------------------------------- I built emacs-27.2 from source with debugging enabled on Linux (Ubuntu 20.04) / x84_64. I observe the same symptoms. Here's a backtrace. I used src/.gdbinit and do get a Lisp backtrace if I attach to an Emacs process with a non-empty Lisp call stack. ---------------------------------------------------------------- Breakpoint 1 at 0x55d190f50dbd: file emacs.c, line 379. Breakpoint 2 at 0x55d190f026f6: file xterm.c, line 10145. (gdb) bt #0 0x00007fdb9e854246 in __pselect (nfds=8, readfds=0x7fff6656d800, writefds=0x7fff6656d880, exceptfds=0x0, timeout=, sigmask=) at ../sysdeps/unix/sysv/linux/pselect.c:48 #1 0x000055d19120dfbe in really_call_select (arg=0x7fff6656d6f0) at thread.c:586 #2 0x000055d1910740ff in flush_stack_call_func (func=0x55d19120def3 , arg=0x7fff6656d6f0) at alloc.c:4951 #3 0x000055d19120e0ba in thread_select (func=0x7fdb9e854180 <__pselect>, max_fds=8, rfds=0x7fff6656d800, wfds=0x7fff6656d880, efds=0x0, timeout=0x7fff6656de30, sigmask=0x0) at thread.c:616 #4 0x000055d191276770 in xg_select (fds_lim=8, rfds=0x7fff6656dea0, wfds=0x7fff6656df20, efds=0x0, timeout=0x7fff6656de30, sigmask=0x0) at xgselect.c:117 #5 0x000055d19117fc7c in wait_reading_process_output (time_limit=0, nsecs=0, read_kbd=-1, do_display=true, wait_for_cell=XIL(0), wait_proc=0x0, just_wait_proc=0) at process.c:5572 #6 0x000055d190f67260 in kbd_buffer_get_event (kbp=0x7fff6656e200, used_mouse_menu=0x7fff6656e805, end_time=0x0) at keyboard.c:3866 #7 0x000055d190f6189d in read_event_from_main_queue (end_time=0x0, local_getcjmp=0x7fff6656e610, used_mouse_menu=0x7fff6656e805) at keyboard.c:2156 #8 0x000055d190f61cb3 in read_decoded_event_from_main_queue (end_time=0x0, local_getcjmp=0x7fff6656e610, prev_event=XIL(0), used_mouse_menu=0x7fff6656e805) at keyboard.c:2220 #9 0x000055d190f64030 in read_char (commandflag=1, map=XIL(0x55d19260ac23), prev_event=XIL(0), used_mouse_menu=0x7fff6656e805, end_time=0x0) at keyboard.c:2830 #10 0x000055d190f7673b in read_key_sequence (keybuf=0x7fff6656e9f0, prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:9554 #11 0x000055d190f5ef70 in command_loop_1 () at keyboard.c:1350 #12 0x000055d1910d6339 in internal_condition_case (bfun=0x55d190f5ead2 , handlers=XIL(0x90), hfun=0x55d190f5e082 ) at eval.c:1356 #13 0x000055d190f5e693 in command_loop_2 (ignore=XIL(0)) at keyboard.c:1091 #14 0x000055d1910d571c in internal_catch (tag=XIL(0xcc60), func=0x55d190f5e662 , arg=XIL(0)) at eval.c:1117 #15 0x000055d190f5e62d in command_loop () at keyboard.c:1070 #16 0x000055d190f5db49 in recursive_edit_1 () at keyboard.c:714 #17 0x000055d190f5dd49 in Frecursive_edit () at keyboard.c:786 #18 0x000055d190f5375d in main (argc=3, argv=0x7fff6656ee78) at emacs.c:2067 (gdb) p *readfds $1 = { fds_bits = {128, 0 } } (gdb) p *writefds $2 = { fds_bits = {0 } } ---------------------------------------------------------------- It appears that Emacs is waiting for input from an event object. I have no idea what that event object is about, or why the daemon would be waiting for input before starting the server. ---------------------------------------------------------------- $ ls -log /proc/1372320/fd total 0 lrwx------ 1 64 Mar 28 00:25 0 -> /dev/pts/6 lrwx------ 1 64 Mar 28 00:25 1 -> /dev/pts/6 lrwx------ 1 64 Mar 28 00:25 2 -> /dev/pts/6 lrwx------ 1 64 Mar 28 00:25 3 -> 'anon_inode:[timerfd]' l-wx------ 1 64 Mar 28 00:25 4 -> 'pipe:[510996821]' lr-x------ 1 64 Mar 28 00:25 5 -> /var/lib/sss/mc/passwd lrwx------ 1 64 Mar 28 00:25 6 -> 'anon_inode:[eventfd]' lrwx------ 1 64 Mar 28 00:25 7 -> 'anon_inode:[eventfd]' ---------------------------------------------------------------- I added some crude tracing in the init file: ---------------------------------------------------------------- (shell-command "echo >>trace .emacs start") (eval-after-load 'hilit-chg '(shell-command "echo >>trace hilit-chg loaded")) (defun my-highlight-changes-mode-hook () (shell-command (format "echo >>trace 'highlight-changes-mode=%s in %s'" highlight-changes-mode (buffer-name)))) (add-hook 'highlight-changes-mode-hook 'my-highlight-changes-mode-hook) (setq desktop-restore-frames nil) (desktop-save-mode) (require 'hilit-chg) (shell-command "echo >>trace .emacs end") ---------------------------------------------------------------- The resulting trace is: ---------------------------------------------------------------- .emacs start hilit-chg loaded .emacs end ---------------------------------------------------------------- My understanding is that the entry from desktop.el to `after-init-hook' restores the buffer in highlight-changes-mode, which calls (x-display-grayscale-p), which errors out because the daemon doesn't have an X display. And indeed I can reproduce the problem without session restoration or hilit-chg.el: the problem appears if after-init-hook throws an error. Turning on highlight-changes-mode should not depend on the capabilities of the current terminal or display, since this can change as new frames are attached. -- Gilles From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 28 02:36:16 2021 Received: (at 47334) by debbugs.gnu.org; 28 Mar 2021 06:36:16 +0000 Received: from localhost ([127.0.0.1]:45330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQP20-00077d-Ks for submit@debbugs.gnu.org; Sun, 28 Mar 2021 02:36:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQP1z-00077S-M3 for 47334@debbugs.gnu.org; Sun, 28 Mar 2021 02:36:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49145) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQP1u-0005OV-DO; Sun, 28 Mar 2021 02:36:10 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2898 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lQP1t-0003Rd-Qb; Sun, 28 Mar 2021 02:36:10 -0400 Date: Sun, 28 Mar 2021 09:36:16 +0300 Message-Id: <83im5bokdb.fsf@gnu.org> From: Eli Zaretskii To: Gilles In-Reply-To: (message from Gilles on Sun, 28 Mar 2021 03:06:25 +0200) Subject: Re: bug#47334: 27.1; Incompatibility between daemon, desktop and highlight-changes-mode References: <83h7l289q4.fsf@gnu.org> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 47334 Cc: 47334@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 (-) > From: Gilles > Date: Sun, 28 Mar 2021 03:06:25 +0200 > Cc: 47334@debbugs.gnu.org > > It appears that Emacs is waiting for input from an event object. I > have no idea what that event object is about, or why the daemon would > be waiting for input before starting the server. I'm guessing that Emacs asked a question and is waiting for the user to answer it. But since you don't show the Lisp backtrace, it's hard to know for sure. If you type "xbacktrace", does GDB show the Lisp backtrace? > Turning on highlight-changes-mode should not depend on the > capabilities of the current terminal or display, since this can change > as new frames are attached. We don't yet know if this is the problem, and thus hypothesis is inconsistent with the fact that Emacs is waiting for the user to answer some question. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 28 10:25:52 2021 Received: (at 47334) by debbugs.gnu.org; 28 Mar 2021 14:25:52 +0000 Received: from localhost ([127.0.0.1]:46702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQWMR-00049L-UR for submit@debbugs.gnu.org; Sun, 28 Mar 2021 10:25:52 -0400 Received: from mail-qk1-f177.google.com ([209.85.222.177]:37656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQWMQ-000496-Fc for 47334@debbugs.gnu.org; Sun, 28 Mar 2021 10:25:51 -0400 Received: by mail-qk1-f177.google.com with SMTP id g15so10046412qkl.4 for <47334@debbugs.gnu.org>; Sun, 28 Mar 2021 07:25:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VANBGTNKY6vXATarf9qA/LgEzGIAo4rIPoo51ITErlM=; b=dCzBGJHY/iBQNB8l4JihYOyvy0I640iCJkNrC4xcpFuf7b0zZ+rZq77y7kfed5CIqu h18/Gd1LbZJwU9mC2UVgHWpPE/d9hDWUf56RJDXMTKpGKvwPCgPizbJQIoC7zaSjjI8N zjio/Fa20+61ARCgcGdAaA/0b2ZeajMp1Bd2Dd8SQs7vIsr75EC/OYKbosBZvCGyCMhG 5qZnyrplpLdlj8BYM5s6m1bu4kvCo2ZKh9kzr48yR2LH+V+gM6cSWaizuE3bi2yFP29r QNLKRkrqeeder/xjJr/Ec4e+q445EB/5mf9wUB5oD6R4lOzUVoBC9wi5P1AzvAS65PZr CaDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VANBGTNKY6vXATarf9qA/LgEzGIAo4rIPoo51ITErlM=; b=jX2TTDknNO7M7XeT/Ln9lYnGBV0D/uyQBiapfftCGupnlkoJdjCyJhUeys96BoCtDR x6A8LYvpw97t7d2tDIf4lDTznogLv+IcnAFiruEauhqUoB0IeIkvLrlbf39O9UlIbnwG B9A7b5W3magQHeu4KAxsZyo0JRrHm5ZIrcaZ8rn4Upqoe2wdLfOXdvEAVS2aWiMrQnON ynbWgq7d9d26k1eMpjVpTU42FrAcvyXgYbiYtsaC6Lk5UwYi1aQ48vds2ed9GcssI7Sb Yv/Uos8/F4cX0MaieBq7yh3J+D+VRYGKKlkjb/kfLcF6dA+r13GB0jOJ85YrDGNWJyYE xDpw== X-Gm-Message-State: AOAM531GeqRzp8W4qAw/dG6j9N6dRbJOyZRt4K1b1e8Oe3XacSiH5N1a egRz2jwVWkv2UsOv+8+EWHB29QCkTwcS7EF91tMgVWvibg//6Q== X-Google-Smtp-Source: ABdhPJyxDr+C8ttpiE4Ztm4OlwYMuNnB5SJl2TtKlkCRo5hHZ6G5KKkcch6FOZJJW4DCdBXACQsjzUMV5W0Ew8pD4kM= X-Received: by 2002:ae9:f80b:: with SMTP id x11mr21258731qkh.220.1616941544858; Sun, 28 Mar 2021 07:25:44 -0700 (PDT) MIME-Version: 1.0 References: <83h7l289q4.fsf@gnu.org> <83im5bokdb.fsf@gnu.org> In-Reply-To: <83im5bokdb.fsf@gnu.org> From: Gilles Date: Sun, 28 Mar 2021 16:25:08 +0200 Message-ID: Subject: Re: bug#47334: 27.1; Incompatibility between daemon, desktop and highlight-changes-mode To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47334 Cc: 47334@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.0 (-) I did include the Lisp backtrace: it's empty. I used src/.gdbinit from the Emacs source tree. Here's the output I get from gdb -batch -ex bt -ex xbacktrace ./emacs 1409856 at an idle "emacs -Q": [New LWP 1409857] [New LWP 1409858] [New LWP 1409859] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 0x00007f696c484246 in __pselect (nfds=9, readfds=0x7ffdf9113730, writefds=0x7ffdf91137b0, exceptfds=0x0, timeout=, sigmask=) at ../sysdeps/unix/sysv/linux/pselect.c:48 48 ../sysdeps/unix/sysv/linux/pselect.c: No such file or directory. SIGINT is used by the debugger. Are you sure you want to change it? (y or n) [answered Y; input not from terminal] DISPLAY = :0 TERM = xterm Breakpoint 1 at 0x55e20e9cddbd: file emacs.c, line 379. Breakpoint 2 at 0x55e20e97f6f6: file xterm.c, line 10145. #0 0x00007f696c484246 in __pselect (nfds=9, readfds=0x7ffdf9113730, writefds=0x7ffdf91137b0, exceptfds=0x0, timeout=, sigmask=) at ../sysdeps/unix/sysv/linux/pselect.c:48 #1 0x000055e20ec8afbe in really_call_select (arg=0x7ffdf9113620) at thread.c:586 #2 0x000055e20eaf10ff in flush_stack_call_func (func=0x55e20ec8aef3 , arg=0x7ffdf9113620) at alloc.c:4951 #3 0x000055e20ec8b0ba in thread_select (func=0x7f696c484180 <__pselect>, max_fds=9, rfds=0x7ffdf9113730, wfds=0x7ffdf91137b0, efds=0x0, timeout=0x7ffdf9113d60, sigmask=0x0) at thread.c:616 #4 0x000055e20ecf3770 in xg_select (fds_lim=9, rfds=0x7ffdf9113dd0, wfds=0x7ffdf9113e50, efds=0x0, timeout=0x7ffdf9113d60, sigmask=0x0) at xgselect.c:117 #5 0x000055e20ebfcc7c in wait_reading_process_output (time_limit=0, nsecs=0, read_kbd=-1, do_display=true, wait_for_cell=XIL(0), wait_proc=0x0, just_wait_proc=0) at process.c:5572 #6 0x000055e20e9e4260 in kbd_buffer_get_event (kbp=0x7ffdf9114130, used_mouse_menu=0x7ffdf9114735, end_time=0x0) at keyboard.c:3866 #7 0x000055e20e9de89d in read_event_from_main_queue (end_time=0x0, local_getcjmp=0x7ffdf9114540, used_mouse_menu=0x7ffdf9114735) at keyboard.c:2156 #8 0x000055e20e9decb3 in read_decoded_event_from_main_queue (end_time=0x0, local_getcjmp=0x7ffdf9114540, prev_event=XIL(0), used_mouse_menu=0x7ffdf9114735) at keyboard.c:2220 #9 0x000055e20e9e1030 in read_char (commandflag=1, map=XIL(0x55e210c8daa3), prev_event=XIL(0), used_mouse_menu=0x7ffdf9114735, end_time=0x0) at keyboard.c:2830 #10 0x000055e20e9f373b in read_key_sequence (keybuf=0x7ffdf9114920, prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:9554 #11 0x000055e20e9dbf70 in command_loop_1 () at keyboard.c:1350 #12 0x000055e20eb53339 in internal_condition_case (bfun=0x55e20e9dbad2 , handlers=XIL(0x90), hfun=0x55e20e9db082 ) at eval.c:1356 #13 0x000055e20e9db693 in command_loop_2 (ignore=XIL(0)) at keyboard.c:1091 #14 0x000055e20eb5271c in internal_catch (tag=XIL(0xcc60), func=0x55e20e9db662 , arg=XIL(0)) at eval.c:1117 #15 0x000055e20e9db62d in command_loop () at keyboard.c:1070 #16 0x000055e20e9dab49 in recursive_edit_1 () at keyboard.c:714 #17 0x000055e20e9dad49 in Frecursive_edit () at keyboard.c:786 #18 0x000055e20e9d075d in main (argc=2, argv=0x7ffdf9114da8) at emacs.c:2067 [Inferior 1 (process 1409856) detached] And after pressing C-x C-f in that Emacs instance so that it's showing the find-file prompt: [New LWP 1409857] [New LWP 1409858] [New LWP 1409859] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 0x00007f696c484246 in __pselect (nfds=9, readfds=0x7ffdf9111050, writefds=0x7ffdf91110d0, exceptfds=0x0, timeout=, sigmask=) at ../sysdeps/unix/sysv/linux/pselect.c:48 48 ../sysdeps/unix/sysv/linux/pselect.c: No such file or directory. SIGINT is used by the debugger. Are you sure you want to change it? (y or n) [answered Y; input not from terminal] DISPLAY = :0 TERM = xterm Breakpoint 1 at 0x55e20e9cddbd: file emacs.c, line 379. Breakpoint 2 at 0x55e20e97f6f6: file xterm.c, line 10145. #0 0x00007f696c484246 in __pselect (nfds=9, readfds=0x7ffdf9111050, writefds=0x7ffdf91110d0, exceptfds=0x0, timeout=, sigmask=) at ../sysdeps/unix/sysv/linux/pselect.c:48 #1 0x000055e20ec8afbe in really_call_select (arg=0x7ffdf9110f40) at thread.c:586 #2 0x000055e20eaf10ff in flush_stack_call_func (func=0x55e20ec8aef3 , arg=0x7ffdf9110f40) at alloc.c:4951 #3 0x000055e20ec8b0ba in thread_select (func=0x7f696c484180 <__pselect>, max_fds=9, rfds=0x7ffdf9111050, wfds=0x7ffdf91110d0, efds=0x0, timeout=0x7ffdf9111680, sigmask=0x0) at thread.c:616 #4 0x000055e20ecf3770 in xg_select (fds_lim=9, rfds=0x7ffdf91116f0, wfds=0x7ffdf9111770, efds=0x0, timeout=0x7ffdf9111680, sigmask=0x0) at xgselect.c:117 #5 0x000055e20ebfcc7c in wait_reading_process_output (time_limit=30, nsecs=0, read_kbd=-1, do_display=true, wait_for_cell=XIL(0), wait_proc=0x0, just_wait_proc=0) at process.c:5572 #6 0x000055e20e7bd946 in sit_for (timeout=make_fixnum(30), reading=true, display_option=1) at dispnew.c:6064 #7 0x000055e20e9e098f in read_char (commandflag=1, map=XIL(0x55e210f25583), prev_event=XIL(0), used_mouse_menu=0x7ffdf9111d05, end_time=0x0) at keyboard.c:2738 #8 0x000055e20e9f373b in read_key_sequence (keybuf=0x7ffdf9111ef0, prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:9554 #9 0x000055e20e9dbf70 in command_loop_1 () at keyboard.c:1350 #10 0x000055e20eb53339 in internal_condition_case (bfun=0x55e20e9dbad2 , handlers=XIL(0x90), hfun=0x55e20e9db082 ) at eval.c:1356 #11 0x000055e20e9db693 in command_loop_2 (ignore=XIL(0)) at keyboard.c:1091 #12 0x000055e20eb5271c in internal_catch (tag=XIL(0x5520), func=0x55e20e9db662 , arg=XIL(0)) at eval.c:1117 #13 0x000055e20e9db5bd in command_loop () at keyboard.c:1062 #14 0x000055e20e9dab49 in recursive_edit_1 () at keyboard.c:714 #15 0x000055e20ea65f65 in read_minibuf (map=XIL(0x55e210f26463), initial=XIL(0x55e210b75c74), prompt=XIL(0x7f69691842ac), expflag=false, histvar=XIL(0x5c10), histpos=make_fixnum(0), defalt=XIL(0x55e210afa4c4), allow_props=false, inherit_input_method=false) at minibuf.c:664 #16 0x000055e20ea66bed in Fread_from_minibuffer (prompt=XIL(0x7f69691842ac), initial_contents=XIL(0x55e210b75c74), keymap=XIL(0x55e210f26463), read=XIL(0), hist=XIL(0x5c10), default_value=XIL(0x55e210afa4c4), inherit_input_method=XIL(0)) at minibuf.c:943 #17 0x000055e20eb57f53 in funcall_subr (subr=0x55e20f3745c0 , numargs=7, args=0x7ffdf91124a0) at eval.c:2888 #18 0x000055e20eb57840 in Ffuncall (nargs=8, args=0x7ffdf9112498) at eval.c:2795 #19 0x000055e20ebe2a43 in exec_byte_code (bytestr=XIL(0x7f696918da7c), vector=XIL(0x7f6969189d15), maxdepth=make_fixnum(18), args_template=make_fixnum(2050), nargs=8, args=0x7ffdf91129f8) at bytecode.c:633 #20 0x000055e20eb58581 in funcall_lambda (fun=XIL(0x7f6969189ce5), nargs=8, arg_vector=0x7ffdf91129b8) at eval.c:2990 #21 0x000055e20eb57884 in Ffuncall (nargs=9, args=0x7ffdf91129b0) at eval.c:2797 #22 0x000055e20ea68b4c in Fcompleting_read (prompt=XIL(0x7f69691842ac), collection=XIL(0x298759c9ff28), predicate=XIL(0x5a60), require_match=XIL(0x298759c85468), initial_input=XIL(0x55e210b75c74), hist=XIL(0x5c10), def=XIL(0x55e210afa4c4), inherit_input_method=XIL(0)) at minibuf.c:1658 #23 0x000055e20eb57fba in funcall_subr (subr=0x55e20f3747c0 , numargs=7, args=0x7ffdf9112bb0) at eval.c:2893 #24 0x000055e20eb57840 in Ffuncall (nargs=8, args=0x7ffdf9112ba8) at eval.c:2795 #25 0x000055e20ebe2a43 in exec_byte_code (bytestr=XIL(0x7f69692fbfac), vector=XIL(0x7f69690924ad), maxdepth=make_fixnum(22), args_template=make_fixnum(1537), nargs=6, args=0x7ffdf9113260) at bytecode.c:633 #26 0x000055e20eb58581 in funcall_lambda (fun=XIL(0x7f696909247d), nargs=6, arg_vector=0x7ffdf9113230) at eval.c:2990 #27 0x000055e20eb57884 in Ffuncall (nargs=7, args=0x7ffdf9113228) at eval.c:2797 #28 0x000055e20ebe2a43 in exec_byte_code (bytestr=XIL(0x7f69692fc05c), vector=XIL(0x7f6969092435), maxdepth=make_fixnum(13), args_template=make_fixnum(1537), nargs=4, args=0x7ffdf9113700) at bytecode.c:633 #29 0x000055e20eb58581 in funcall_lambda (fun=XIL(0x7f6969092405), nargs=4, arg_vector=0x7ffdf91136e0) at eval.c:2990 #30 0x000055e20eb57884 in Ffuncall (nargs=5, args=0x7ffdf91136d8) at eval.c:2797 #31 0x000055e20ebe2a43 in exec_byte_code (bytestr=XIL(0x7f69691872ec), vector=XIL(0x7f69691872c5), maxdepth=make_fixnum(7), args_template=make_fixnum(514), nargs=2, args=0x7ffdf9113b80) at bytecode.c:633 #32 0x000055e20eb58581 in funcall_lambda (fun=XIL(0x7f6969187295), nargs=2, arg_vector=0x7ffdf9113b70) at eval.c:2990 #33 0x000055e20eb57884 in Ffuncall (nargs=3, args=0x7ffdf9113b68) at eval.c:2797 #34 0x000055e20ebe2a43 in exec_byte_code (bytestr=XIL(0x7f696918734c), vector=XIL(0x7f696921c03d), maxdepth=make_fixnum(3), args_template=XIL(0), nargs=0, args=0x0) at bytecode.c:633 #35 0x000055e20ebe1a3a in Fbyte_code (bytestr=XIL(0x7f696918734c), vector=XIL(0x7f696921c03d), maxdepth=make_fixnum(3)) at bytecode.c:322 #36 0x000055e20eb55e6c in eval_sub (form=XIL(0x7f696921c00b)) at eval.c:2280 #37 0x000055e20eb55266 in Feval (form=XIL(0x7f696921c00b), lexical=XIL(0)) at eval.c:2103 #38 0x000055e20eb4584f in Fcall_interactively (function=XIL(0x298759e29538), record_flag=XIL(0), keys=XIL(0x55e210ff6da5)) at callint.c:323 #39 0x000055e20eb57e25 in funcall_subr (subr=0x55e20f379900 , numargs=3, args=0x7ffdf9114390) at eval.c:2873 #40 0x000055e20eb57840 in Ffuncall (nargs=4, args=0x7ffdf9114388) at eval.c:2795 #41 0x000055e20ebe2a43 in exec_byte_code (bytestr=XIL(0x7f6969228984), vector=XIL(0x7f69692286dd), maxdepth=make_fixnum(13), args_template=make_fixnum(1025), nargs=1, args=0x7ffdf91148c0) at bytecode.c:633 #42 0x000055e20eb58581 in funcall_lambda (fun=XIL(0x7f69692286ad), nargs=1, arg_vector=0x7ffdf91148b8) at eval.c:2990 #43 0x000055e20eb57884 in Ffuncall (nargs=2, args=0x7ffdf91148b0) at eval.c:2797 #44 0x000055e20eb5703f in call1 (fn=XIL(0x3d50), arg1=XIL(0x298759e29538)) at eval.c:2655 #45 0x000055e20e9dc38d in command_loop_1 () at keyboard.c:1463 #46 0x000055e20eb53339 in internal_condition_case (bfun=0x55e20e9dbad2 , handlers=XIL(0x90), hfun=0x55e20e9db082 ) at eval.c:1356 #47 0x000055e20e9db693 in command_loop_2 (ignore=XIL(0)) at keyboard.c:1091 #48 0x000055e20eb5271c in internal_catch (tag=XIL(0xcc60), func=0x55e20e9db662 , arg=XIL(0)) at eval.c:1117 #49 0x000055e20e9db62d in command_loop () at keyboard.c:1070 #50 0x000055e20e9dab49 in recursive_edit_1 () at keyboard.c:714 #51 0x000055e20e9dad49 in Frecursive_edit () at keyboard.c:786 #52 0x000055e20e9d075d in main (argc=2, argv=0x7ffdf9114da8) at emacs.c:2067 Lisp Backtrace: "read-from-minibuffer" (0xf91124a0) "completing-read-default" (0xf91129b8) "completing-read" (0xf9112bb0) "read-file-name-default" (0xf9113230) "read-file-name" (0xf91136e0) "find-file-read-args" (0xf9113b70) "byte-code" (0xf9113fa0) "call-interactively" (0xf9114390) "command-execute" (0xf91148b8) "read-from-minibuffer" (0xf91124a0) "completing-read-default" (0xf91129b8) "completing-read" (0xf9112bb0) "read-file-name-default" (0xf9113230) "read-file-name" (0xf91136e0) "find-file-read-args" (0xf9113b70) "byte-code" (0xf9113fa0) "call-interactively" (0xf9114390) "command-execute" (0xf91148b8) [Inferior 1 (process 1409856) detached] I thought Emacs might be asking some question, but if so: 1. Either the question comes from C code or there's something unusual about the context of the question that causes no Lisp backtrace to show up. 2. A prompt is inconsistent with my reading of the code of highlight-changes-mode, whereas an error is consistent. Obviously it would be easier to fix #47439 first. I consider that one more important. I originally encountered this bug when I logged in, which runs an Emacs daemon and restores my session. Having one buffer's modes not properly restored because highlight-changes-mode errored out would be a very minor problem. Having the session only partly restored because desktop-read errored out, but having a backtrace including highlight-changes-mode and desktop-read, would have made the problem easy to diagnose. Just having an Emacs process that wasn't responding was painful. -- Gilles On Sun, 28 Mar 2021 at 08:36, Eli Zaretskii wrote: > > > From: Gilles > > Date: Sun, 28 Mar 2021 03:06:25 +0200 > > Cc: 47334@debbugs.gnu.org > > > > It appears that Emacs is waiting for input from an event object. I > > have no idea what that event object is about, or why the daemon would > > be waiting for input before starting the server. > > I'm guessing that Emacs asked a question and is waiting for the user > to answer it. But since you don't show the Lisp backtrace, it's hard > to know for sure. If you type "xbacktrace", does GDB show the Lisp > backtrace? > > > Turning on highlight-changes-mode should not depend on the > > capabilities of the current terminal or display, since this can change > > as new frames are attached. > > We don't yet know if this is the problem, and thus hypothesis is > inconsistent with the fact that Emacs is waiting for the user to > answer some question. > > Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 28 10:58:51 2021 Received: (at 47334) by debbugs.gnu.org; 28 Mar 2021 14:58:51 +0000 Received: from localhost ([127.0.0.1]:46760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQWsN-000504-5u for submit@debbugs.gnu.org; Sun, 28 Mar 2021 10:58:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQWsL-0004zt-Ns for 47334@debbugs.gnu.org; Sun, 28 Mar 2021 10:58:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53289) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQWsG-0008Gd-5V; Sun, 28 Mar 2021 10:58:44 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3621 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lQWsE-0007qC-UP; Sun, 28 Mar 2021 10:58:43 -0400 Date: Sun, 28 Mar 2021 17:58:51 +0300 Message-Id: <83r1jzmij8.fsf@gnu.org> From: Eli Zaretskii To: Gilles In-Reply-To: (message from Gilles on Sun, 28 Mar 2021 16:25:08 +0200) Subject: Re: bug#47334: 27.1; Incompatibility between daemon, desktop and highlight-changes-mode References: <83h7l289q4.fsf@gnu.org> <83im5bokdb.fsf@gnu.org> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 47334 Cc: 47334@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 (-) > From: Gilles > Date: Sun, 28 Mar 2021 16:25:08 +0200 > Cc: 47334@debbugs.gnu.org > > I thought Emacs might be asking some question, but if so: > 1. Either the question comes from C code or there's something unusual > about the context of the question that causes no Lisp backtrace to > show up. > 2. A prompt is inconsistent with my reading of the code of > highlight-changes-mode, whereas an error is consistent. No, I think you are right: Emacs is just idle here, but since it didn't start the server, you cannot connect to it.