Skip to content
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

lib: disallow file-backed blob cloning #47574

Closed
wants to merge 1 commit into from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Apr 15, 2023

Disallow cloning of file-backed Blobs. If necessary, we can enable this later but for now we disable it. The reason is because the underlying FdEntry ends up bound to the Environment/Realm under which is was created and transfering across worker threads ends up failing.

Fixes: #47334

Disallow cloning of file-backed Blobs. If necessary, we can enable
this later but for now we disable it. The reason is because the
underlying FdEntry ends up bound to the Environment/Realm under
which is was created and transfering across worker threads ends up
failing.

Fixes: nodejs#47334
@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Apr 15, 2023
@nodejs-github-bot

This comment was marked as outdated.

@jasnell jasnell added the lib / src Issues and PRs related to general changes in the lib or src directory. label Apr 15, 2023
@jimmywarting
Copy link

Fixes: #47334

Hmm, it dose not really fix the issue, would just say that it is more "related" to it...

it sure would be nice if they could be transfered too... what would it really take to solve this? Somehow making FdEntry transferable too? or fstat the fd and figuring out the real path to the file. then instead transfer the path and create a new FdEntry in the new thread? and essentially calling createBlobFromFilePath on the other thread?

@jasnell
Copy link
Member Author

jasnell commented Apr 16, 2023

It fixes the crash, which is the important bit. I would recommend opening an issue to track actually making file-backed blobs transferable.

@debadree25
Copy link
Member

I think we could update it refs instead of fixes and make the original issue into a feature request then?

@debadree25 debadree25 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Apr 18, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 18, 2023
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

@jasnell
Copy link
Member Author

jasnell commented Apr 22, 2023

Landed in 595b2b3

@jasnell jasnell closed this Apr 22, 2023
jasnell added a commit that referenced this pull request Apr 22, 2023
Disallow cloning of file-backed Blobs. If necessary, we can enable
this later but for now we disable it. The reason is because the
underlying FdEntry ends up bound to the Environment/Realm under
which is was created and transfering across worker threads ends up
failing.

Fixes: #47334
PR-URL: #47574
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
targos pushed a commit that referenced this pull request May 2, 2023
Disallow cloning of file-backed Blobs. If necessary, we can enable
this later but for now we disable it. The reason is because the
underlying FdEntry ends up bound to the Environment/Realm under
which is was created and transfering across worker threads ends up
failing.

Fixes: #47334
PR-URL: #47574
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
@targos targos mentioned this pull request May 2, 2023
@danielleadams danielleadams added the backport-requested-v18.x PRs awaiting manual backport to the v18.x-staging branch. label Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. backport-requested-v18.x PRs awaiting manual backport to the v18.x-staging branch. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Transfered (PostMessaged) disk- blob's aren't readable
6 participants