From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21380: 25.0.50; GTK-induced segfault when scheduling timer from window-configuration-change-hook Date: Sat, 05 Sep 2015 18:27:30 +0300 Message-ID: <834mj89999.fsf@gnu.org> References: <83mvx8252m.fsf@gnu.org> <83k2sc20k6.fsf@gnu.org> <83h9ng1ryx.fsf@gnu.org> <83a8t71qct.fsf@gnu.org> <83fv2ychbg.fsf@gnu.org> <838u8qcenv.fsf@gnu.org> <55E69F07.9060006@gmx.at> <83a8t18gdu.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1441466963 22080 80.91.229.3 (5 Sep 2015 15:29:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Sep 2015 15:29:23 +0000 (UTC) Cc: pipcet@gmail.com, 21380@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 05 17:29:11 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZYFOx-0002RN-As for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Sep 2015 17:29:11 +0200 Original-Received: from localhost ([::1]:41023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYFOx-0004Ps-Bg for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Sep 2015 11:29:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYFOt-0004PX-GU for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2015 11:29:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYFOo-0005Kj-OK for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2015 11:29:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57848) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYFOo-0005KL-LV for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2015 11:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZYFOo-0002Dn-BS for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2015 11:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Sep 2015 15:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21380 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21380-submit@debbugs.gnu.org id=B21380.14414669038489 (code B ref 21380); Sat, 05 Sep 2015 15:29:02 +0000 Original-Received: (at 21380) by debbugs.gnu.org; 5 Sep 2015 15:28:23 +0000 Original-Received: from localhost ([127.0.0.1]:50058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZYFOB-0002Cr-2Z for submit@debbugs.gnu.org; Sat, 05 Sep 2015 11:28:23 -0400 Original-Received: from mtaout26.012.net.il ([80.179.55.182]:36746) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZYFO8-0002Ch-79 for 21380@debbugs.gnu.org; Sat, 05 Sep 2015 11:28:21 -0400 Original-Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NU700E00MSIX400@mtaout26.012.net.il> for 21380@debbugs.gnu.org; Sat, 05 Sep 2015 18:30:33 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NU700B6SN1ITK40@mtaout26.012.net.il>; Sat, 05 Sep 2015 18:30:33 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:106179 Archived-At: > From: Stefan Monnier > Cc: rudalics@gmx.at, pipcet@gmail.com, 21380@debbugs.gnu.org > Date: Sat, 05 Sep 2015 11:18:54 -0400 > > > I'm not sure I understand this plan. Are you saying that consing a > > new list in timer--activate, instead of reusing an existing cell, will > > avoid the need to wok on a copy of the timer's list when invoking the > > timer callbacks? > > That's the idea, yes. > > > If so, I'm probably missing something here, because > > timer--activate will update the timer list variable anyway, > > This is OK: by this time, we've already read this timer list variable so > changing it won't affect us. What do you mean by "have read the variable"? We are "reading" it one member at a time, as timer_check goes about its business. > > Not to mention the fact that with timers firing every several tens of > > ms, something we've seen while discussing these bugs, allocating a > > couple of cells each time might cause a lot of consing per second, > > which in turn causes GC, which slows down everything. > > How could it be worse to allocate cells when we activate a timer than > copying the whole list every time we check the timers? Twice worse, I'd say (assuming "a couple" really means 2). But this is not the important issue right now. Right now, I don't understand how your proposal will solve this and related bugs.