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#17392: 24.3.90; cursor blinks faster and faster Date: Sat, 10 May 2014 15:32:10 +0300 Message-ID: <83oaz5vmph.fsf@gnu.org> References: <87r44b1vrh.fsf@web.de> <8738gq67av.fsf@web.de> <87sioqcx7n.fsf@web.de> <8761lkugic.fsf@web.de> <877g5zygco.fsf@web.de> <87a9au5o8l.fsf@web.de> <8761ld3ota.fsf@web.de> <83ppjlvqo1.fsf@gnu.org> <871tw150b9.fsf@web.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1399725206 15636 80.91.229.3 (10 May 2014 12:33:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 10 May 2014 12:33:26 +0000 (UTC) Cc: 17392@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 10 14:33:18 2014 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 1Wj6Sr-0003WQ-8c for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 May 2014 14:33:17 +0200 Original-Received: from localhost ([::1]:57498 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wj6Sq-000449-PE for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 May 2014 08:33:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40934) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wj6Si-000443-Dx for bug-gnu-emacs@gnu.org; Sat, 10 May 2014 08:33:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wj6Sc-0001R4-FB for bug-gnu-emacs@gnu.org; Sat, 10 May 2014 08:33:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40469) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wj6Sc-0001Qy-CM for bug-gnu-emacs@gnu.org; Sat, 10 May 2014 08:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wj6Sb-0006Pa-PY for bug-gnu-emacs@gnu.org; Sat, 10 May 2014 08:33: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, 10 May 2014 12:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17392 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17392-submit@debbugs.gnu.org id=B17392.139972512324563 (code B ref 17392); Sat, 10 May 2014 12:33:01 +0000 Original-Received: (at 17392) by debbugs.gnu.org; 10 May 2014 12:32:03 +0000 Original-Received: from localhost ([127.0.0.1]:57820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wj6Re-0006O6-Kk for submit@debbugs.gnu.org; Sat, 10 May 2014 08:32:03 -0400 Original-Received: from mtaout27.012.net.il ([80.179.55.183]:39115) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wj6Rb-0006Nb-IW for 17392@debbugs.gnu.org; Sat, 10 May 2014 08:32:01 -0400 Original-Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0N5C00H00Y5N5Y00@mtaout27.012.net.il> for 17392@debbugs.gnu.org; Sat, 10 May 2014 15:28:31 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N5C00F7XYNJWQ30@mtaout27.012.net.il>; Sat, 10 May 2014 15:28:31 +0300 (IDT) In-reply-to: <871tw150b9.fsf@web.de> 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: 140.186.70.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:88861 Archived-At: > From: Michael Heerdegen > Cc: 17392@debbugs.gnu.org > Date: Sat, 10 May 2014 13:40:26 +0200 > > > > So an idle blinking timer not in timer-idle-list is called from C > > > with timer-event-handler. At this point, there is already another > > > blinking timer in timer-idle-list. > > > > So is there a blinking time in timer-idle-list, or isn't there? > > There is one blinking timer in timer-idle-list. But timer-event-handler > is called with a different blinking timer that is not memq in > timer-idle-list. How can that happen? The only place AFAIK that calls idle timers is keyboard.c, and it takes the timers off timer-idle-list. Since Emacs's Lisp interpreter is single-threaded, how could the situation you describe happen? > It seems that the implementation detail you cited leads in our case to > the revival of canceled timers although there haven't been activated > from LISP? Maybe so, but again, you'd need to describe a sequence of events that could lead to this. Every time timer_check is called, it starts by copying the current value of timer-idle-list, and doesn't consider it again until it processed that copy entirely. The Lisp interpreter is not called except when we call a timer function taken from the list. So if a timer is canceled before timer_check is called, it will be absent from the copy used by timer_check, and if it is canceled as part of some timer's operation, it won't be there on the next invocation of timer_check. Right? So how could a timer be revived if it was canceled? More to the point, which of the blink-cursor timers could potentially cause this situation? Is there a chance handle-focus-in is called asynchronously by a thread other than the one which runs the Lisp interpreter? I don't think so (and if it did, it would be a very Bad Thing), but other than that, how can you explain that a timer got off timer-idle-list while that same timer was found in that same list by a C code which cannot be preempted by any Lisp?