Open
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.fsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.libuvIssues and PRs related to the libuv dependency or the uv binding.Issues and PRs related to the libuv dependency or the uv binding.linuxIssues and PRs related to the Linux platform.Issues and PRs related to the Linux platform.
Description
I suspect possible regression. Not sure what version but must have been recent:
await stream.promises.pipeline(src, fs.createWriteStream(dstPath))Will not create a full sized file. I suspect that since createWriteStream doesn't explicitly set position during writes it expects the file handle position to be properly updated, which does not seem to be the case with URING.
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.fsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.libuvIssues and PRs related to the libuv dependency or the uv binding.Issues and PRs related to the libuv dependency or the uv binding.linuxIssues and PRs related to the Linux platform.Issues and PRs related to the Linux platform.
Activity
santigimeno commentedon Sep 25, 2024
Yes, ordering in the handling of requests sent to the ring is not guaranteed. So you're right, the offset should be properly set when calling
uv_fs_write().ronag commentedon Sep 25, 2024
I think we should throw in
fs.writeifpositionis not provided whileUV_USE_IO_URINGis enabled. Do we have any other such instances?net?ronag commentedon Sep 25, 2024
@nodejs/tsc I think this is so bad that we should just remove
UV_USE_IO_URINGuntil we figure out a way to fix it.santigimeno commentedon Sep 25, 2024
This should not be an issue once
v1.49.0, which was just released, is used as it disables theSQPOLLring by default.mcollina commentedon Sep 25, 2024
Didn't we disable UV_USE_IO_URING by default everywhere?
ronag commentedon Sep 25, 2024
Yes, referring to a security issue. But some users like us enable it without knowing that here be dragons.
santigimeno commentedon Sep 25, 2024
@ronag wait, I'm not familiar with the internals of the streams. Can those
uv_fs_write()ops happen in parallel or sequentially? If the latter, I think it should work.ronag commentedon Sep 25, 2024
They are sequential.
santigimeno commentedon Sep 25, 2024
Ok, can you share a reproducer?
juanarbol commentedon Nov 10, 2024
ping @ronag, I would like to help on this one.