-
Notifications
You must be signed in to change notification settings - Fork 4
secrets env cmd
command causing segfaults when you try to CTRL + C on the subcommand on slow calls
#307
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
Comments
I've created this to track the problem. @CMCDragonkai @brynblack if you run into it at all then please add some details about what happened and why. |
Does this still happen? This hasn't been noticed for the past 2 months in almost regular usage. |
I've never seen it happen. @brynblack @CMCDragonkai Have you seen this happen recently? |
Now that we are also using |
I saw it efore. This happens for when you run a subcommand under |
secrets env
command causing segfaultssecrets env cmd
command causing segfaults
secrets env cmd
command causing segfaultssecrets env cmd
command causing segfaults when you try to CTRL + C on the subcommand on slow calls
Running a potentially long operation like
So this might be related. If this was the exact error you were getting, then this would be useful to reproduce the issue. |
It ran into a null byte where it doesn't expect it. |
No, but there was a lot of junk. I piped the whole output into a file and got this. I was trying to export a |
Definitely had to do with the rust code. |
I enabled rust backtrace and this is what I got. The failure originates from js-exec's |
https://github.com/MatrixAI/Polykey-CLI/blob/staging/src/secrets/CommandEnv.ts#L218-L227 This might be the same problem solved in this commit: The contents of the file are being treated like a string and not binary data. While it is usually correct to treat environment variables as strings, if they contain binary data, that might result in the program incorrectly parsing and breaking the string. A quick patch would be to update that to wrap in a |
Describe the bug
During usage recently we've been experiencing segfaults while using the
pk secrets env
command. I haven't experienced this myself yet so I don't have the exact steps that cause this.To Reproduce
People need to add details when they experience it.
Expected behavior
Running
polykey secrets env
should not cause a segfault.Screenshots
Platform (please complete the following information)
Additional context
Notify maintainers
@tegefaulkes
The text was updated successfully, but these errors were encountered: