native-platform icon indicating copy to clipboard operation
native-platform copied to clipboard

Fix `watch_all_parents: error trying to add kqueue for fd` warnings

Open wolfs opened this issue 5 years ago • 15 comments

When running the test task on master (ca15a6581ba2e91ef72510032604a653c783c2f6), the following output occurs:

2020-02-26 08:46 java[94718] (FSEvents.framework) process_dir_events: watch_all_parents: error trying to add kqueue for fd 52 (/private/var/folders/y8/lns4s7jn3jldwky0nm3dmx9m0000gn/T; Bad file descriptor)
2020-02-26 08:46 java[94718] (FSEvents.framework) process_dir_events: watch_all_parents: error trying to add kqueue for fd 47 (/private/var/folders/y8/lns4s7jn3jldwky0nm3dmx9m0000gn; Bad file descriptor)
2020-02-26 08:46 java[94718] (FSEvents.framework) process_dir_events: watch_all_parents: error trying to add kqueue for fd 51 (/private/var/folders/y8; Bad file descriptor)
2020-02-26 08:46 java[94718] (FSEvents.framework) process_dir_events: watch_all_parents: error trying to add kqueue for fd 53 (/private/var/folders; Bad file descriptor)
2020-02-26 08:46 java[94718] (FSEvents.framework) process_dir_events: watch_all_parents: error trying to add kqueue for fd 54 (/private/var; Bad file descriptor)
2020-02-26 08:46 java[94718] (FSEvents.framework) process_dir_events: watch_all_parents: error trying to add kqueue for fd 55 (/private; Bad file descriptor)
2020-02-26 08:46 java[94718] (FSEvents.framework) process_dir_events: watch_all_parents: error trying to add kqueue for fd 54 (/private/var/folders; Bad file descriptor)
2020-02-26 08:46 java[94718] (FSEvents.framework) process_dir_events: watch_all_parents: error trying to add kqueue for fd 47 (/private/var; Bad file descriptor)
2020-02-26 08:46 java[94718] (FSEvents.framework) process_dir_events: watch_all_parents: error trying to add kqueue for fd 52 (/private; Bad file descriptor)

We should understand what is going on there.

See https://e.grdev.net/s/6ma7wj7x5i2bu/console-log?anchor=72.

wolfs avatar Feb 26 '20 07:02 wolfs

FTR, I can't reproduce this locally on macOS Catalina, and Google hasn't turned up anything relevant with a quick search.

lptr avatar Feb 26 '20 10:02 lptr

This seems to happen only for this test: can detect #removedAncestry removed

It doesn't seem to happen if I only run one of the elements of the where clause - I seem to need to run at least two of them.

wolfs avatar Feb 27 '20 12:02 wolfs

Note that the log does not appear as part of the test output, but on the console as build output.

wolfs avatar Feb 28 '20 09:02 wolfs

Can you still reproduce this?

lptr avatar Mar 04 '20 07:03 lptr

With latest master, the problem seems to be gone.

wolfs avatar Mar 04 '20 08:03 wolfs

The issue seem to happen to me again. Re-opening.

wolfs avatar May 25 '20 09:05 wolfs

We should check if the error happens on our macOS agents. The message seems to end up in the build scan log for the fileWatching:integTest task.

wolfs avatar Jun 08 '20 13:06 wolfs

Maybe this is worth looking at: https://lists.apple.com/archives/filesystem-dev/2010/May/msg00007.html

lptr avatar Jul 15 '20 11:07 lptr

We don't have proof currently that this happens anywhere else but on @wolfs's machine. I see two ways to move forward:

  1. try harder to look for the same problem on other machines (like, search for the message in daemon logs on CI etc.),
  2. try to figure out what's special about Stefan's machine; one idea there is that there's some issue with the file system, so running fsck or first aid in Disk Utility could provide some interesting input.

FTR, we actually tried running first aid yesterday, but during or after the check the computer crashed. This might be an indication that there's indeed a problem with the file system, or it might be a red herring.

lptr avatar Jul 16 '20 09:07 lptr

@wolfs ran the first aid again, this time it was successful. The error messages keep popping up, though.

He will try to upgrade to Catalina to see if it makes the problems go away.

lptr avatar Jul 21 '20 13:07 lptr

Let's ask the community on Slack if they get the same message!

lptr avatar Jul 22 '20 07:07 lptr

@wolfs just checking: you still see these, right?

lptr avatar Aug 06 '20 16:08 lptr

Yeah, I didn't do the update to Catalina, yet.

wolfs avatar Aug 06 '20 16:08 wolfs

Any plans for that?

lptr avatar Aug 06 '20 16:08 lptr

Yep, still on my list of things to do.

wolfs avatar Aug 06 '20 16:08 wolfs