From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#27210: 25.2; Recovering loaddefs.el with desktop-mode hangs when linum is on Date: Sat, 03 Jun 2017 13:43:45 -0400 Message-ID: <87a85p0xwu.fsf@users.sourceforge.net> References: <20170603142911.GB7275@gmail.com> <83fufhaznj.fsf@gnu.org> <20170603162244.GD7275@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1496511795 24574 195.159.176.226 (3 Jun 2017 17:43:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 3 Jun 2017 17:43:15 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) Cc: 27210@debbugs.gnu.org To: Pierre Neidhardt Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 03 19:43:12 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHD4x-0006By-Q2 for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Jun 2017 19:43:12 +0200 Original-Received: from localhost ([::1]:54407 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHD53-0000OF-61 for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Jun 2017 13:43:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHD4r-0000Lg-Fg for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2017 13:43:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHD4o-0006wD-B7 for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2017 13:43:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51399) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dHD4o-0006vq-7M for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2017 13:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dHD4n-0000C1-T7 for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2017 13:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Jun 2017 17:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27210-submit@debbugs.gnu.org id=B27210.1496511738692 (code B ref 27210); Sat, 03 Jun 2017 17:43:01 +0000 Original-Received: (at 27210) by debbugs.gnu.org; 3 Jun 2017 17:42:18 +0000 Original-Received: from localhost ([127.0.0.1]:54076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHD44-0000Az-9B for submit@debbugs.gnu.org; Sat, 03 Jun 2017 13:42:16 -0400 Original-Received: from mail-it0-f41.google.com ([209.85.214.41]:36852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHD42-0000Af-Ku; Sat, 03 Jun 2017 13:42:14 -0400 Original-Received: by mail-it0-f41.google.com with SMTP id m47so31847538iti.1; Sat, 03 Jun 2017 10:42:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=facTOYzunSnH1Lrf01yJn8AkwV/P++PT+r5/oxp5UPY=; b=dXMtb5NzqTaqsa5GRzCh1+7HgZcQwvrGyaqX/0BUikIz2q16dHu/r1brdMac1xCyc7 h1SjT2SOpOT/CFEzARwr5KORZVwNDmi2CBZItMPSF3Q+JIqDgTKrPhTd4muDJz141S1y UnPSgbqwum64u3XPHJIwkfpLvpwDdGLxqnhBvJ7ZzzwXc+/CwksDITTeGtP07wjOSDS7 4JXemT5XFgovm746iNbB4LjU1wDnUebWaGVmpRPi/r7AiOYtlhOLEFJpNS3unoarnj7m rHyMa9BMpJ57oq9qcspaFr1sXMtcW8DjFp/UPEw5pbjP4L3zXtUX+e44NdSec5wEwSc8 Be/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=facTOYzunSnH1Lrf01yJn8AkwV/P++PT+r5/oxp5UPY=; b=Y8ZtzqJRdYCRfCIkuDADnUl11piVgUUJnbIuzO20DIRyZH9PcVkBuCCuM+UCnfizC4 tv6zCbOoHYFFPVQK4Ne+EkozXgj4gZI5CoD29mMYBkWff7mfDyH4GXZ0Yy3zCsBaXpdv 4bMvIv3CWsxZHcV0xSgHYEtqIGUvmak1ZAnbJEvXV/fKKgCSTQnPeF1KH841PYrLzC1b TAYlvC7I5h6NkDEWtL0qnadMZO7TM9gQtafvA8PqYlz46TbMY5SJxjySnll3nP6qibrK LNTcauF61sAUsnkYCyPOFicjNBs4L/8sBpKhUlvPdARhD013Xr47caIYMI4Tfu7oLRnS 2lig== X-Gm-Message-State: AODbwcBt6F0exoZpDqTgHXXJCvMcsbLzdX9w6erHN7UgGlRyV3sse4IX wUMzfURkboeGYHg3 X-Received: by 10.107.173.73 with SMTP id w70mr3152678ioe.135.1496511728767; Sat, 03 Jun 2017 10:42:08 -0700 (PDT) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id w70sm2708891itb.18.2017.06.03.10.42.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 03 Jun 2017 10:42:07 -0700 (PDT) In-Reply-To: <20170603162244.GD7275@gmail.com> (Pierre Neidhardt's message of "Sat, 3 Jun 2017 17:22:44 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:133225 Archived-At: tags 27210 confirmed quit Pierre Neidhardt writes: > On 17-06-03 17:56:00, Eli Zaretskii wrote: >> > >> > With the following init file: >> > >> > (desktop-save-mode 1) >> > (global-linum-mode) >> > >> > I visit "/usr/share/emacs/25.2/lisp/loaddefs.el" and everything is fine. >> > I save the desktop session with `desktop-save-in-desktop-dir' and kill >> > Emacs. [...] >> > and Emacs hangs for minutes at least, possibly forever, becoming a CPU hog. I >> > then have to kill Emacs. > >> Can you try building the Emacs master branch? If my guess is correct, >> this problem will not exist there. > > I just did and the issue is still there. > > I am sorry I forgot to mention that the issue only happens when running `emacs --daemon`. I can reproduce this, the problem seems to be that window-start and window-end give the same answers as point-min and point-max respectively when in daemon mode. This causes linum-update-window to make overlays for every line in the buffer. (defun linum-update-window (win) "Update line numbers for the portion visible in window WIN." (goto-char (window-start win)) (let ((line (line-number-at-pos)) (limit (window-end win t)) [...] ;; Create an overlay (or reuse an existing one) for each ;; line visible in this window, if necessary. (while (and (not (eobp)) (< (point) limit)) (gdb) p current_buffer->name_ $11 = XIL(0x2ecd214) (gdb) xpr Lisp_String $12 = (struct Lisp_String *) 0x2ecd210 "loaddefs.el" (gdb) n 1614 buf = w->contents; (gdb) 1615 CHECK_BUFFER (buf); (gdb) 1616 b = XBUFFER (buf); (gdb) 1618 if (! NILP (update) (gdb) 1619 && (windows_or_buffers_changed (gdb) 1628 && !(noninteractive || FRAME_INITIAL_P (WINDOW_XFRAME (w)))) (gdb) 1662 XSETINT (value, BUF_Z (b) - w->window_end_pos); (gdb) 1664 return value; (gdb) p value $13 = make_number(1203513) (gdb) xbacktrace "window-end" (0xffff74f0) "linum-update-window" (0xffff7d68) "mapc" (0xffff7f88) "linum-update" (0xffff86d0) "linum-after-scroll" (0xffff8ec8) "set-window-buffer" (0xffff9130) "switch-to-buffer" (0xffff98e0) "desktop-restore-file-buffer" (0xffffa0f0) "desktop-create-buffer" (0xffffa930) "eval-buffer" (0xffffae80) "load-with-code-conversion" (0xffffb698) "load" (0xffffbac8) "desktop-read" (0xffffc370) 0x1510fd0 PVEC_COMPILED "run-hooks" (0xffffccd0) "command-line" (0xffffdb48) "normal-top-level" (0xffffe3c0)