[Bug]: Desktop backend dies with SIGTRAP in fff's background scan thread (realloc trap)
Maintainer thường phản hồi trong vòng 1 ngày
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
- 45/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ệ
- electron, typescript
Hướng nghiên cứu
Start in the apps/server area named in the report and trace how workspace file search uses @ff-labs/fff-node and its native @ff-labs/fff-bin-darwin-arm64 binding during directory scans. The crash reports point to realloc on an fff background scan thread, but there is no deterministic repro or specific source file or test named. Investigate the native allocation or binding behavior and define a reproducible test that confirms indexing no longer crashes the backend.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
No deterministic repro yet. What happened:
- Run the desktop app on macOS (Apple Silicon) with several projects open and agents running.
- About an hour after launch, the bundled backend child was killed by
SIGTRAPthree times in six minutes (23:53, 23:54 and 23:59 local). Each time the app restarted it within a second.
All three crash reports have the same shape: the faulting thread is one of @ff-labs/fff's own threads (fff-bg-2, fff-bg-6, and an unnamed fff scan thread), inside realloc, while other fff threads are still listing directories (getattrlistbulk). The JavaScript main thread is in ordinary V8 code each time; nothing is calling finder.destroy() at that moment.
Expected behavior
File search indexing never takes the backend down.
Actual behavior
The backend process dies with EXC_BREAKPOINT (SIGTRAP). macOS shows " quit unexpectedly" while the window stays up, and any agent turn running at that moment is cut off; providers resume in a fresh native session.
The trap is raised by Electron's allocator from a realloc that libfff_c.dylib makes on its own background thread, so it looks like heap damage inside fff (or its Node binding) that Electron's allocator catches. Because the backend runs inside the Electron binary (ELECTRON_RUN_AS_NODE), malloc/realloc go through Electron's allocator, which may be why this shows up on desktop.
Impact
Major degradation or frequent failure
Version or commit
0.1.10 (main as of 2026-11-18). This is an internal build of T3 Code with the desktop app renamed. apps/server/src/workspace has only upstream commits (it lacks #38337 and #38585, which do not touch native memory), and @ff-labs/fff-node / @ff-labs/fff-bin-darwin-arm64 are 0.11.0, the same as main.
Environment
macOS 26.6.2, arm64, desktop app, Electron 44.10.1, @ff-labs/fff-node 0.11.0
Logs or stack traces
# desktop log (server-child.log)
backend child process failure output end details="pid=2198 killed by SIGTRAP" 05:53:33Z
backend child process failure output end details="pid=21068 killed by SIGTRAP" 05:54:22Z
backend child process failure output end details="pid=27689 killed by SIGTRAP" 05:59:12Z
# crash report (.ips), process = the backend child, parent = the app
exception: EXC_BREAKPOINT (SIGTRAP), codes 0x1, 0x...3c4
termination: Trace/BPT trap: 5
# faulting thread fff-bg-6 (same in the other two reports)
0-4 Electron Framework (allocator trap; symbols resolve to unrelated names)
5 Electron Framework
6 Electron Framework
7 libsystem_malloc.dylib _malloc_zone_realloc
8 libsystem_malloc.dylib _realloc
9-23 libfff_c.dylib (no symbols)
24 libsystem_pthread.dylib _pthread_start
# other threads at the same moment
fff-bg-0..8 libfff_c.dylib, waiting on a condition variable (except the faulting one)
4-7 threads libsystem_kernel getattrlistbulk < libfff_c.dylib (directory scan in progress)
main thread Electron Framework / V8 only, no fff or ffi-rs frames
Workaround
None found. The backend restarts by itself, but running agent turns are interrupted each time.
- Ngôn ngữ chính
- TypeScript
- Star
- 24.8k
- Fork
- 6.4k
- Merge trung bình
- 4 giờ 29 phút
- Pull request đã merge (30 ngày)
- 488
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc 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 pingdotgg/t3code
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs more info
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pingdotgg/t3code#39400 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Wrapped PR titles lose bottom padding in the thread details panelCó thể đã có người làm @iamdatvt94 đã nhận 1 ngày trước. Đang mởbug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của pingdotgg/t3code
Issue tương tự
-
area:plugins kind:bug priority:p2 ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Escaped `*` followed by `*` (`\**`) never matchesCó thể đã có người làm @bardrop đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 71/100
editorconfig/editorconfig-core-js#172 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
vega/vega-webgpu#40 ·
-
Adjust break point sizingĐang mởtype: bug 🐛
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
puckeditor/puck#1929 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
compression() compresses every response at Brotli quality 11Có thể đã có người làm @staylor đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày