{"thread":{"id":"64547","subject":"SIGSEGV when running git fetch","startedAt":"2025-11-28T22:56:57Z","lastAt":"2025-11-29T11:16:09Z","messageCount":6,"participants":["Justin Su","brian m. carlson","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"531414","messageId":"CAB=S_8JufSGCOBjCQJ6R1Lq-GumJXTPzWGv2JCZK2SPw_XuGPA@mail.gmail.com","threadId":"64547","inReplyTo":null,"subject":"SIGSEGV when running git fetch","fromName":"Justin Su","fromEmail":"injustsu@gmail.com","sentAt":"2025-11-28T22:56:19Z","receivedAt":"2025-11-28T22:56:57Z","isPatch":false,"sender":{"key":"injustsu@gmail.com","avatar":"https://gravatar.com/avatar/038335c7765082d30381cabb16967c569c317af7c4d49addc996dcf9720ada06?d=mp&s=160"},"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? `git fetch`\n\nWhat did you expect to happen? `git fetch` works normally\n\nWhat happened instead?\n\n```\n$ git fetch\nFetching submodule catppuccin/bat\nFetching submodule catppuccin/btop\nFetching submodule catppuccin/micro\nFetching submodule catppuccin/delta\nfatal: Unable to create\n'/home/ubuntu/.config/.git/objects/info/commit-graphs/commit-graph-chain.lock':\nFile exists.\n\nAnother git process seems to be running in this repository, e.g.\nan editor opened by 'git commit'. Please make sure all processes\nare terminated then try again. If it still fails, a git process\nmay have crashed in this repository earlier:\nremove the file manually to continue.\n\n$ rm -f .git/objects/info/commit-graphs/commit-graph-chain.lock\n\n$ git fetch\nFetching submodule catppuccin/bat\nFetching submodule catppuccin/delta\nFetching submodule catppuccin/btop\nFetching submodule catppuccin/micro\nfish: Job 1, 'git fetch' terminated by signal SIGSEGV (Address boundary error)\n```\n\nWhat's different between what you expected and what actually happened?\n`git fetch` almost always results in a SIGSEGV, however the fetch\nappears to work\n\nAnything else you want to add: I am running Ubuntu 24.04.3 LTS on a\nc8g.metal-48xl AWS EC2 instance\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.43.0\ncpu: aarch64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Linux 6.14.0-1017-aws #17~24.04.1-Ubuntu SMP Wed Nov  5\n10:32:15 UTC 2025 aarch64\ncompiler info: gnuc: 13.3\nlibc info: glibc: 2.39\n$SHELL (typically, interactive shell): /usr/bin/fish\n\n\n[Enabled Hooks]\n"},{"id":"531415","messageId":"aSo2n2dhEoZd3nZW@fruit.crustytoothpaste.net","threadId":"64547","inReplyTo":"CAB=S_8JufSGCOBjCQJ6R1Lq-GumJXTPzWGv2JCZK2SPw_XuGPA@mail.gmail.com","subject":"Re: SIGSEGV when running git fetch","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2025-11-28T23:56:15Z","receivedAt":"2025-11-28T23:56:23Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2025-11-28 at 22:56:19, Justin Su wrote:\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? `git fetch`\n> \n> What did you expect to happen? `git fetch` works normally\n> \n> What happened instead?\n> \n> ```\n> $ git fetch\n> Fetching submodule catppuccin/bat\n> Fetching submodule catppuccin/btop\n> Fetching submodule catppuccin/micro\n> Fetching submodule catppuccin/delta\n> fatal: Unable to create\n> '/home/ubuntu/.config/.git/objects/info/commit-graphs/commit-graph-chain.lock':\n> File exists.\n> \n> Another git process seems to be running in this repository, e.g.\n> an editor opened by 'git commit'. Please make sure all processes\n> are terminated then try again. If it still fails, a git process\n> may have crashed in this repository earlier:\n> remove the file manually to continue.\n> \n> $ rm -f .git/objects/info/commit-graphs/commit-graph-chain.lock\n> \n> $ git fetch\n> Fetching submodule catppuccin/bat\n> Fetching submodule catppuccin/delta\n> Fetching submodule catppuccin/btop\n> Fetching submodule catppuccin/micro\n> fish: Job 1, 'git fetch' terminated by signal SIGSEGV (Address boundary error)\n> ```\n> \n> What's different between what you expected and what actually happened?\n> `git fetch` almost always results in a SIGSEGV, however the fetch\n> appears to work\n\nI went ahead and looked at the repository you provided in the embedded\narchive and I think it's corrupt.  First, you're missing the `.git/refs`\ndirectory, so my version of Git (2.51.0.338.gd7d06c2dae8) didn't even\nthink it was a valid Git directory.  I then ran `git fsck` and found a\nwide variety of missing blobs in your repository.\n\nWhen running `git fetch`, I did not get a segfault, but I did get this\nmesssage:\n\n----\n% git fetch\nerror: unable to load config blob object 'd38cf93d707c01ca18ed0233bcebb7aa172f0edd'\nfatal: You are attempting to fetch 06c0fdfd73559275c8d0423ddff0d3bcfd7e7f3f, which is in the commit graph file but not in the object database.\nThis is probably due to repo corruption.\nIf you are attempting to repair this repo corruption by refetching the missing object, use 'git fetch --refetch' with the missing object.\n----\n\n`git fetch --refetch` downloaded several objects, but I still have four\nmissing blobs afterwards.\n\nSo I would recommend running `git fsck` on your repository and see if\nit's corrupt and if you're missing objects.  I agree that Git should not\nsegfault, even with corruption, but I don't see it doing that (granted,\non a Debian unstable amd64 system, not an Ubuntu arm64 system).  We may\nhave fixed the bug you're seeing in a newer version, though.\n-- \nbrian m. carlson (they/them)\nToronto, Ontario, CA\n"},{"id":"531416","messageId":"CAB=S_8JFLYsGe7fs7UjCfFfTJGMqpikZavztU6ZiW4KS21A+MQ@mail.gmail.com","threadId":"64547","inReplyTo":"aSo2n2dhEoZd3nZW@fruit.crustytoothpaste.net","subject":"Re: SIGSEGV when running git fetch","fromName":"Justin Su","fromEmail":"injustsu@gmail.com","sentAt":"2025-11-29T00:08:41Z","receivedAt":"2025-11-29T00:09:18Z","isPatch":false,"sender":{"key":"injustsu@gmail.com","avatar":"https://gravatar.com/avatar/038335c7765082d30381cabb16967c569c317af7c4d49addc996dcf9720ada06?d=mp&s=160"},"body":"On Fri, Nov 28, 2025 at 6:56 PM brian m. carlson\n<sandals@crustytoothpaste.net> wrote:\n>\n> I went ahead and looked at the repository you provided in the embedded\n> archive and I think it's corrupt.  First, you're missing the `.git/refs`\n> directory, so my version of Git (2.51.0.338.gd7d06c2dae8) didn't even\n> think it was a valid Git directory.\n\nThe attachment was output by `git bugreport --diagnose=all`. According\nto the git-diagnose docs, it doesn't include `.git/refs` (which exists\nin my local repo).\n\n> I then ran `git fsck` and found a\n> wide variety of missing blobs in your repository.\n\nWhen I run `git fsck`, the output looks fine:\n\n```\nChecking object directories: 100% (256/256), done.\nChecking objects: 100% (679/679), done.\nVerifying commits in commit graph: 100% (132/132), done.\n```\n\nOn Fri, Nov 28, 2025 at 6:56 PM brian m. carlson\n<sandals@crustytoothpaste.net> wrote:\n>\n> On 2025-11-28 at 22:56:19, Justin Su wrote:\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? `git fetch`\n> >\n> > What did you expect to happen? `git fetch` works normally\n> >\n> > What happened instead?\n> >\n> > ```\n> > $ git fetch\n> > Fetching submodule catppuccin/bat\n> > Fetching submodule catppuccin/btop\n> > Fetching submodule catppuccin/micro\n> > Fetching submodule catppuccin/delta\n> > fatal: Unable to create\n> > '/home/ubuntu/.config/.git/objects/info/commit-graphs/commit-graph-chain.lock':\n> > File exists.\n> >\n> > Another git process seems to be running in this repository, e.g.\n> > an editor opened by 'git commit'. Please make sure all processes\n> > are terminated then try again. If it still fails, a git process\n> > may have crashed in this repository earlier:\n> > remove the file manually to continue.\n> >\n> > $ rm -f .git/objects/info/commit-graphs/commit-graph-chain.lock\n> >\n> > $ git fetch\n> > Fetching submodule catppuccin/bat\n> > Fetching submodule catppuccin/delta\n> > Fetching submodule catppuccin/btop\n> > Fetching submodule catppuccin/micro\n> > fish: Job 1, 'git fetch' terminated by signal SIGSEGV (Address boundary error)\n> > ```\n> >\n> > What's different between what you expected and what actually happened?\n> > `git fetch` almost always results in a SIGSEGV, however the fetch\n> > appears to work\n>\n> I went ahead and looked at the repository you provided in the embedded\n> archive and I think it's corrupt.  First, you're missing the `.git/refs`\n> directory, so my version of Git (2.51.0.338.gd7d06c2dae8) didn't even\n> think it was a valid Git directory.  I then ran `git fsck` and found a\n> wide variety of missing blobs in your repository.\n>\n> When running `git fetch`, I did not get a segfault, but I did get this\n> messsage:\n>\n> ----\n> % git fetch\n> error: unable to load config blob object 'd38cf93d707c01ca18ed0233bcebb7aa172f0edd'\n> fatal: You are attempting to fetch 06c0fdfd73559275c8d0423ddff0d3bcfd7e7f3f, which is in the commit graph file but not in the object database.\n> This is probably due to repo corruption.\n> If you are attempting to repair this repo corruption by refetching the missing object, use 'git fetch --refetch' with the missing object.\n> ----\n>\n> `git fetch --refetch` downloaded several objects, but I still have four\n> missing blobs afterwards.\n>\n> So I would recommend running `git fsck` on your repository and see if\n> it's corrupt and if you're missing objects.  I agree that Git should not\n> segfault, even with corruption, but I don't see it doing that (granted,\n> on a Debian unstable amd64 system, not an Ubuntu arm64 system).  We may\n> have fixed the bug you're seeing in a newer version, though.\n> --\n> brian m. carlson (they/them)\n> Toronto, Ontario, CA\n"},{"id":"531417","messageId":"CAB=S_8+omhdW9Mx3kr=McZvoC-GbftWmsBVLQuRH=0CmChq85Q@mail.gmail.com","threadId":"64547","inReplyTo":"CAB=S_8JFLYsGe7fs7UjCfFfTJGMqpikZavztU6ZiW4KS21A+MQ@mail.gmail.com","subject":"Re: SIGSEGV when running git fetch","fromName":"Justin Su","fromEmail":"injustsu@gmail.com","sentAt":"2025-11-29T00:29:32Z","receivedAt":"2025-11-29T00:30:09Z","isPatch":false,"sender":{"key":"injustsu@gmail.com","avatar":"https://gravatar.com/avatar/038335c7765082d30381cabb16967c569c317af7c4d49addc996dcf9720ada06?d=mp&s=160"},"body":"I narrowed down my Git config to these 2 options that reproduce the crash:\n\n`git -c fetch.writeCommitGraph=true -c submodule.recurse=true fetch`\n\nI tested with a fresh clone of the repo on a new EC2 instance.\n"},{"id":"531418","messageId":"CAB=S_8++iZZtPXm_Fp9ZuBJ_zKN1c3SWy1qMghbx+qop4y7OCQ@mail.gmail.com","threadId":"64547","inReplyTo":"CAB=S_8+omhdW9Mx3kr=McZvoC-GbftWmsBVLQuRH=0CmChq85Q@mail.gmail.com","subject":"Re: SIGSEGV when running git fetch","fromName":"Justin Su","fromEmail":"injustsu@gmail.com","sentAt":"2025-11-29T00:49:26Z","receivedAt":"2025-11-29T00:50:03Z","isPatch":false,"sender":{"key":"injustsu@gmail.com","avatar":"https://gravatar.com/avatar/038335c7765082d30381cabb16967c569c317af7c4d49addc996dcf9720ada06?d=mp&s=160"},"body":"After installing Git 2.52.0 from the Ubuntu PPA, I can no longer\nreproduce the crash.\n"},{"id":"531428","messageId":"20251129111607.GA1778411@coredump.intra.peff.net","threadId":"64547","inReplyTo":"CAB=S_8++iZZtPXm_Fp9ZuBJ_zKN1c3SWy1qMghbx+qop4y7OCQ@mail.gmail.com","subject":"Re: SIGSEGV when running git fetch","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2025-11-29T11:16:07Z","receivedAt":"2025-11-29T11:16:09Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Nov 28, 2025 at 07:49:26PM -0500, Justin Su wrote:\n\n> After installing Git 2.52.0 from the Ubuntu PPA, I can no longer\n> reproduce the crash.\n\nSeems likely this was the bug fixed by d70f554cdf (commit-graph: retain\ncommit slab when closing NULL commit_graph, 2024-01-05).\n\n-Peff\n"}]}