From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#21313: 25.0.50; Strange errors from dbus-handle-event Date: Tue, 22 Sep 2015 10:00:59 +0200 Message-ID: <877fnikhms.fsf@gmail.com> References: <877foo4nkd.fsf@gnu.org> <87wpvzs4r3.fsf@gnu.org> <87bnd9cf7g.fsf@gnu.org> <831te53zbq.fsf@gnu.org> <871te5cdg7.fsf@gnu.org> <83wpvx2h16.fsf@gnu.org> <87r3lziti9.fsf@gnu.org> <83zj0n7jtl.fsf@gnu.org> <87wpvjovfu.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1442908950 6784 80.91.229.3 (22 Sep 2015 08:02:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Sep 2015 08:02:30 +0000 (UTC) Cc: tsdh@gnu.org To: 21313@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 22 10:02:19 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 1ZeIWj-0002a7-8o for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Sep 2015 10:02:13 +0200 Original-Received: from localhost ([::1]:37482 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeIWi-00075v-QQ for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Sep 2015 04:02:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeIWa-00075K-NJ for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2015 04:02:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeIWY-0000rN-1G for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2015 04:02:04 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49005) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeIWX-0000rI-VC for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2015 04:02:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZeIWX-0006sC-Ni for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2015 04:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Sep 2015 08:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21313 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21313-submit@debbugs.gnu.org id=B21313.144290886426268 (code B ref 21313); Tue, 22 Sep 2015 08:02:01 +0000 Original-Received: (at 21313) by debbugs.gnu.org; 22 Sep 2015 08:01:04 +0000 Original-Received: from localhost ([127.0.0.1]:41200 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZeIVb-0006pc-Mv for submit@debbugs.gnu.org; Tue, 22 Sep 2015 04:01:03 -0400 Original-Received: from mail-wi0-f169.google.com ([209.85.212.169]:35357) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZeIVa-0006pG-EG for 21313@debbugs.gnu.org; Tue, 22 Sep 2015 04:01:03 -0400 Original-Received: by wicge5 with SMTP id ge5so148790900wic.0 for <21313@debbugs.gnu.org>; Tue, 22 Sep 2015 01:01:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=DR799I98sP2z3kspIQHbl0b1yX+E3I91Anv2dGp/s8I=; b=GSdlKWphXydQa5vyceUQGoGPcFoCNRarnr0aMB5hcIzA4hlslOPV1wNv04EMsiTjjZ Vg/Ko7W6b+G43Nun93sJATclhKDuw9B46eeAmkjaULS6NnbjvKGLVIIPDy4H+14dWY8j DB4e1nnDh/h692yMHV/2EccHll/n+oHyMjA+wZeE92E985+5dQXM9rfHrrNmMu+5awl8 BxLhj0swXmEnfG/A4vvpUpLUAgcur/mYJsIELIPgZYS3e/W/rYCs6+W9Ew6RbgU8UCEK IVITddG/pK4uMNhNRful3Vry6nQkFNfuaw+aAhvAD8zfU122o2bN0rkZ8/1g4p8e5jww /PgA== X-Received: by 10.194.93.35 with SMTP id cr3mr27203408wjb.46.1442908861689; Tue, 22 Sep 2015 01:01:01 -0700 (PDT) Original-Received: from rpluim-ubuntu ([213.30.189.66]) by smtp.gmail.com with ESMTPSA id wc12sm1676582wic.18.2015.09.22.01.01.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Sep 2015 01:01:00 -0700 (PDT) Gmane-Reply-To-List: yes In-Reply-To: <87wpvjovfu.fsf@gnu.org> (Tassilo Horn's message of "Tue, 22 Sep 2015 07:49:09 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) 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:106802 Archived-At: Tassilo Horn writes: > Eli Zaretskii writes: > >>> I wondered why channel is not removed from Available here. I mean, >>> input was available, and then the handlers registered using >>> add_read_fd by inotify or dbus consumed the input, so there's >>> probably no input left. So I tried this patch >>> >>> --8<---------------cut here---------------start------------->8--- >>> diff --git a/src/process.c b/src/process.c >>> index ed5f4c0..7985e37 100644 >>> --- a/src/process.c >>> +++ b/src/process.c >>> @@ -5036,7 +5036,10 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, >>> && FD_ISSET (channel, &Available)) >>> || (d->condition & FOR_WRITE >>> && FD_ISSET (channel, &write_mask)))) >>> - d->func (channel, d->data); >>> + { >>> + d->func (channel, d->data); >>> + FD_CLR (channel, &Available); >>> + } >>> } >>> >>> for (channel = 0; channel <= max_process_desc; channel++) >>> --8<---------------cut here---------------end--------------->8--- >>> >>> and since then the problem has not appeared again and I can't see any >>> obvious other malfunction. But of course that's really a naive >>> change. I can grasp the big picture of wait_reading_process_output >>> but not all the details. >> >> If no one objects in a week, please push this, and let's see what it >> breaks. > > I've run with this patch for about a week now and the issue hasn't > occurred anymore. So I just pushed it and close the bug report with > this mail. What if it was the 'FOR_WRITE' part of the condition that triggered? Perhaps we should split the 'if'. Regards Robert