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

pipelines frequently encounter unexpected SIGSTP on macOS #151

Closed
39555 opened this issue Aug 18, 2024 · 5 comments
Closed

pipelines frequently encounter unexpected SIGSTP on macOS #151

39555 opened this issue Aug 18, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@39555
Copy link
Contributor

39555 commented Aug 18, 2024

While using Brush I experience random 148 SIGSTP signals from child commands.

brush --noprofile --norc

image image
@reubeno
Copy link
Owner

reubeno commented Aug 19, 2024

That's a good find, thanks for reporting it. Sounds like some kind of race condition given that it's not consistent. I wonder if it's fundamentally related to #58. The fact that you reproduced it with no asynchronous commands or piped commands is quite helpful to know.

@reubeno reubeno added the bug Something isn't working label Aug 20, 2024
@reubeno
Copy link
Owner

reubeno commented Aug 20, 2024

My quick attempts to reproduce the errors in the above screenshots weren't successful. @39555 -- just to confirm, which OS are you running on? (Is it Linux?)

@39555
Copy link
Contributor Author

39555 commented Sep 24, 2024

I've tested on macOS M2 arm64, NixOS wsl x86_64 and Windows x86_64. And that problem seems to exist only on Mac

@reubeno
Copy link
Owner

reubeno commented Sep 25, 2024

@39555 -- thanks for the confirmation. That explains why I haven't seen it, as I do most of my testing on Linux (and infrequently on Windows). I've put some effort in the last few days to start running our existing test suites on macOS arm64 as part of GitHub PR checks. It will take some time to get them stable, I expect, but I'm anticipating that they will help catch basic issues like the one you've reported.

I'm also interested to know if the changes in #166 get us closer to resolving this issue. (I won't be surprised if they don't, but any fixes for this should be layered on those.)

@reubeno reubeno changed the title unstable unexpected SIGSTP pipelines frequently encounter unexpected SIGSTP on macOS Sep 25, 2024
@reubeno
Copy link
Owner

reubeno commented Sep 26, 2024

This ended up being a macOS-specific issue, and I believe fixed by #172. The signal-handling code had been hard-coding integer signal values rather than using appropriate, portable constants that are correctly defined for each supported platform. Fixing that improved the code and appears to have resolved the issue.

Thanks to the merged PR linked above, we now also run all tests on macOS as part of PR checks; that should help us keep a functional baseline for x86_64/Linux and arm64/macOS for now. Thanks again for reporting this, it's been good learning along the way.

@reubeno reubeno closed this as completed Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants