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

Piping commands that use PCBUF sometimes hang #23

Closed
fachat opened this issue Dec 5, 2019 · 2 comments
Closed

Piping commands that use PCBUF sometimes hang #23

fachat opened this issue Dec 5, 2019 · 2 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@fachat
Copy link
Owner

fachat commented Dec 5, 2019

This is related to the fact that one command (e.g. PS) uses PCBUF to get information from the kernel, tries, to write it to STDOUT, so it locks PCBUF during this time, while the shell still tries to open the down-pipe process, which is also using PCBUF to open the file and FORK.

@fachat fachat added bug Something isn't working enhancement New feature or request labels Dec 5, 2019
@fachat
Copy link
Owner Author

fachat commented Dec 5, 2019

What could be a possible solution?

  • the shell keeps locking PCBUF as long as it is needed to build the complete pipe chain. This is similar to what init and filesystems do today, init locks PCBUF with PSEM and the filesystem releases once it has registered itself with VSEM. But forked processes now "inherit" the semaphore, and release it - should FORK provide some block that too?
  • PS needs to copy away the data and immediately release PCBUF

@fachat
Copy link
Owner Author

fachat commented Dec 8, 2019

Fixed

@fachat fachat closed this as completed Dec 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant