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#21337: 25.0.50; inotify error message Date: Mon, 24 Aug 2015 20:32:59 +0200 Message-ID: <87io84pmec.fsf@gmail.com> References: <87k2skyjf2.fsf@gmail.com> <83d1ychefg.fsf@gnu.org> <87oahw8xmv.fsf@gmail.com> <83a8tghcgr.fsf@gnu.org> <87twrobpet.fsf@gmail.com> <836144hagi.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1440441264 23699 80.91.229.3 (24 Aug 2015 18:34:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 24 Aug 2015 18:34:24 +0000 (UTC) Cc: 21337@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 24 20:34:15 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 1ZTwZO-0008J0-7i for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Aug 2015 20:34:10 +0200 Original-Received: from localhost ([::1]:56019 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTwZN-0004bN-H5 for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Aug 2015 14:34:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTwZJ-0004ZT-HD for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2015 14:34:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZTwZG-00053M-Am for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2015 14:34:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45011) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTwZG-00053I-7o for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2015 14:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZTwZF-0006oO-R7 for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2015 14:34: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: Mon, 24 Aug 2015 18:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21337 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21337-submit@debbugs.gnu.org id=B21337.144044118526118 (code B ref 21337); Mon, 24 Aug 2015 18:34:01 +0000 Original-Received: (at 21337) by debbugs.gnu.org; 24 Aug 2015 18:33:05 +0000 Original-Received: from localhost ([127.0.0.1]:37221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZTwYK-0006nC-RW for submit@debbugs.gnu.org; Mon, 24 Aug 2015 14:33:05 -0400 Original-Received: from mail-wi0-f177.google.com ([209.85.212.177]:34686) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZTwYI-0006n4-R5 for 21337@debbugs.gnu.org; Mon, 24 Aug 2015 14:33:03 -0400 Original-Received: by widdq5 with SMTP id dq5so58522297wid.1 for <21337@debbugs.gnu.org>; Mon, 24 Aug 2015 11:33:02 -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=6pTYANIAlgFuXLef7xgd+bn7pXZwOMRiJ9sXr+AY8+w=; b=HxCKHGk/DMkJ0tFPw5ZXum8m2JicPaYdQIMtReJLZLSywSLF1kO2WZb2IJ3Rg3R7uN pny4UZ/1lkxuCqP4v+mM2iGo2DFWSs6oC7B/+Lw+P6LH4+cEcf8dbRATuFNMvQtKEOG2 y5wJJZbuJtzA140ZUN0F3nG9bSFJVirsRbEKPlBNqpilMQ26K01feLl7knm0tAHGfWLP syYg9fNcD5vLzGa7gLhxGOdQ5HeTcfNKssxe+ZLUq/xg5SGleiRXWZCT2OIN0yYuNOmt UM9foKWn+8LxygsJ+BhCGyOAkJfbb6DtlHKPb/wFHbWW1BP9cYnUFAsUW94YHtqRjILW VokA== X-Received: by 10.194.81.67 with SMTP id y3mr41609032wjx.7.1440441182263; Mon, 24 Aug 2015 11:33:02 -0700 (PDT) Original-Received: from rpluim-ubuntu ([2a01:e34:ecfc:a090:79ef:ec64:6295:4e79]) by smtp.gmail.com with ESMTPSA id o9sm24358741wja.29.2015.08.24.11.33.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Aug 2015 11:33:01 -0700 (PDT) Gmane-Reply-To-List: yes In-Reply-To: <836144hagi.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 24 Aug 2015 20:18:05 +0300") 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:105787 Archived-At: Eli Zaretskii writes: > > Strange. Does auto-revert-mode work in "emacs -Q"? Do the related > tests in the test suite pass? > Yes and yes. > Can you use strace to see what error is that and what directory is > being watched? strace indicates that the directory where emacs is being run from is being watched, along with my home directory plus any directories containing files that are being visited. What's strange is that inotify_add_watch is being called 22 times for the current directory. I've debugged inotify_callback a little. The expectation of this code to_read = 0; if (ioctl (fd, FIONREAD, &to_read) == -1) xsignal1 (Qfile_notify_error, build_string ("Error while trying to retrieve file system events")); buffer = xmalloc (to_read); n = read (fd, buffer, to_read); if (n < 0) { is that the read will succeed, however to_read is very often 0, so it's not surprising the read fails. (what does xmalloc do when its argument is 0?) My understanding was that the callback should only be called when there are actual inotify events to process, so this behaviour is somewhat surprising to me. I can add in skipping the read if to_read == 0, but I suspect that's just papering over the cracks. Regards Robert