{"thread":{"id":"60544","subject":"[commit-graph] v2.43.0 segfault with fetch.writeCommitGraph enabled when fetch","startedAt":"2023-11-22T04:05:14Z","lastAt":"2023-11-23T03:56:53Z","messageCount":2,"participants":["ryenus","Taylor Blau"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"485045","messageId":"CAKkAvayLrYS1GQ_-Z7kWM=k4pCnNv1Q=NvYcvT8+wqYPkePVcw@mail.gmail.com","threadId":"60544","inReplyTo":null,"subject":"[commit-graph] v2.43.0 segfault with fetch.writeCommitGraph enabled when fetch","fromName":"ryenus","fromEmail":"ryenus@gmail.com","sentAt":"2023-11-22T04:05:02Z","receivedAt":"2023-11-22T04:05:14Z","isPatch":false,"sender":{"key":"ryenus@gmail.com","avatar":"https://avatars.githubusercontent.com/u/610161?v=4"},"body":"The issue appeared after updating to git v2.43.0, now git fetch would cause\nsegmentation fault when commit graph is enabled. Though I only observed this\nissue in a repo with two submodules, regardless of whether the submodules are\nchecked out or not. Meanwhile most other repos without submodules worked fine.\n\n> 15:57:10.660377 run-command.c:726                 child_start[2] git maintenance run --auto --no-quiet\n> 15:57:10.665870 common-main.c:55                  version 2.43.0\n> 15:57:10.666265 common-main.c:56                  start /opt/homebrew/opt/git/libexec/git-core/git maintenance run --auto --no-quiet\n> 15:57:10.666469 repository.c:143                  worktree /path/to/repo/sub/module2\n> 15:57:10.666649 git.c:464                         cmd_name maintenance (_run_dashed_/_run_git_alias_/pull/fetch/fetch/maintenance)\n> 15:57:10.668232 git.c:723                         exit elapsed:0.003405 code:0\n> 15:57:10.668241 trace2/tr2_tgt_normal.c:127       atexit elapsed:0.003415 code:0\n> 15:57:10.668611 run-command.c:979                 child_exit[2] pid:46018 code:0 elapsed:0.008227\n> 15:57:10.668635 git.c:723                         exit elapsed:1.837179 code:0\n> 15:57:10.668639 trace2/tr2_tgt_normal.c:127       atexit elapsed:1.837182 code:0\n> 15:57:10.669007 run-command.c:979                 child_exit[3] pid:46006 code:0 elapsed:1.843739\n> 15:57:10.671522 usage.c:80                        error fetch died of signal 11\n> error: fetch died of signal 11\n> 15:57:10.671645 run-command.c:979                 child_exit[1] pid:45980 code:139 elapsed:5.292927\n> 15:57:10.671658 git.c:723                         exit elapsed:5.337363 code:1\n> 15:57:10.671663 trace2/tr2_tgt_normal.c:127       atexit elapsed:5.337368 code:1\n> 15:57:10.672048 run-command.c:979                 child_exit[1] pid:45978 code:1 elapsed:5.345050\n> 15:57:10.672099 git.c:819                         exit elapsed:5.355644 code:1\n> 15:57:10.672105 trace2/tr2_tgt_normal.c:127       atexit elapsed:5.355649 code:1\n\n\nSubsequent `git fetch` would then fail due to the left over lock file:\n\n> 15:57:19.059375 run-command.c:726                 child_start[2] git maintenance run --auto --no-quiet\n> 15:57:19.065689 common-main.c:55                  version 2.43.0\n> 15:57:19.066027 common-main.c:56                  start /opt/homebrew/opt/git/libexec/git-core/git maintenance run --auto --no-quiet\n> 15:57:19.066206 repository.c:143                  worktree /path/to/repo/sub/module2\n> 15:57:19.066387 git.c:464                         cmd_name maintenance (_run_dashed_/_run_git_alias_/pull/fetch/fetch/maintenance)\n> 15:57:19.067888 git.c:723                         exit elapsed:0.003122 code:0\n> 15:57:19.067896 trace2/tr2_tgt_normal.c:127       atexit elapsed:0.003131 code:0\n> 15:57:19.068239 run-command.c:979                 child_exit[2] pid:46076 code:0 elapsed:0.008852\n> 15:57:19.068276 git.c:723                         exit elapsed:1.661854 code:0\n> 15:57:19.068281 trace2/tr2_tgt_normal.c:127       atexit elapsed:1.661858 code:0\n> 15:57:19.068714 run-command.c:979                 child_exit[3] pid:46065 code:0 elapsed:1.667321\n> 15:57:19.069327 usage.c:61                        error Unable to create '/path/to/repo/.git/objects/info/commit-graphs/commit-graph-chain.lock': 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> fatal: Unable to create '/path/to/repo/.git/objects/info/commit-graphs/commit-graph-chain.lock': File exists.\n\nAs a workaround, I disabled fetch.writeCommitGraph to get fetch work again.\n"},{"id":"485058","messageId":"ZV7Ng29MReKGjrgi@nand.local","threadId":"60544","inReplyTo":"CAKkAvayLrYS1GQ_-Z7kWM=k4pCnNv1Q=NvYcvT8+wqYPkePVcw@mail.gmail.com","subject":"Re: [commit-graph] v2.43.0 segfault with fetch.writeCommitGraph enabled when fetch","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2023-11-23T03:56:51Z","receivedAt":"2023-11-23T03:56:53Z","isPatch":false,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Wed, Nov 22, 2023 at 12:05:02PM +0800, ryenus wrote:\n> The issue appeared after updating to git v2.43.0, now git fetch would cause\n> segmentation fault when commit graph is enabled. Though I only observed this\n> issue in a repo with two submodules, regardless of whether the submodules are\n> checked out or not. Meanwhile most other repos without submodules worked fine.\n>\n> > 15:57:10.660377 run-command.c:726                 child_start[2] git maintenance run --auto --no-quiet\n> > 15:57:10.665870 common-main.c:55                  version 2.43.0\n> > 15:57:10.666265 common-main.c:56                  start /opt/homebrew/opt/git/libexec/git-core/git maintenance run --auto --no-quiet\n> > 15:57:10.666469 repository.c:143                  worktree /path/to/repo/sub/module2\n> > 15:57:10.666649 git.c:464                         cmd_name maintenance (_run_dashed_/_run_git_alias_/pull/fetch/fetch/maintenance)\n> > 15:57:10.668232 git.c:723                         exit elapsed:0.003405 code:0\n> > 15:57:10.668241 trace2/tr2_tgt_normal.c:127       atexit elapsed:0.003415 code:0\n> > 15:57:10.668611 run-command.c:979                 child_exit[2] pid:46018 code:0 elapsed:0.008227\n> > 15:57:10.668635 git.c:723                         exit elapsed:1.837179 code:0\n> > 15:57:10.668639 trace2/tr2_tgt_normal.c:127       atexit elapsed:1.837182 code:0\n> > 15:57:10.669007 run-command.c:979                 child_exit[3] pid:46006 code:0 elapsed:1.843739\n> > 15:57:10.671522 usage.c:80                        error fetch died of signal 11\n> > error: fetch died of signal 11\n> > 15:57:10.671645 run-command.c:979                 child_exit[1] pid:45980 code:139 elapsed:5.292927\n> > 15:57:10.671658 git.c:723                         exit elapsed:5.337363 code:1\n> > 15:57:10.671663 trace2/tr2_tgt_normal.c:127       atexit elapsed:5.337368 code:1\n> > 15:57:10.672048 run-command.c:979                 child_exit[1] pid:45978 code:1 elapsed:5.345050\n> > 15:57:10.672099 git.c:819                         exit elapsed:5.355644 code:1\n> > 15:57:10.672105 trace2/tr2_tgt_normal.c:127       atexit elapsed:5.355649 code:1\n\nI couldn't seem to find an easy reproduction for this bug. Would you\nmind sharing a copy of your repository and/or a script that reproduces\nthis issue? Thanks.\n\nThanks,\nTaylor\n"}]}