GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — zos: fix fs event not fired if the watched file is moved/removed/recreated by zsw007 · Pull Request #3540 · libuv/libuv

Conversation

@zsw007

@zsw007 zsw007 commented Mar 10, 2022

Copy link
Copy Markdown
Contributor

This PR resolves a bug on z/OS where fs events are not fired when a watched file is moved/removed/recreated. One example of this bug occurring is by editing a file with vim with the backupcopy=no or backupcopy=auto setting.

The following changes are made to resolve this bug:

  • Register _RFIM_UNLINK as UV_RENAME.
  • An undocumented __rfim_event 156 will occur when the watched file is moved or removed, or an editor (e.g. vim) renames then creates the file. This is event technically should not happen based on documentations, but we'll also register it as UV_RENAME for now since it is functionally equivalent.
  • On z/OS a file is implicitly unregistered when the change notification is sent, and only one notification is sent per registration. So we also need to re-register interest in a file after each change notification we receive.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@richardlau

richardlau commented Mar 10, 2022

Copy link
Copy Markdown
Member

CI: https://ci.nodejs.org/job/libuv-test-commit/2237/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@richardlau richardlau added the zos label Mar 10, 2022
vtjnash
vtjnash reviewed Mar 21, 2022
View reviewed changes
Comment thread src/unix/os390.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

vtjnash
vtjnash reviewed Mar 21, 2022
View reviewed changes
Comment thread src/unix/os390.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@zsw007
zsw007 force-pushed the v1.x.zos-watch_file_rename branch from b17f200 to 7548656 Compare March 28, 2022 18:22
@zsw007
zsw007 requested a review from vtjnash March 28, 2022 18:30
vtjnash
vtjnash reviewed Mar 28, 2022
View reviewed changes
Comment thread src/unix/os390.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/unix/os390.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

zsw007 and others added 3 commits March 30, 2022 20:27
@zsw007 @gabylb
uv: re-register interest in a file after change
16cc1ee
The file is implicitly unregistered when the change notification is
sent, only one notification is sent per registration. So we need to
re-register interest in a file after each change notification we
receive.

Co-authored-by: Gaby Baghdadi <[email protected]>
@zsw007 @IgorTodorovskiIBM
uv: register UV_RENAME event for _RFIM_UNLINK
50f4dee
`rename()` can be used to rename a file path via _RFIM_UNLINK. So
register it as a UV_RENAME event.

Co-authored-by: Igor Todorovski <[email protected]>
@zsw007 @gabylb
uv: register __rfim_event 156 as UV_RENAME
ce0b5a2
When the watched file is moved or removed, or an editor (e.g. vim)
renames then creates the file, the __rfim_event 156 occurs. This is an
undocumented event that should not happen, but register it as UV_RENAME
for now since it is functionally equivalent.

Co-authored-by: Gaby Baghdadi <[email protected]>
@zsw007
zsw007 force-pushed the v1.x.zos-watch_file_rename branch from 7548656 to ce0b5a2 Compare March 31, 2022 18:11
@zsw007
zsw007 requested a review from vtjnash March 31, 2022 18:31
vtjnash
vtjnash approved these changes Mar 31, 2022
View reviewed changes
vtjnash pushed a commit that referenced this pull request Apr 11, 2022
@zsw007 @gabylb @vtjnash
uv: re-register interest in a file after change (#3540 1/3)
07c4cac
The file is implicitly unregistered when the change notification is
sent, only one notification is sent per registration. So we need to
re-register interest in a file after each change notification we
receive.

Co-authored-by: Gaby Baghdadi <[email protected]>
vtjnash pushed a commit that referenced this pull request Apr 11, 2022
@zsw007 @IgorTodorovskiIBM @vtjnash
uv: register UV_RENAME event for _RFIM_UNLINK (#3540 2/3)
571f898
`rename()` can be used to rename a file path via _RFIM_UNLINK. So
register it as a UV_RENAME event.

Co-authored-by: Igor Todorovski <[email protected]>
vtjnash pushed a commit that referenced this pull request Apr 11, 2022
@zsw007 @gabylb @vtjnash
uv: register __rfim_event 156 as UV_RENAME (#3540 3/3)
6d9275e
When the watched file is moved or removed, or an editor (e.g. vim)
renames then creates the file, the __rfim_event 156 occurs. This is an
undocumented event that should not happen, but register it as UV_RENAME
for now since it is functionally equivalent.

Co-authored-by: Gaby Baghdadi <[email protected]>
vtjnash added a commit to libuv/libuv-release-tool that referenced this pull request Apr 11, 2022
@vtjnash
support patch-series format in PR titles
3108004
Since we don't support merge commits, it is helpful in rare cases to be
able to land a sequence of patches as a series. This requires manual
intervention to format the commit message, as can be seen in
libuv/libuv#3540.

    uv: register UV_RENAME event for _RFIM_UNLINK (#3540 2/3)
@vtjnash vtjnash mentioned this pull request Apr 11, 2022
support patch-series format in PR titles libuv/libuv-release-tool#17
Merged
@vtjnash

vtjnash commented Apr 11, 2022

Copy link
Copy Markdown
Member

I have these queued up locally to land, but waiting for libuv/libuv-release-tool#17 to merge to be able to handle them in the release script.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vtjnash vtjnash mentioned this pull request Apr 11, 2022
Release proposal: v1.44.2 #3586
Closed
11 tasks done
vtjnash added a commit to libuv/libuv-release-tool that referenced this pull request Apr 14, 2022
@vtjnash
support patch-series format in PR titles (#17)
f6f2c87
Since we don't support merge commits, it is helpful in rare cases to be
able to land a sequence of patches as a series. This requires manual
intervention to format the commit message, as can be seen in
libuv/libuv#3540.

    uv: register UV_RENAME event for _RFIM_UNLINK (#3540 2/3)
@vtjnash

vtjnash commented Apr 14, 2022

Copy link
Copy Markdown
Member

landed as patch series
07c4cac
571f898
6d9275e

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vtjnash vtjnash closed this Apr 14, 2022
JeffroMF pushed a commit to JeffroMF/libuv that referenced this pull request May 16, 2022
@zsw007 @gabylb @JeffroMF
uv: re-register interest in a file after change (libuv#3540 1/3)
171ff85
The file is implicitly unregistered when the change notification is
sent, only one notification is sent per registration. So we need to
re-register interest in a file after each change notification we
receive.

Co-authored-by: Gaby Baghdadi <[email protected]>
JeffroMF pushed a commit to JeffroMF/libuv that referenced this pull request May 16, 2022
@zsw007 @IgorTodorovskiIBM @JeffroMF
uv: register UV_RENAME event for _RFIM_UNLINK (libuv#3540 2/3)
0715ad8
`rename()` can be used to rename a file path via _RFIM_UNLINK. So
register it as a UV_RENAME event.

Co-authored-by: Igor Todorovski <[email protected]>
JeffroMF pushed a commit to JeffroMF/libuv that referenced this pull request May 16, 2022
@zsw007 @gabylb @JeffroMF
uv: register __rfim_event 156 as UV_RENAME (libuv#3540 3/3)
658c33d
When the watched file is moved or removed, or an editor (e.g. vim)
renames then creates the file, the __rfim_event 156 occurs. This is an
undocumented event that should not happen, but register it as UV_RENAME
for now since it is functionally equivalent.

Co-authored-by: Gaby Baghdadi <[email protected]>
@lpinca lpinca mentioned this pull request Jul 12, 2022
deps: upgrade to libuv 1.44.2 nodejs/node#42340
Closed
lpinca added a commit to lpinca/node that referenced this pull request Jul 23, 2022
@lpinca
deps: upgrade to libuv 1.44.2
f7c2306
Notable changes:

- Build regression fixes for various platform updates
  (libuv/libuv#3428,
  libuv/libuv#3419,
  libuv/libuv#3423,
  libuv/libuv#3413,
  libuv/libuv#3431)
- Support for GNU/Hurd (libuv/libuv#3450)
- Release tool improvements
  (libuv/libuv-release-tool#13)
- Better performing rw locks on Win32 (libuv/libuv#3383)
- Support for posix_spawn API (libuv/libuv#3257)
- Fix regression on OpenBSD (libuv/libuv#3506)
- Add uv_available_parallelism() (libuv/libuv#3499)
- Don't use thread-unsafe strtok() (libuv/libuv#3524)
- Fix hang after NOTE_EXIT (libuv/libuv#3521)
- Better align order-of-events behavior between platforms
  (libuv/libuv#3598)
- Fix fs event not fired if the watched file is moved/removed/recreated
  (libuv/libuv#3540)
- Fix pipe resource leak if closed during connect (and other bugs)
  (libuv/libuv#3611)
- Don't error when killing a zombie process
  (libuv/libuv#3625)
- Avoid posix_spawnp() cwd bug (libuv/libuv#3597)
- Skip EVFILT_PROC events when invalidating events for an fd
  (libuv/libuv#3629)

Fixes: nodejs#42290
lpinca added a commit to lpinca/node that referenced this pull request Nov 5, 2022
@lpinca
deps: upgrade to libuv 1.44.2
55d74ae
Notable changes:

- Build regression fixes for various platform updates
  (libuv/libuv#3428,
  libuv/libuv#3419,
  libuv/libuv#3423,
  libuv/libuv#3413,
  libuv/libuv#3431)
- Support for GNU/Hurd (libuv/libuv#3450)
- Release tool improvements
  (libuv/libuv-release-tool#13)
- Better performing rw locks on Win32 (libuv/libuv#3383)
- Support for posix_spawn API (libuv/libuv#3257)
- Fix regression on OpenBSD (libuv/libuv#3506)
- Add uv_available_parallelism() (libuv/libuv#3499)
- Don't use thread-unsafe strtok() (libuv/libuv#3524)
- Fix hang after NOTE_EXIT (libuv/libuv#3521)
- Better align order-of-events behavior between platforms
  (libuv/libuv#3598)
- Fix fs event not fired if the watched file is moved/removed/recreated
  (libuv/libuv#3540)
- Fix pipe resource leak if closed during connect (and other bugs)
  (libuv/libuv#3611)
- Don't error when killing a zombie process
  (libuv/libuv#3625)
- Avoid posix_spawnp() cwd bug (libuv/libuv#3597)
- Skip EVFILT_PROC events when invalidating events for an fd
  (libuv/libuv#3629)

Fixes: nodejs#42290
lpinca added a commit to nodejs/node that referenced this pull request Nov 5, 2022
@lpinca
deps: upgrade to libuv 1.44.2
28bf031
Notable changes:

- Build regression fixes for various platform updates
  (libuv/libuv#3428,
  libuv/libuv#3419,
  libuv/libuv#3423,
  libuv/libuv#3413,
  libuv/libuv#3431)
- Support for GNU/Hurd (libuv/libuv#3450)
- Release tool improvements
  (libuv/libuv-release-tool#13)
- Better performing rw locks on Win32 (libuv/libuv#3383)
- Support for posix_spawn API (libuv/libuv#3257)
- Fix regression on OpenBSD (libuv/libuv#3506)
- Add uv_available_parallelism() (libuv/libuv#3499)
- Don't use thread-unsafe strtok() (libuv/libuv#3524)
- Fix hang after NOTE_EXIT (libuv/libuv#3521)
- Better align order-of-events behavior between platforms
  (libuv/libuv#3598)
- Fix fs event not fired if the watched file is moved/removed/recreated
  (libuv/libuv#3540)
- Fix pipe resource leak if closed during connect (and other bugs)
  (libuv/libuv#3611)
- Don't error when killing a zombie process
  (libuv/libuv#3625)
- Avoid posix_spawnp() cwd bug (libuv/libuv#3597)
- Skip EVFILT_PROC events when invalidating events for an fd
  (libuv/libuv#3629)

Fixes: #42290
PR-URL: #42340
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
RafaelGSS pushed a commit to nodejs/node that referenced this pull request Nov 10, 2022
@lpinca @RafaelGSS
deps: upgrade to libuv 1.44.2
bfe3819
Notable changes:

- Build regression fixes for various platform updates
  (libuv/libuv#3428,
  libuv/libuv#3419,
  libuv/libuv#3423,
  libuv/libuv#3413,
  libuv/libuv#3431)
- Support for GNU/Hurd (libuv/libuv#3450)
- Release tool improvements
  (libuv/libuv-release-tool#13)
- Better performing rw locks on Win32 (libuv/libuv#3383)
- Support for posix_spawn API (libuv/libuv#3257)
- Fix regression on OpenBSD (libuv/libuv#3506)
- Add uv_available_parallelism() (libuv/libuv#3499)
- Don't use thread-unsafe strtok() (libuv/libuv#3524)
- Fix hang after NOTE_EXIT (libuv/libuv#3521)
- Better align order-of-events behavior between platforms
  (libuv/libuv#3598)
- Fix fs event not fired if the watched file is moved/removed/recreated
  (libuv/libuv#3540)
- Fix pipe resource leak if closed during connect (and other bugs)
  (libuv/libuv#3611)
- Don't error when killing a zombie process
  (libuv/libuv#3625)
- Avoid posix_spawnp() cwd bug (libuv/libuv#3597)
- Skip EVFILT_PROC events when invalidating events for an fd
  (libuv/libuv#3629)

Fixes: #42290
PR-URL: #42340
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
danielleadams pushed a commit to nodejs/node that referenced this pull request Dec 30, 2022
@lpinca @danielleadams
deps: upgrade to libuv 1.44.2
c258a54
Notable changes:

- Build regression fixes for various platform updates
  (libuv/libuv#3428,
  libuv/libuv#3419,
  libuv/libuv#3423,
  libuv/libuv#3413,
  libuv/libuv#3431)
- Support for GNU/Hurd (libuv/libuv#3450)
- Release tool improvements
  (libuv/libuv-release-tool#13)
- Better performing rw locks on Win32 (libuv/libuv#3383)
- Support for posix_spawn API (libuv/libuv#3257)
- Fix regression on OpenBSD (libuv/libuv#3506)
- Add uv_available_parallelism() (libuv/libuv#3499)
- Don't use thread-unsafe strtok() (libuv/libuv#3524)
- Fix hang after NOTE_EXIT (libuv/libuv#3521)
- Better align order-of-events behavior between platforms
  (libuv/libuv#3598)
- Fix fs event not fired if the watched file is moved/removed/recreated
  (libuv/libuv#3540)
- Fix pipe resource leak if closed during connect (and other bugs)
  (libuv/libuv#3611)
- Don't error when killing a zombie process
  (libuv/libuv#3625)
- Avoid posix_spawnp() cwd bug (libuv/libuv#3597)
- Skip EVFILT_PROC events when invalidating events for an fd
  (libuv/libuv#3629)

Fixes: #42290
PR-URL: #42340
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
danielleadams pushed a commit to nodejs/node that referenced this pull request Jan 3, 2023
@lpinca @danielleadams
deps: upgrade to libuv 1.44.2
c9c958e
Notable changes:

- Build regression fixes for various platform updates
  (libuv/libuv#3428,
  libuv/libuv#3419,
  libuv/libuv#3423,
  libuv/libuv#3413,
  libuv/libuv#3431)
- Support for GNU/Hurd (libuv/libuv#3450)
- Release tool improvements
  (libuv/libuv-release-tool#13)
- Better performing rw locks on Win32 (libuv/libuv#3383)
- Support for posix_spawn API (libuv/libuv#3257)
- Fix regression on OpenBSD (libuv/libuv#3506)
- Add uv_available_parallelism() (libuv/libuv#3499)
- Don't use thread-unsafe strtok() (libuv/libuv#3524)
- Fix hang after NOTE_EXIT (libuv/libuv#3521)
- Better align order-of-events behavior between platforms
  (libuv/libuv#3598)
- Fix fs event not fired if the watched file is moved/removed/recreated
  (libuv/libuv#3540)
- Fix pipe resource leak if closed during connect (and other bugs)
  (libuv/libuv#3611)
- Don't error when killing a zombie process
  (libuv/libuv#3625)
- Avoid posix_spawnp() cwd bug (libuv/libuv#3597)
- Skip EVFILT_PROC events when invalidating events for an fd
  (libuv/libuv#3629)

Fixes: #42290
PR-URL: #42340
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vtjnash vtjnash vtjnash approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

zos

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@zsw007 @richardlau @vtjnash
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.