microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.67k stars 292 forks source link

Search on the remote host of aarch64 platform not working #8469

Closed gene203 closed 1 year ago

gene203 commented 1 year ago

Type: Bug

Starting from version 1.77.1 up to the latest version 1.78.1, Visual Studio Code (VSCode) has been facing an issue in the search functionality when run on an remote AArch64 (Rocky Linux 8) platform. The issue does not seem to affect the same functionality on an remote x86-64 platform (Rocky Linux 8).

The search feature fails to return results from the entire project folder. Instead, it only returns results from the files that are currently open. This is inconsistent behavior as the search function should scan the entire project directory.

Interestingly, when downgrading to VSCode version 1.76, the search function performs as expected on the remote AArch64 platform, retrieving results from all files in the project folder, similar to the performance on the remote x86-64 platform.

This issue is not 'local' platform-specific, as the same behavior is observed when running VSCode on 'local' MacOS and Windows 11. The problem is localized to VSCode versions 1.77.1 through 1.78.1 with remote AArch64 systems.

Steps to Reproduce:

Install VSCode version 1.77.1 or 1.78.1 on MacOS or Windows. Connect the remote platform to an 'remote' AArch64 system (Rocky Linux 8). Open a project folder and attempt to use the search function on 'remote' project. Notice that the search results are only returned from the currently open files, not the entire project directory. Expected Behavior: The search function should return results from all files in the project directory, not just the ones that are currently open.

Actual Behavior: The search function only returns results from the currently open files when using VSCode versions 1.77.1 - 1.78.1 on an 'remote' AArch64 system. The issue is resolved when downgrading 'local' vscode to version 1.76 or when running on an 'remote' x86-64 system.

Workaround: Downgrade to VSCode version 1.76 to get the search function to work correctly on ' local' MacOS or Windows 11 to the remote AArch64 systems.

|OS|Linux x64 4.18.0-425.19.2.el8_7.x86_64| |CPUs|AMD Ryzen 9 5950X 16-Core Processor (32 x 3400)| |Memory (System)|78.54GB (55.77GB free)| |VM|0%|

Item Value
Remote SSH: a-o1
OS Linux arm64 4.18.0-425.13.1.el8_7.aarch64
CPUs AWS r7g instance / AWS Graviton3 processors
Memory (System) 7.28GB (4.34GB free)
VM 0%
Item Value
Remote SSH: ln-e0
OS Linux x64 6.0.10-x86_64-linode158
CPUs AMD EPYC 7601 32-Core Processor (2 x 2199)
Memory (System) 3.82GB (2.37GB free)
VM 0%

andreamah commented 1 year ago

If you do the following, what logs do you get when you perform a search on the buggy linux arch?

  1. run Developer: Set Log Level in the command palette and set Trace
  2. do a search
  3. In the bottom panel, check logs in the Extension Host channel in the Outputs tab This might be a duplicate of https://github.com/microsoft/vscode/issues/179907
gene203 commented 1 year ago

Yes I see the similar 'jemalloc' logs from "Extension Host (Remote)" like

2023-05-11 18:26:46.379 [debug] RipgrepSearchEH#search /u/*******/.vscode-server/bin/6a995c4f4cc2ced6e3237749973982e751cb0bf9/node_modules/@vscode/ripgrep/bin/rg --hidden --ignore-case -g '**/*.sh/**' -g '**/*.sh' --no-ignore --follow --crlf --fixed-strings --no-config --no-ignore-global --json -- 'a' '.'
 - cwd: /*******
2023-05-11 18:26:46.382 [debug] RipgrepSearchEH#search <jemalloc>: Unsupported system page size

2023-05-11 18:26:46.383 [debug] RipgrepSearchEH#search <jemalloc>: Unsupported system page size

2023-05-11 18:26:46.383 [debug] RipgrepSearchEH#search memory allocation of 
2023-05-11 18:26:46.383 [debug] RipgrepSearchEH#search 5
2023-05-11 18:26:46.383 [debug] RipgrepSearchEH#search  bytes failed

2023-05-11 18:26:46.427 [debug] RipgrepSearchEH#search No data from stdout
2023-05-11 18:26:46.427 [debug] RipgrepSearchEH#search No result from parser
2023-05-11 18:26:46.427 [debug] RipgrepSearchEH#search 
2023-05-11 18:26:47.243 [debug] RipgrepSearchEH#search provideTextSearchResults aws, {"folder":"file:///*******","excludes":[],"includes":

definitely a duplicate of https://github.com/microsoft/vscode/issues/179907 Thanks!