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

Complete the pidfd API #5839

Open
milantracy opened this issue Apr 14, 2021 · 7 comments
Open

Complete the pidfd API #5839

milantracy opened this issue Apr 14, 2021 · 7 comments
Assignees
Labels
type: enhancement New feature or request

Comments

@milantracy
Copy link
Contributor

Description

Implement pidfd API for gVisor.

See https://lwn.net/Articles/794707/ for details

Is this feature related to a specific bug?

N/A

Do you have a specific solution in mind?

@milantracy milantracy added the type: enhancement New feature or request label Apr 14, 2021
@milantracy milantracy self-assigned this Apr 14, 2021
@milantracy
Copy link
Contributor Author

some use cases are listed at oven-sh/bun#5803 (comment)

I will start work on it

@EtiennePerot
Copy link
Contributor

This API has lots of surface area with various associated system calls. It would be good to enumerate them and to sort them by whether or not bun uses them.

Might also be good to add a tests for the bun runtime, similar to our node runtime tests.

@milantracy
Copy link
Contributor Author

Syscalls that are expected to be done are listed in the order of priorities:

@EtiennePerot
Copy link
Contributor

It seems hard to believe that pidfd_open is the only one bun expects. Why use pidfd_open at all if the program is not going to use the functionality that pidfd offers?

@ayushr2
Copy link
Collaborator

ayushr2 commented Nov 21, 2023

You can poll(2) on FD returned by pidfd_open() to get a notification when the process represented by that pidfd exits. So maybe that's how bun uses it?

@milantracy
Copy link
Contributor Author

is the only one bun expects. Why use pidfd_open at all if the program is not going to use the functionality that pidfd offers?

I didn't read into very details of their code base, as they said google-auth-library is the one who introduces the issue, the program crashed when it sees the pidfd_open. I will add pidfd_open to see if there is anything I shall follow with.

You can poll(2) on FD returned by pidfd_open() to get a notification when the process represented by that pidfd exits. So maybe that's how bun uses it?

from oven-sh/bun#6724 , they are working around the issue in a very similar way

@EtiennePerot
Copy link
Contributor

Another bun user hitting this issue: oven-sh/bun#16063

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants