Skip to content

[Bug]: ripgrep giving segfault and quietly making searches fail #5322

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

Closed
4 tasks done
bolliger32 opened this issue Jul 4, 2022 · 9 comments
Closed
4 tasks done

[Bug]: ripgrep giving segfault and quietly making searches fail #5322

bolliger32 opened this issue Jul 4, 2022 · 9 comments
Labels
needs-investigation This issue needs to be further investigated

Comments

@bolliger32
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome
  • Local OS: macOS
  • Remote OS: Ubuntu
  • Remote Architecture: x86_64
  • code-server --version: 4.5.0

Steps to Reproduce

  1. Install code-server in the remote machine via conda-forge (mamba install code-server=4.5.0)
  2. attempt to execute the ripgrep binary included in this installation
  3. Also, after opening code-server and accessing via browser, try to search for a string in all files

Expected

  1. When executing rg, the binary executes (i.e. if you just execute /path/to/conda/env/share/code-server/lib/vscode/node_modules/@vscode/ripgrep/bin/rg, you should get an error that no arguments were required - which is expected)
  2. When searching for a string in all files, you should see all matches

Actual

  1. Get a segfault instead of observing that rg executes.
  2. When searching for a string in all open files, only see matches in open files

Logs

Having trouble finding relevant logs doing this, but I have confirmed that if I install a working version of ripgrep (i.e. via mamba install ripgrep and then replace the segfaulting binary rg inside of share/code-server/lib/vscode/node_modules/@vscode/ripgrep/bin with a symlink to this working version (which I tried based on #5216) then the search functionality works fine. So I'm pretty sure this is the source of the issue. I just don't know WHY that binary gives a segfault.

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

No response

@bolliger32 bolliger32 added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Jul 4, 2022
@jsjoeio
Copy link
Contributor

jsjoeio commented Jul 18, 2022

We've definitely had issues before with ripgrep not being installed properly. I'm using code-server on macOS and don't have this same issue so it makes me wonder if the issue is specific to conda-forge - i'm not super familiar with that.

@code-asher any ideas?

@jsjoeio jsjoeio added needs-investigation This issue needs to be further investigated and removed bug Something isn't working triage This issue needs to be triaged by a maintainer labels Jul 18, 2022
@code-asher
Copy link
Member

code-asher commented Jul 21, 2022 via email

@BEFH
Copy link

BEFH commented Jul 21, 2022

@code-asher
Copy link
Member

code-asher commented Jul 25, 2022 via email

@BEFH
Copy link

BEFH commented Jul 25, 2022

It requires (and installs) 16.X. The installed version is 16.14.2.

@code-asher
Copy link
Member

code-asher commented Jul 25, 2022 via email

@BEFH
Copy link

BEFH commented Jul 26, 2022

I was going to say that checksum mismatches on the binaries are not surprising, since conda builds everything from source. However, that's clearly not what's happening here. Something is very wrong:

[I] Mon, Jul 25, 2022: 21:40:40 fultob01:LOAD@li03c02 ~/local/src/lab_operations main ✔ ./rw
$ sha256sum /sc/arion/work/fultob01/conda/envs/py3.9/bin/rg                                                                                                                                                 (py3.9)
ed70a72a11ec57f60ecdf88eed747796cecbd09350f636d9e4ea6c22c0f4ec1d  /sc/arion/work/fultob01/conda/envs/py3.9/bin/rg
[I] Mon, Jul 25, 2022: 21:41:33 fultob01:LOAD@li03c02 ~/local/src/lab_operations main ✔ ./rw
$ sha256sum /sc/arion/work/fultob01/conda/envs/py3.9/share/code-server/lib/vscode/node_modules/*vscode/ripgrep/bin/rg                                                                                       (py3.9)
9b85e1a11cd624e775ab33e6b7e86fe60844f534be89d04b34a17cebf6ccc611  /sc/arion/work/fultob01/conda/envs/py3.9/share/code-server/lib/vscode/node_modules/@vscode/ripgrep/bin/rg
[I] Mon, Jul 25, 2022: 21:43:31 fultob01:LOAD@li03c02 ~/local/src/lab_operations main ✔ ./rw
$ /sc/arion/work/fultob01/conda/envs/py3.9/share/code-server/lib/vscode/node_modules/*vscode/ripgrep/bin/rg --version                                                                                       (py3.9)
fish:
[I] Mon, Jul 25, 2022: 21:44:04 fultob01:LOAD@li03c02 ~/local/src/lab_operations main ✔ ./rw
$ /sc/arion/work/fultob01/conda/envs/py3.9/share/code-server/lib/vscode/node_modules/*vscode/ripgrep/bin/rg                                                                                                 (py3.9)
fish:

@rvalieris
Copy link

Hello, just a heads up, I believe this issue was being caused by the conda build system and has been resolved as of last week, please test the conda-forge package if you can.

more info here: conda-forge/code-server-feedstock#100

@code-asher
Copy link
Member

Thank you for the heads up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-investigation This issue needs to be further investigated
Projects
None yet
Development

No branches or pull requests

5 participants