feat(spawning): make niri spawning work better with PR_SET_PDEATHSIG#3482
Open
nagisa wants to merge 1 commit intoniri-wm:mainfrom
Open
feat(spawning): make niri spawning work better with PR_SET_PDEATHSIG#3482nagisa wants to merge 1 commit intoniri-wm:mainfrom
nagisa wants to merge 1 commit intoniri-wm:mainfrom
Conversation
Contributor
Author
This comment was marked as resolved.
This comment was marked as resolved.
Contributor
Author
|
Huh, thanks for testing. Surprising that there are any cases where 32k stack wouldn't be enough 👀 I bumped the stack up to 96k, I would be ultra surprised if that wasn't enough to do all the spawning stuff... |
`PR_SET_PDEATHSIG` as commonly used by bubblewrap (`--die-with-parent`) which niri in turn uses to wrap `steam` and `heroic` appears to keep track not only of the reaper process but also the thread that spawned the command. This is extremely unfortunate, but this seems reasonably straightforward to make better on `niri` side. I quickly whipped this up and confirmed that niri with this change now can spawn `steam` or `heroic` on my system. This may also be ever-so-slightly faster compared to creating a full thread on every command invocation.
|
It doesn't crash now, but it still doesn't spawn heroic and steam 100% of the time. |
|
Tested with Helium (has the same problem) and Heroic, both still experiencing it 🤔 |
Contributor
Author
|
Hmm, alright, I don't think I will be able to investigate it for longer, but just to make sure, both of you are testing |
I tested with keybinds at first but went back and tested like this and yep still doesn't work :( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR_SET_PDEATHSIGas commonly used by bubblewrap (--die-with-parent) which nixos in turn uses to wrapsteamandheroicappears to keep track not only of the reaper process but also the thread that spawned the command.This is extremely unfortunate, but this seems reasonably straightforward to make better on
niriside. I quickly whipped this up and confirmed that niri with this change now can spawnsteamorheroicon my system.Having just one thread with a channel may also be ever-so-slightly faster compared to creating a full thread on every command invocation, but it has required me to pick a concrete type to represent the commands. If we want to support arbitrary
OsStrings, that's also possible, although it would require reallocation of the command strings for every non-initial command.