GNU bug report logs - #22534
File notify broken on Windows

Previous Next

Package: emacs;

Reported by: Fabrice Popineau <fabrice.popineau <at> gmail.com>

Date: Tue, 2 Feb 2016 06:25:02 UTC

Severity: normal

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 22534 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Fabrice Popineau <fabrice.popineau <at> gmail.com>
Cc: 22534 <at> debbugs.gnu.org, michael.albinus <at> gmx.de
Subject: Re: bug#22534: File notify broken on Windows
Date: Thu, 04 Feb 2016 20:47:02 +0200
> From: Fabrice Popineau <fabrice.popineau <at> gmail.com>
> Date: Thu, 4 Feb 2016 10:49:42 +0100
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 22534 <at> 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.

> - 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?

> 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?

> 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.




This bug report was last modified 9 years and 62 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.