From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Fabrice Popineau Newsgroups: gmane.emacs.bugs Subject: bug#22534: File notify broken on Windows Date: Fri, 5 Feb 2016 06:59:00 +0100 Message-ID: References: <83h9hrytom.fsf@gnu.org> <87lh72xln0.fsf@gmx.de> <838u30wbx5.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1140990e56a257052aff8d2e X-Trace: ger.gmane.org 1454652023 12595 80.91.229.3 (5 Feb 2016 06:00:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Feb 2016 06:00:23 +0000 (UTC) Cc: 22534@debbugs.gnu.org, Michael Albinus To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 05 07:00:14 2016 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 1aRZRF-0003dq-5A for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Feb 2016 07:00:13 +0100 Original-Received: from localhost ([::1]:46176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRZRD-0001iW-Uj for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Feb 2016 01:00:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRZR8-0001gL-Fg for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2016 01:00:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRZR5-0004Ex-71 for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2016 01:00:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52267) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRZR5-0004Er-2X for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2016 01:00:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aRZR4-0001Ze-Ro for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2016 01:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Fabrice Popineau Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Feb 2016 06:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22534 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22534-submit@debbugs.gnu.org id=B22534.14546519685981 (code B ref 22534); Fri, 05 Feb 2016 06:00:02 +0000 Original-Received: (at 22534) by debbugs.gnu.org; 5 Feb 2016 05:59:28 +0000 Original-Received: from localhost ([127.0.0.1]:60856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRZQV-0001YP-QY for submit@debbugs.gnu.org; Fri, 05 Feb 2016 00:59:28 -0500 Original-Received: from mail-oi0-f49.google.com ([209.85.218.49]:35386) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRZQT-0001YC-Cg for 22534@debbugs.gnu.org; Fri, 05 Feb 2016 00:59:25 -0500 Original-Received: by mail-oi0-f49.google.com with SMTP id s2so35632550oie.2 for <22534@debbugs.gnu.org>; Thu, 04 Feb 2016 21:59:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=BeW3McbV8W2e7SU3Ii3gKYKPqJYDHKvo1+vaBBc4E34=; b=Mv9lWisGFpzMWWjSQEiMKZa73dKUr6u3/dsppjtASUrBUbq/xDP6yzMiWRHeJ/Bng9 k9Tg5WocRxRPVs1RMZ6oZLJ+qjYA5QXx9cgJwUFpozNEro/AzXIilAOiX9h8/QgqTZxD 1gkRjM/aXaTWf+V+AYSO2iSjZpaOArWg2+xbNc2E3ihLGoVsvt9SXiKhLaLqHAeGugsH z88v0CvcaTV18PQY/OBd/P1IDSjPLAbkoFIQ6bsd55SZm9JQl7q+N+gmL116WSNCPdBE ILinWnAhVdZeoyNblBX+voqn15tg0berdwycQhPuCeWW+xVrOGDb141vzW4LufMWXuiX xPSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=BeW3McbV8W2e7SU3Ii3gKYKPqJYDHKvo1+vaBBc4E34=; b=QFnGSJvrVe0y8KPcKIYFNZLaRBkrALiI+qGMGK+gQl48zWLd/w2lqbSZ5NvNmoOzdN hBOIiTCLb8FjgSrNLbWMvfIBSmT90J2mVt/DDKQQ3TAnEvrR2/vyYKnxxmABNSgTk5d2 F5K84nKreA2RRjiZGiW5EV+0c9NQ7nTBU485aGp9eB+ngsSI3aAeb45tu1O/ZvEEVtXB fhssfjPMTIAPQYjd+siRnlhSdKHKMgWwe8u/VHiNrbGzWcnJo6o8Z235cU4HtdrSFfuQ 36KHx5HNgzfkbWKe3ujEgcHo4IepbV+ag94LUCciJ+fGl5/oYSWXQy/IgtOzRriIz0Yz 7QKg== X-Gm-Message-State: AG10YORjUvB1zwWfOd9uoroIak+SEiQb7l/sXxn7A2BwyZD+78AWyrbB0zCKZhFVnXCANlMWZKXPokR77hDoDg== X-Received: by 10.202.104.152 with SMTP id o24mr7019840oik.87.1454651959843; Thu, 04 Feb 2016 21:59:19 -0800 (PST) Original-Received: by 10.202.78.67 with HTTP; Thu, 4 Feb 2016 21:59:00 -0800 (PST) In-Reply-To: <838u30wbx5.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:112456 Archived-At: --001a1140990e56a257052aff8d2e Content-Type: text/plain; charset=UTF-8 2016-02-04 19:47 GMT+01:00 Eli Zaretskii : > > From: Fabrice Popineau > > Date: Thu, 4 Feb 2016 10:49:42 +0100 > > Cc: Eli Zaretskii , 22534@debbugs.gnu.org > > > > - notifications returned are not the same whether you run the tests in > batch mode or interactive mode. > > In interactive mode, there is a deleted notification which is sent when > your remove the directory being > > watched. > > This event is not seen when running in batch mode (make check). I wonder > what could make a difference. > > Support for file notifications in batch mode is fragile: w32notify > normally works by sending a message to the main thread whenever it has > a notification to report. But in batch mode, the main thread doesn't > read Windows messages, so whether an event gets reported depends on > whether 'pselect' is called, which depends on what API is called to > wait for notifications and read them. > > Ok. Maybe that's the reason, but in this case, the expected events have to be adjusted because 'make check' runs in batch mode. > > - in the test file-notify-test06-many-events to check that events > > are not dropped : I have to lower the 1000 number. The test fails > > as soon as I go higher than around 260. Is there some limit here ? > > Is this in interactive or a batch-mode run? > > In interactive mode. The limit is somewhere between 260 and 280. > > Once the limit is reached, only the first notification is returned. > > What do you mean by "the first notification"? AFAIU, the 1000 events > are generated as 500 pairs of renames, so what is "the first" here, > after 260 were already generated? > > The notification for the first pair in the list, the one numbered 999 is the only one appearing in file-notify--test-events. > > Overall, I don't think anymore that the patch by Michael has broken w32 > file notifications > > but rather that the new tests have highlighted some potential problems > with it. > > I've just found a serious problem, see bug#22557. I'm not sure it is > related to what you see here, but IMO until that bug is resolved, > there's no sense in trying to analyze what happens with notifications > on MS-Windows. > Ok, I have seen that. Maybe I'll try to comment out the part of the patch you have pointed out in this bug report and see how it changes the behavior. Fabrice --001a1140990e56a257052aff8d2e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


2016-02-04 19:47 GMT+01:00 Eli Zaretskii <eliz@gnu.org>:
=
> From: Fabrice Popineau <fabrice.popineau@gmail.com>
> Date: Thu, 4 Feb 2016 10:49:42 +0100
> Cc: Eli Zaretskii <eliz@gnu.org= >, 22534@debbugs.gnu.org >
> - notifications returned are not the same whether you run the tests in= batch mode or interactive mode.
> In interactive mode, there is a deleted notification which is sent whe= n your remove the directory being
> watched.
> This event is not seen when running in batch mode (make check). I wond= er what could make a difference.

Support for file notifications in batch mode is fragile: w32notify normally works by sending a message to the main thread whenever it has
a notification to report.=C2=A0 But in batch mode, the main thread doesn= 9;t
read Windows messages, so whether an event gets reported depends on
whether 'pselect' is called, which depends on what API is called to=
wait for notifications and read them.


Ok. Maybe that= 's the reason, but in this case, the expected events have to be adjuste= d because 'make check'
runs in batch mode.
=C2= =A0
> - in the test file-notify-test06-many-events to check that events
> are not dropped : I have to lower the 1000 number.=C2=A0 The test fail= s
> as soon as I go higher than around 260. Is there some limit here ?

Is this in interactive or a batch-mode run?

In interactive mode. The limi= t is somewhere between 260 and 280.
=C2=A0
= > Once the limit is reached, only=C2=A0 the first notification is return= ed.

What do you mean by "the first notification"?=C2=A0 AFAIU,= the 1000 events
are generated as 500 pairs of renames, so what is "the first" her= e,
after 260 were already generated?


The notificati= on for the first pair in the list, the one numbered 999 is the only one
appearing in file-notify--test-events.
=C2=A0
> Overall, I don't think anymore that the patch by Michael has broke= n w32 file notifications
> but rather that the new tests have highlighted some potential problems= with it.

I've just found a serious problem, see bug#22557.=C2=A0 I'm = not sure it is
related to what you see here, but IMO until that bug is resolved,
there's no sense in trying to analyze what happens with notifications on MS-Windows.

Ok, I have seen tha= t. Maybe I'll try to comment out the part of the patch you have pointed= out in this bug report
and see how it chan= ges the behavior.

Fabrice
--001a1140990e56a257052aff8d2e--