all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Fabrice Popineau <fabrice.popineau@gmail.com>
Cc: 22534@debbugs.gnu.org, michael.albinus@gmx.de
Subject: bug#22534: File notify broken on Windows
Date: Fri, 05 Feb 2016 12:10:19 +0200	[thread overview]
Message-ID: <83fux7v56c.fsf@gnu.org> (raw)
In-Reply-To: <CAFgFV9Njq41OPHJE17xCDMQS_1Qmoq3VuHZu83RLo53WSJSAfQ@mail.gmail.com> (message from Fabrice Popineau on Fri, 5 Feb 2016 06:59:00 +0100)

> From: Fabrice Popineau <fabrice.popineau@gmail.com>
> Date: Fri, 5 Feb 2016 06:59:00 +0100
> Cc: Michael Albinus <michael.albinus@gmx.de>, 22534@debbugs.gnu.org
> 
>  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.

True.  I have done that several times to fix that test; maybe it's
time to do that again.

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

So you are saying that as soon as the value of n is greater than some
threshold, like 260, the test reports only the first pair of renames,
is that true?

If so, did you try to insert waits in-between the series or renames?
Or maybe the preceding series of file creations is the culprit, and we
should give Emacs more time to report them?
Because right now, it just fires up all of them in a single quick
series.

Hmm... actually, I might see a problem.  If my reading of the test is
correct, it first creates 2000 files, and then issues 1000 renames,
which on Windows generate 2000 notifications.  Together, these add up
to 4000, which is awfully close to the 4096 size of the Emacs input
event queue.  So maybe the test fills up the event queue, and the
synchronization between the w32notify thread and the main thread stops
working at that point?  Or maybe we are hitting on some limit of
Windows messages that can be enqueued?

(To tell the truth, I'm not sure what is the purpose of that test:
AFAIK, none of the available notification back-ends ever promised not
to lose events, so what are we testing here?  Perhaps Michael can
explain.)

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

If you have time, yes, please.

Btw, are you doing this on master or on emacs-25?  The files involved
seem to be identical for now, but they might diverge in the future.

