-
Notifications
You must be signed in to change notification settings - Fork 28.7k
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
jemalloc issue in ripgrep on aarch64-linux #179907
Comments
Looks like jemalloc just needs to be configured with This can be achieved by setting the environment variable:
Or to support 64K page size as well:
In either case, it'd still work for 4K/16K(/64K) page sizes. |
@andreamah Do we have any good news on this? I found the similar thing happened before on other application like sharkdp/fd#1085, probably we can use the same approach to solve this one? |
Any update on this issue ? |
Temporary Workaround: To address the issue until it is fixed, follow these steps: Install ripgrep and obtain its path. For Rocky Linux or any RHEL-based Linux distribution, run the following command with root privileges: For Ubuntu, use the following command: Alternatively, you can install ripgrep using Cargo: Verify the installation and retrieve the path by running: Replace the broken rg with a symlink by executing the following script. Please note that you should remove the echo commands to commit the changes: This workaround should help resolve the issue temporarily. |
This should be fixed in tomorrow's VS Code Insiders. Please try it out and let me know if it works for you! |
I tried
but it seems not fixed or not included the fix. execute from the remote server(aarch64)
(after resetting the remote environment by deleting .vscode-server-insiders folder on the remote, and vscode reloaded. - 'Developer: Reload Window') |
Are you running 16K page size or 64K? |
I got
on the aarch64 remote (Rocky Linux 8, aws r7g instance/Graviton3 processors). Meanwhile, executing the same command above on x86-64 remote, I got the normal rg help print out as like
and correcting the hand typed typo above of vscode insider version info
|
Hmm ok. I tried setting the env variable to increase max page size for jemalloc, but it seems to not be working. I'll try another approach. |
Is this fixed in the latest release version of VScode? VScode Version: 1.79.0 (Universal) |
Same with @RuinanSun Switched to newest insider build. Went to server, killed |
Here is some useful link detailing what I think is the problem. Not sure if it is resolved by now. But if info from the discussion is current, I think you will have to either compile on the target system, or ship different precompiled versions of binary and select the correct one depending on the system specs (see jemalloc/jemalloc#467 ). |
We do cross-compile for different systems for ripgrep https://github.com/microsoft/ripgrep-prebuilt. I'll have to take another look. |
So, my interpretation is, that the page-size is hard-coded into jemalloc. When the system page size at runtime differs from the one it is compiled for, it will fail. In other words, the one shipped right now fails out of the box:
From your linked repo, I understand that you now focus on 16k page size. That would also not help me (if my suspicion is right), as my system's page size is: 64k
|
@andreamah @RuinanSun : Temporary fix.
Now search should work as expected. |
@bashimao can you check if the following ripgrep build runs fine on your aarch64 setup ? The build is generated from microsoft/ripgrep-prebuilt#30 to use 64k for jemalloc. |
Thanks @bashimao. |
@RuinanSun @gene203 @bashimao can any of you verify this:
|
I untar-ed the file and the binary 'rg' is working good with remote search. (I sym-linked it with vscode 1.79)
|
This bug has been fixed in the latest release of VS Code Insiders! @andreamah, you can help us out by commenting If things still don't seem right, please ensure you're on version 45b31e9 of Insiders (today's or later - you can use Happy Coding! |
I can confirm it is fixed with the vscode insider downloaded a minute ago of
(assume the commit hash changed since)
|
thanks so much for checking! @gene203 |
From #179121 (comment)
@mycraftmw
Probably a regression from making aarch64-linux ripgrep build statically compiled to fix microsoft/vscode-ripgrep#34. We might need to dynamically compile ripgrep instead of using musl, and find a container to compile it in.
related BurntSushi/ripgrep#2180
// cc @roblourens
The text was updated successfully, but these errors were encountered: