From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: undo-auto--undoable-change infloop Date: Tue, 26 Jul 2022 05:54:42 +0200 Message-ID: <87o7xc1qbh.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21839"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) To: Emacs Development Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 26 05:56:28 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oGBgJ-0005Yp-7U for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Jul 2022 05:56:27 +0200 Original-Received: from localhost ([::1]:35128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGBgH-0005yB-RA for ged-emacs-devel@m.gmane-mx.org; Mon, 25 Jul 2022 23:56:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGBeh-0005BY-6e for emacs-devel@gnu.org; Mon, 25 Jul 2022 23:54:47 -0400 Original-Received: from mout.web.de ([212.227.15.14]:33117) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGBef-0002IS-BT for emacs-devel@gnu.org; Mon, 25 Jul 2022 23:54:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1658807683; bh=W4Meoc2Ac6xjDJ5ZtgJ8H2JGztqop4aip3/LMq8sYcY=; h=X-UI-Sender-Class:From:To:Subject:Date; b=KFoVaiRg5nv1roFGM5pJ77Q+tLI/fKq+gvYxbwXKO5YPYgenQ5s/raA3vo2hB4buJ wfsGgoOev3mna9228DGXBJTfYHr97/FKWqzIpqnJUVG57QjjMMaLugV0KnHddtANjs WpvSgWp2H6mOupjh8iqbSxPM7ceeX0GUQKm9QFfU= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([84.57.248.18]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MsaWF-1nMRZY1UYV-00tkLM; Tue, 26 Jul 2022 05:54:43 +0200 X-Provags-ID: V03:K1:Wx7TB75uiLcI/w3os6IXN03oLK2ZrgB7P4NVdQ6qCLgFQIJFkQH RiHvZDmkQl0yjGGP/kOHV3YI97r2IlQH7jAp1z4TsmIs+swNZLcILyClimsUcsw3QlkTfvN 04pcU8kVtHQh84cKKvW5ZlxUE7YMnrYxKhAMfoi4eyBtzcD5xMBI15iHgnIei0vHZHJx3PA QJVnumIDj9ibwIxoLmCsg== X-UI-Out-Filterresults: notjunk:1;V03:K0:b4wDY77DCBg=:KMl7YiUFsECc/f+RO8F6JL z646uM0u9vDzQ3i9PMZJxN4qF+9OiJMMF2K29xGX0wa7EDV9KfDPpeLQ3Huc18BzM7kd4nlMj eulUK8TkerKNN3EyBgUFF2HuGd+ElEycHlYtXisZiYivwsb7c3dnDQyBjV5QBgw3katg0WCaz nMn19tTyrXyY1Ig190ESj25+1Z8+d8YXPDxUvhO7kUNbQQMidrCPN9uLeoAwt50gNnvQKXmkD AXLfmh/rIsjCC8BTvbkWSkljAyXuaxHXEtlt21S+axD1+FpifhPqa2GCZqReZUwGcyucMo660 Mn2zfcEBmK8zzFp8vW42273M1y5MFT4OYiozRB1K0gl3xtwSc/9vAmR8bHrEBfEyb6eoGIeBE sq73SOjHj6xcy4P4w2YCL95u4u3bwBLwP6XPBpO4lnvdq7bFGghzVHGSRen3FX8E5TAq8zJcT Gpmgi1Aej+05IEGIquHSl5COc/jX2oY5MOmWoou/AUL89AaC2piLohWXeBfY37WAAEVYyA81E y7pXcORKNRpnISZMhhhqNqrcCiwaeuL68Yyd1wjoW5WsSRJi9Qnp0B0HyLyxrcyEOryGfO/DA Hu028mRrOY4OoUPXbBRfkFIDaukZfObjvrevniVKtog6zJIHbxUYOQ3ZtXhLL4R1kPiYjwAmP QSFLldPr/M5QjgZ2v46FekBmW+5T/P+im23Rp18KsRgRFs1/pM18irKScxcHVmCly0MNznOUK 9qTmleeQ5tt9h9FrUAl1lGE88/knmHpfO+CDq4SJR5ZOl69jqetmkJbp8wsjDmKB84c+bbfW Received-SPF: pass client-ip=212.227.15.14; envelope-from=michael_heerdegen@web.de; helo=mout.web.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:292665 Archived-At: Hello, does somebody have a guess what is happening here? After automatically replacing thousands of matches in a buffer with my el-search, I got a sluggish Emacs afterwards, after a short pause. Emacs consumed 100% of one CPU. It took me hours to find something, and it seems to be unrelated to my own code: `undo-auto--undoable-change'. It seems to recurse very deep, or to be called extremely often. I managed to produce a backtrace, see below. How is that recursion even possible - what could be going on? TIA, Michael The backtrace (the first cursor blink afterwards seems to initiate the problematic behavior): (timer-activate [t 25311 13221 560142 nil undo-auto--boundary-timer nil nil 540000 nil]) (run-at-time 10 nil undo-auto--boundary-timer) (undo-auto--boundary-ensure-timer) (undo-auto--undoable-change) (timer-activate [t 25311 13220 972130 nil undo-auto--boundary-timer nil nil 860000 nil]) (run-at-time 10 nil undo-auto--boundary-timer) (undo-auto--boundary-ensure-timer) (undo-auto--undoable-change) (timer-activate [t 25311 13220 562017 nil undo-auto--boundary-timer nil nil 682000 nil]) (run-at-time 10 nil undo-auto--boundary-timer) (undo-auto--boundary-ensure-timer) (undo-auto--undoable-change) (timer-activate [t 25311 13220 175101 nil undo-auto--boundary-timer nil nil 375000 nil]) (run-at-time 10 nil undo-auto--boundary-timer) (undo-auto--boundary-ensure-timer) (undo-auto--undoable-change) (timer-activate [t 25311 13219 728313 nil undo-auto--boundary-timer nil nil 962000 nil]) (run-at-time 10 nil undo-auto--boundary-timer) (undo-auto--boundary-ensure-timer) (undo-auto--undoable-change) (timer-activate [t 25311 13219 407621 nil undo-auto--boundary-timer nil nil 486000 nil]) (run-at-time 10 nil undo-auto--boundary-timer) (undo-auto--boundary-ensure-timer) (undo-auto--undoable-change) (timer-activate [t 25311 13219 71400 nil undo-auto--boundary-timer nil nil 128000 nil]) (run-at-time 10 nil undo-auto--boundary-timer) (undo-auto--boundary-ensure-timer) (undo-auto--undoable-change) (timer-activate [t 25311 13218 786464 nil undo-auto--boundary-timer nil nil 766000 nil]) (run-at-time 10 nil undo-auto--boundary-timer) (undo-auto--boundary-ensure-timer) (undo-auto--undoable-change) (timer-activate [t 25311 13218 551162 nil undo-auto--boundary-timer nil nil 891000 nil]) (run-at-time 10 nil undo-auto--boundary-timer) (undo-auto--boundary-ensure-timer) (undo-auto--undoable-change) (timer-activate [t 25311 13218 258788 nil undo-auto--boundary-timer nil nil 94000 nil]) (run-at-time 10 nil undo-auto--boundary-timer) (undo-auto--boundary-ensure-timer) (undo-auto--undoable-change) (timer-activate [t 25311 13218 89932 nil undo-auto--boundary-timer nil nil 31000 nil]) (run-at-time 10 nil undo-auto--boundary-timer) (undo-auto--boundary-ensure-timer) (undo-auto--undoable-change) (timer-activate [t 25311 13217 955384 nil undo-auto--boundary-timer nil nil 756000 nil]) (run-at-time 10 nil undo-auto--boundary-timer) (undo-auto--boundary-ensure-timer) (undo-auto--undoable-change) (timer-activate [t 25311 13217 847383 nil undo-auto--boundary-timer nil nil 663000 nil]) (run-at-time 10 nil undo-auto--boundary-timer) (undo-auto--boundary-ensure-timer) (undo-auto--undoable-change) (timer-activate [t 25311 13217 765424 nil undo-auto--boundary-timer nil nil 571000 nil]) (run-at-time 10 nil undo-auto--boundary-timer) (undo-auto--boundary-ensure-timer) (undo-auto--undoable-change) (timer-activate [t 25311 13207 807483 0.15 blink-cursor-timer-function nil nil 407999 nil]) (run-at-time 0.15 0.15 blink-cursor-timer-function) (run-with-timer 0.15 0.15 blink-cursor-timer-function) (blink-cursor--start-timer) (blink-cursor-start) When I redefine `undo-auto--undoable-change' with an empty body, the problem disappears. I could not reproduce something similar with normal query-replace.