Built-in ARM64 ripgrep crashes on Linux systems with 64 KiB pages due to jemalloc
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- linux, shell
- Lĩnh vực
- cli, operating-systems
Hướng nghiên cứu
Start by reproducing the failure with ~/.cache/copilot/pkg/linux-arm64/1.0.86/ripgrep/bin/linux-arm64/rg on an ARM64 Linux host with 64 KiB pages. Inspect the built-in search selection controlled by USE_BUILTIN_RIPGREP and compare it with the working system rg and tgrep binaries. Done when search works on the affected host without requiring a special environment variable.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Copilot CLI's built-in rg and glob search tools crash before searching when the bundled ARM64 ripgrep binary runs on a Linux host configured with 64 KiB memory pages. The binary aborts during jemalloc initialization with Unsupported system page size, preventing repository search from working.
Affected version
1.0.86
Steps to reproduce the behavior
-
Use an ARM64 Linux host with a 64 KiB kernel page size.
-
Run the ripgrep binary shipped with Copilot CLI:
$ ~/.cache/copilot/pkg/linux-arm64/1.0.86/ripgrep/bin/linux-arm64/rg --version <jemalloc>: Unsupported system page size <jemalloc>: Unsupported system page size memory allocation of 160 bytes failed Aborted (core dumped) -
Invoke Copilot CLI's
rgorglobsearch tool. It produces the same jemalloc error and returns no search results.
The affected host reports:
$ getconf PAGESIZE
65536
$ uname -srm
Linux 6.17.0-1014-nvidia-64k aarch64
The process exits with status 134.
Expected behavior
The built-in search tools should work on ARM64 Linux hosts with 64 KiB pages, or Copilot CLI should automatically fall back to a compatible search backend when the bundled ripgrep binary cannot start.
Additional context
Related issue
This was previously reported in github/copilot-cli#658, which was closed after the USE_BUILTIN_RIPGREP=0 workaround was identified. The issue remains reproducible, and later commenters reported the same failure even after applying the workaround.
We are opening this new issue because the workaround is not a good long-term fix: it is not discoverable to users, requires restarting Copilot CLI with a special environment variable, and does not address the incompatible bundled binary. Multiple users are encountering the same failure, making search unreliable or unusable on affected ARM64 systems.
Machine and operating system
- Hardware: Dell Pro Max with Station GB300
- OS: Ubuntu
24.04.5 LTS - Kernel:
6.17.0-1014-nvidia-64k - Architecture:
aarch64/ ARM64 - Kernel configuration:
CONFIG_ARM64_64K_PAGES=y - Runtime page size:
65536bytes
Comparison with working search binaries
My own ripgrep works on the same host:
$ /home/linuxbrew/.linuxbrew/bin/rg --version
ripgrep 15.2.0
$ /home/linuxbrew/.linuxbrew/bin/rg --files ~/dev/nigel-models/src/nigel/nigel-0.6
# succeeds
The bundled tgrep binary also starts and searches successfully. This isolates the failure to the bundled ripgrep binary and its allocator configuration rather than to the repository or the kernel's general ability to run search tools.
Workaround
The Copilot CLI changelog documents USE_BUILTIN_RIPGREP as a way to use ripgrep from PATH. Starting a new session with the system binary avoids the crash:
USE_BUILTIN_RIPGREP=false copilot
Suspected cause
The bundled ARM64 ripgrep binary is statically linked and contains jemalloc. It appears to have been built with a 4 KiB page-size assumption, while the host kernel uses 64 KiB pages. jemalloc therefore aborts during process initialization before ripgrep reaches its normal argument parsing.
Potential fixes include shipping ripgrep without jemalloc, building jemalloc/ripgrep with 64 KiB page support (lg-page=16), or detecting this platform and selecting the system ripgrep or tgrep backend.
- Ngôn ngữ chính
- Shell
- Star
- 11.2k
- Fork
- 1.9k
- Merge trung bình
- 14 giờ 16 phút
- Pull request đã merge (30 ngày)
- 6
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/copilot-cli
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
github/copilot-cli#4932 ·
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
github/copilot-cli#4909 ·
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
github/copilot-cli#4906 ·
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/copilot-cli#4848 ·
-
area:agents area:mcp
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/copilot-cli#4729 ·
Tất cả issue của github/copilot-cli
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
bug easy help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
lacs-project/sysknife#503 ·
-
help wanted kind/documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
liquidmetal-dev/flintlock#1239 ·