-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Race condition with libuv fs poll #1082
Comments
The ext4 root partition on Flatcar is formatted with 128-byte inode size, which means filesystem timestamps have a granularity of "seconds" (not nanoseconds). If you move your container storage to a different disk/filesystem, or reformat the root partition you won't hit this. Try the following butane snippet: variant: flatcar
version: 1.0.0
storage:
filesystems:
- device: /dev/disk/by-partlabel/ROOT
label: ROOT
format: ext4
wipe_filesystem: true |
can confirm that this fixes the issue. @jepio is this something that is likely to be changed upstream. So that the root partition is formatted with the default size as it was before that commit: flatcar/scripts@d09aeb3 |
Yes, we should change that, thanks to both of you!
|
Inode sizes smaller than 256: - don't support extended metadata (nanosecond timestamp resolution) - cannot handle dates beyond 2038 - are deprecated Change the default from 128 to 256. There is no way to apply this change on a mounted filesystem so this change will only apply to new deployments. Fixes: flatcar/Flatcar#1082 Signed-off-by: Jeremi Piotrowski <[email protected]>
Inode sizes smaller than 256: - don't support extended metadata (nanosecond timestamp resolution) - cannot handle dates beyond 2038 - are deprecated Change the default from 128 to 256. There is no way to apply this change on a mounted filesystem so this change will only apply to new deployments. Fixes: flatcar/Flatcar#1082 Signed-off-by: Jeremi Piotrowski <[email protected]>
Inode sizes smaller than 256: - don't support extended metadata (nanosecond timestamp resolution) - cannot handle dates beyond 2038 - are deprecated Change the default from 128 to 256. There is no way to apply this change on a mounted filesystem so this change will only apply to new deployments. Fixes: flatcar/Flatcar#1082 Signed-off-by: Jeremi Piotrowski <[email protected]>
Inode sizes smaller than 256: - don't support extended metadata (nanosecond timestamp resolution) - cannot handle dates beyond 2038 - are deprecated Change the default from 128 to 256. There is no way to apply this change on a mounted filesystem so this change will only apply to new deployments. Fixes: flatcar/Flatcar#1082 Signed-off-by: Jeremi Piotrowski <[email protected]>
Inode sizes smaller than 256: - don't support extended metadata (nanosecond timestamp resolution) - cannot handle dates beyond 2038 - are deprecated Change the default from 128 to 256. There is no way to apply this change on a mounted filesystem so this change will only apply to new deployments. Fixes: flatcar/Flatcar#1082 Signed-off-by: Jeremi Piotrowski <[email protected]>
Fix merged and cherry-picked to all branches. This won't apply to running systems though. |
Description
We discovered a race condition when trying to poll fs events using uv_fs_poll_start.
The race condition happens when the fs poll watch is started for a newly created directory and directly afterwards a file is written to that directory. That file does most of the times not get recognized by the file watch.
If we add a sleep of approx. 1s between the watch start and file creation, the file gets recognized.
We first encountered this issue while debugging a failing test in nodejs:
Bug occurs on the following systems and cloudproviders:
The bug does not occur on:
Impact
Environment and steps to reproduce
sudo docker run -it --entrypoint bash --rm ubuntu:20.04
gcc main.c -o main -luv
mkdir /tmp/debug-test
rm /tmp/dir/* && ./main
multiple times -> the poll does not notice the file.Expected behavior
The written file should always be reported by the poll as it does on other distros.
The text was updated successfully, but these errors were encountered: