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: Tue, 13 May 2014 20:50:44 +0300 Message-ID: <83k39ppnyj.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> <83oaz5vmph.fsf@gnu.org> <83k39tvcb0.fsf@gnu.org> <87ppjkfu6t.fsf@web.de> <838uq8uv3w.fsf@gnu.org> <87a9aly8ap.fsf@web.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1400003547 32193 80.91.229.3 (13 May 2014 17:52:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 May 2014 17:52:27 +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 Tue May 13 19:52:20 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 1WkGsE-0003p4-T6 for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 May 2014 19:52:19 +0200 Original-Received: from localhost ([::1]:46840 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkGsE-0001PC-IH for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 May 2014 13:52:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50111) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkGs5-0001LL-Qx for bug-gnu-emacs@gnu.org; Tue, 13 May 2014 13:52:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkGry-0003U2-C4 for bug-gnu-emacs@gnu.org; Tue, 13 May 2014 13:52:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45121) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkGry-0003Tk-8N for bug-gnu-emacs@gnu.org; Tue, 13 May 2014 13:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WkGrx-0004n0-RQ for bug-gnu-emacs@gnu.org; Tue, 13 May 2014 13:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 May 2014 17:52: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.140000346218332 (code B ref 17392); Tue, 13 May 2014 17:52:01 +0000 Original-Received: (at 17392) by debbugs.gnu.org; 13 May 2014 17:51:02 +0000 Original-Received: from localhost ([127.0.0.1]:34239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WkGqz-0004lO-JI for submit@debbugs.gnu.org; Tue, 13 May 2014 13:51:02 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:60929) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WkGqv-0004l3-Pl for 17392@debbugs.gnu.org; Tue, 13 May 2014 13:50:59 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0N5I00G00XELPP00@a-mtaout22.012.net.il> for 17392@debbugs.gnu.org; Tue, 13 May 2014 20:50:50 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N5I00GZGXKQGL50@a-mtaout22.012.net.il>; Tue, 13 May 2014 20:50:50 +0300 (IDT) In-reply-to: <87a9aly8ap.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:89028 Archived-At: > From: Michael Heerdegen > Cc: 17392@debbugs.gnu.org > Date: Tue, 13 May 2014 18:04:14 +0200 > > Before spending time in debugging, I studied the related lisp code in > frame.el and timer.el. AFAICT, you can't explain what I see exclusively > by bugs in that code. I don't see how this can be explained except by some race condition. And I don't see how can a race condition happen here, since both Lisp and C code involved in this are supposed to be run by the same single-threaded Lisp interpreter. > But Eli, this advice: > > (advice-add 'timer-event-handler :before > (lambda (timer) > (unless (or (memq timer timer-list) > (memq timer timer-idle-list)) > (message "This should not happen")))) > > prints "This should not happen" for me. I can easily reproduce this > message in emacs -Q. Should that really be possible? If not, isn't it > a clear sign that something's going wrong in keyboard.c? I agree that the results are strange and even suspicious. But the evidence is indirect at best, and there's no description of how this could happen. All you have shown is that the invoked timer is not in the timers list at the moment when the timer is run by the Lisp interpreter. How does this implicate keyboard.c? The code in keyboard.c is very simple: it copies the timers list, and then examines each timer in the copy in sequence, and invokes every timer that expired. That is all. Can you describe a scenario where the timer function thus invoked will not find its timer in the original list? What could delete or modify the timer, and how? Perhaps instead of merely comparing timers, you could actually show the differences between the timer whose function is being run and the similar (but not identical) time in the list? (Note that copy-sequence only copies the list, but not the members, so changing a member will be reflected in the corresponding member of the original list.) Also, what about GC? Does it happen during this scenario, and if so, can it cause some strange effects like this?