{"thread":{"id":"64459","subject":"Git fsmonitor daemon processes spawn detached on macOS 26 Tahoe and never terminate","startedAt":"2025-11-08T21:55:31Z","lastAt":"2025-11-14T07:16:55Z","messageCount":2,"participants":["Jono Spiro","Koji Nakamaru"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"530418","messageId":"CAMqCmsYb409G0CuL+4xZit4V4wqOzD8DtNBe9hmRquBm0Xuevg@mail.gmail.com","threadId":"64459","inReplyTo":null,"subject":"Git fsmonitor daemon processes spawn detached on macOS 26 Tahoe and never terminate","fromName":"Jono Spiro","fromEmail":"jono@lostinrecursion.net","sentAt":"2025-11-08T21:55:20Z","receivedAt":"2025-11-08T21:55:31Z","isPatch":false,"sender":{"key":"jono@lostinrecursion.net","avatar":null},"body":"Thank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n\n1. Enabled git fsmonitor: git config --global core.fsmonitor true\n2. Used git applications (Xcode, VS Code, GitX, terminal with Starship)\n3. Performed normal git operations (open repository, stage files,\nnavigate directories)\n4. Quit applications\n\nWhat did you expect to happen? (Expected behavior)\n\nfsmonitor--daemon processes should terminate when no longer needed, or\nat minimum when\nparent applications quit. Expected one daemon per active repository or\nso. I am seeing dozens and some users of gitx (which I am a maintainer\non) are seeing thousands of orphaned git processes pile up after\nupgrading to Tahoe.\n\nWhat happened instead? (Actual behavior)\n\nfsmonitor--daemon processes spawn detached (not as children of parent\napplication) and\nnever terminate. They accumulate indefinitely (dozens to hundreds over\ntime). All show:\n  git fsmonitor--daemon run --detach --ipc-threads=8\n\nProcesses must be manually killed: pkill -f fsmonitor-daemon\n\nWhat's different between what you expected and what actually happened?\n\nDaemons are spawning detached with no parent-child relationship. They\nnever receive\ntermination signals when parent applications quit, causing accumulation and git\nindex.lock files to remain locked, blocking further git operations.\n\nAnything else you want to add:\n\n- Only occurs on macOS 26.0+ (Tahoe) - not present on earlier macOS versions\n- Affects ALL git builds: /usr/bin/git, Homebrew 2.51.2, Xcode Command\nLine Tools\n- Affects ALL git applications: Xcode, VS Code, GitX, Starship, any git client\n- Side effects: system resource exhaustion, locked repositories\n- Workaround: git config --global core.fsmonitor false\n- Related issue: https://github.com/gitx/gitx/issues/485\n- Apple Feedback: FB20956467\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.51.2\ncpu: arm64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nfeature: fsmonitor--daemon\nlibcurl: 8.7.1\nzlib: 1.2.12\nSHA-1: SHA1_DC\nSHA-256: SHA256_BLK\ndefault-ref-format: files\ndefault-hash: sha1\nuname: Darwin 25.2.0 Darwin Kernel Version 25.2.0: Sat Nov  1 18:04:14\nPDT 2025; root:xnu-12377.60.50.0.2~95/RELEASE_ARM64_T6000 arm64\ncompiler info: clang: 17.0.0 (clang-1700.3.19.1)\nlibc info: no libc information available\n$SHELL (typically, interactive shell): /bin/zsh\n\n\n[Enabled Hooks]\n"},{"id":"530684","messageId":"CAOTNsDy7Zf6XnjkND3-rXEDXEDWpi6fF4-KhCydBaEqk7OWU6Q@mail.gmail.com","threadId":"64459","inReplyTo":"CAMqCmsYb409G0CuL+4xZit4V4wqOzD8DtNBe9hmRquBm0Xuevg@mail.gmail.com","subject":"Re: Git fsmonitor daemon processes spawn detached on macOS 26 Tahoe and never terminate","fromName":"Koji Nakamaru","fromEmail":"koji.nakamaru@gree.net","sentAt":"2025-11-14T07:16:43Z","receivedAt":"2025-11-14T07:16:55Z","isPatch":false,"sender":{"key":"koji.nakamaru@gree.net","avatar":"https://avatars.githubusercontent.com/u/2645978?v=4"},"body":"On Sun, Nov 9, 2025 at 6:55 AM Jono Spiro <jono@lostinrecursion.net> wrote:\n>\n> Thank you for filling out a Git bug report!\n> Please answer the following questions to help us understand your issue.\n>\n> What did you do before the bug happened? (Steps to reproduce your issue)\n>\n> 1. Enabled git fsmonitor: git config --global core.fsmonitor true\n> 2. Used git applications (Xcode, VS Code, GitX, terminal with Starship)\n> 3. Performed normal git operations (open repository, stage files,\n> navigate directories)\n> 4. Quit applications\n>\n> What did you expect to happen? (Expected behavior)\n>\n> fsmonitor--daemon processes should terminate when no longer needed, or\n> at minimum when\n> parent applications quit. Expected one daemon per active repository or\n> so. I am seeing dozens and some users of gitx (which I am a maintainer\n> on) are seeing thousands of orphaned git processes pile up after\n> upgrading to Tahoe.\n>\n> What happened instead? (Actual behavior)\n>\n> fsmonitor--daemon processes spawn detached (not as children of parent\n> application) and\n> never terminate. They accumulate indefinitely (dozens to hundreds over\n> time). All show:\n>   git fsmonitor--daemon run --detach --ipc-threads=8\n>\n> Processes must be manually killed: pkill -f fsmonitor-daemon\n>\n> What's different between what you expected and what actually happened?\n>\n> Daemons are spawning detached with no parent-child relationship. They\n> never receive\n> termination signals when parent applications quit, causing accumulation and git\n> index.lock files to remain locked, blocking further git operations.\n>\n> Anything else you want to add:\n>\n> - Only occurs on macOS 26.0+ (Tahoe) - not present on earlier macOS versions\n> - Affects ALL git builds: /usr/bin/git, Homebrew 2.51.2, Xcode Command\n> Line Tools\n\nThe \"git fsmonitor--daemon --detach --ipc-threads=8\" command runs in the\nbackground and doesn't terminate when its parent process, such as\nVSCode, terminates. This behavior is observed even on macOS Sequoia\n15.7.2 (my environment) and previous macOS versions. You can stop it by\nthe \"git fsmonitor--daemon stop\" command or using pkill (as you\nmentioned).\n\nSetting \"git config --global core.fsmonitor true\" quickly leads to many\nfsmonitor processes, so I avoid using it. Instead, I enable fsmonitor\nonly for specific large repositories.\n\n> - Affects ALL git applications: Xcode, VS Code, GitX, Starship, any git client\n> - Side effects: system resource exhaustion, locked repositories\n> - Workaround: git config --global core.fsmonitor false\n> - Related issue: https://github.com/gitx/gitx/issues/485\n> - Apple Feedback: FB20956467\n>\n> Please review the rest of the bug report below.\n> You can delete any lines you don't wish to share.\n>\n>\n> [System Info]\n> git version:\n> git version 2.51.2\n> cpu: arm64\n> no commit associated with this build\n> sizeof-long: 8\n> sizeof-size_t: 8\n> shell-path: /bin/sh\n> feature: fsmonitor--daemon\n> libcurl: 8.7.1\n> zlib: 1.2.12\n> SHA-1: SHA1_DC\n> SHA-256: SHA256_BLK\n> default-ref-format: files\n> default-hash: sha1\n> uname: Darwin 25.2.0 Darwin Kernel Version 25.2.0: Sat Nov  1 18:04:14\n> PDT 2025; root:xnu-12377.60.50.0.2~95/RELEASE_ARM64_T6000 arm64\n> compiler info: clang: 17.0.0 (clang-1700.3.19.1)\n> libc info: no libc information available\n> $SHELL (typically, interactive shell): /bin/zsh\n>\n>\n> [Enabled Hooks]\n>\n\n--\nKoji Nakamaru\n"}]}