Thanks.





  reply	other threads:[~2016-02-05 10:10 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02  6:23 bug#22534: File notify broken on Windows Fabrice Popineau
2016-02-02 16:15 ` Eli Zaretskii
2016-02-02 23:36   ` Fabrice Popineau
2016-02-03  8:07     ` Michael Albinus
2016-02-03 12:15       ` Fabrice Popineau
2016-02-04  9:49         ` Fabrice Popineau
2016-02-04 18:47           ` Eli Zaretskii
2016-02-05  5:59             ` Fabrice Popineau
2016-02-05 10:10               ` Eli Zaretskii [this message]
2016-02-05 15:34                 ` Fabrice Popineau
2016-02-05 17:18                   ` Michael Albinus
2016-02-05 19:43                     ` Eli Zaretskii
2016-02-05 21:58                       ` Michael Albinus
2016-02-06 16:53                       ` Eli Zaretskii
2016-02-06 19:24                         ` Michael Albinus
2016-02-06 19:55                           ` Eli Zaretskii
2016-02-07 13:37                             ` Fabrice Popineau
2016-02-07 17:46                               ` Eli Zaretskii
2016-02-07 18:37                                 ` Michael Albinus
2016-02-07 19:34                                 ` Fabrice Popineau
2016-02-08 10:27                                   ` Michael Albinus
2016-02-08 10:43                                     ` Fabrice Popineau
2016-02-08 18:09                                       ` Eli Zaretskii
2016-02-08 19:14                                         ` Michael Albinus
2016-02-08 19:36                                           ` Eli Zaretskii
2016-02-08 20:00                                             ` Michael Albinus
2016-02-08 20:18                                               ` Eli Zaretskii
2016-02-08 20:51                                                 ` Michael Albinus
2016-02-08 21:03                                                   ` Eli Zaretskii
2016-02-08 21:13                                                     ` Michael Albinus
2016-02-09  3:35                                                       ` Eli Zaretskii
2016-02-09  8:13                                                         ` Michael Albinus
2016-02-09 10:08                                                           ` Michael Albinus
2016-02-09 17:09                                                             ` Eli Zaretskii
2016-02-09 18:47                                                               ` Michael Albinus
2016-02-10 11:25                                                                 ` Michael Albinus
2016-02-08 19:15                                         ` Fabrice Popineau
2016-02-10 19:15                                           ` Eli Zaretskii
2016-02-11 15:19                                             ` Fabrice Popineau
2016-02-12  8:38                                               ` Eli Zaretskii
2016-02-15 15:31                                             ` Michael Albinus
2016-02-15 15:59                                               ` Eli Zaretskii
2016-02-15 17:52                                                 ` Michael Albinus
2016-02-15 19:46                                                   ` Fabrice Popineau
2016-02-08 10:21                               ` Michael Albinus
2016-02-08 10:40                                 ` Fabrice Popineau
2016-02-08 14:33                                   ` Fabrice Popineau
2016-02-05 19:31                   ` Eli Zaretskii
2016-02-05 17:23                 ` Michael Albinus
     [not found] ` <CAFgFV9P2D6-dcuHnZ2VQ6F2sW85Aj3AZWL85RJxai-LyuE87xw@mail.gmail.com>
     [not found]   ` <CAFgFV9MghLviOcmwmDmasZNmkDjZfoBSuwFOoSHXQNtxxkg9mA@mail.gmail.com>
     [not found]     ` <83egcbun0o.fsf@gnu.org>
     [not found]       ` <CAFgFV9Og72xHW5O9JE8og=7NrTgeMvx01bg_HBOYzduH1vjLfQ@mail.gmail.com>
     [not found]         ` <8360xnukzx.fsf@gnu.org>
     [not found]           ` <CAFgFV9N-+bZf-bBXFaDNsv3dvFQjJbpggPMJrcZ30M-HSaZDwg@mail.gmail.com>
     [not found]             ` <83a8mvprbg.fsf@gnu.org>
     [not found]               ` <CAFgFV9Patgn1GJrDkSeMKsS4cewdQRp4F8VYoftybTQ5TmfPAg@mail.gmail.com>
     [not found]                 ` <83oabbnxvs.fsf@gnu.org>
     [not found]                   ` <CAFgFV9N55HuPkF+mVx6Eh9szUUxhu+BkF-2KJ7nx46-3wsph5Q@mail.gmail.com>
     [not found]                     ` <83io1glmkg.fsf@gnu.org>
     [not found]                       ` <CAFgFV9PxijF1Q3WPo1Ebfqe4cJQVYyiu4bOm41QV4L_OvYZ35w@mail.gmail.com>
     [not found]                         ` <87y4abtwhq.fsf@gmx.de>
     [not found]                           ` <8337sjjsql.fsf@gnu.org>
     [not found]                             ` <CAFgFV9MkwdPHxf_6VqYZdBt8vXwbBUxcOivkCyZWYTvi0H24XQ@mail.gmail.com>
     [not found]                               ` <87ziuc3gay.fsf@gmx.de>
     [not found]                                 ` <83twkkwxdi.fsf@gnu.org>
     [not found]                                   ` <CAFgFV9MdwHK8OG69Dpw6wPj6FK9Fi5c3vQ_jFZaz1BfgGLBLbw@mail.gmail.com>
     [not found]                                     ` <83mvqcwa2v.fsf@gnu.org>
     [not found]                                       ` <CAFgFV9NTSw1LKn_CzrKxNmZvRMbqrctSEer_8oaniH+Lti=n6g@mail.gmail.com>
2016-03-08  7:44                                         ` Michael Albinus
     [not found]                                         ` <83r3fil7z3.fsf@gnu.org>
     [not found]                                           ` <CAFgFV9Pkmz0E7h4mfCLCcxmt29dbDNfAOOp=mbPKnCpPt1B3LQ@mail.gmail.com>
     [not found]                                             ` <83bn6ljbku.fsf@gnu.org>
     [not found]                                               ` <CAFgFV9PnLRZ=2-C4S9jSMpmDUxijCUQQnu-YnAv2-ifm+6kZBA@mail.gmail.com>
     [not found]                                                 ` <83fuvm8wjx.fsf@gnu.org>
2016-03-19 14:51                                                   ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83fux7v56c.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=22534@debbugs.gnu.org \
    --cc=fabrice.popineau@gmail.com \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.