From: Derrick Stolee <stolee@gmail.com>
To: Patrick Steinhardt <ps@pks.im>, git@vger.kernel.org
Cc: Shubham Kanodia <shubham.kanodia10@gmail.com>
Subject: Re: [PATCH] builtin/gc: fix crash when running `git maintenance start`
Date: Tue, 8 Oct 2024 14:30:42 -0400 [thread overview]
Message-ID: <c1271bf6-3648-4eca-916f-67a8518fe4e1@gmail.com> (raw)
In-Reply-To: <976c97081af7c62960bd71d1b70039657e7cb711.1728389731.git.ps@pks.im>
On 10/8/24 8:15 AM, Patrick Steinhardt wrote:
> It was reported on the mailing list that running `git maintenance start`
> immediately segfaults starting with b6c3f8e12c (builtin/maintenance: fix
> leak in `get_schedule_cmd()`, 2024-09-26). And indeed, this segfault is
> trivial to reproduce up to a point where one is scratching their head
> why we didn't catch this regression in our test suite.
> +test_expect_success 'start without GIT_TEST_MAINT_SCHEDULER' '
> + test_when_finished "rm -rf crontab.log script repo" &&
> + mkdir script &&
> + write_script script/crontab <<-EOF &&
> + echo "\$*" >>"$(pwd)"/crontab.log
> + EOF
> + git init repo &&
> + (
> + cd repo &&
> + sane_unset GIT_TEST_MAINT_SCHEDULER &&
> + PATH="$(pwd)/../script:$PATH" git maintenance start --scheduler=crontab
> + ) &&
> + test_grep -- -l crontab.log &&
> + test_grep -- git_cron_edit_tmp crontab.log
> +'
> +
I see why we didn't catch this immediately. This is a good way to work
around this issue of "mocking" the scheduler.
Thanks for the fast response.
-Stolee
next prev parent reply other threads:[~2024-10-08 18:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-08 10:50 Bug: `git maintenance start` is likely broken in 2.47 Shubham Kanodia
2024-10-08 11:45 ` Patrick Steinhardt
2024-10-08 12:15 ` [PATCH] builtin/gc: fix crash when running `git maintenance start` Patrick Steinhardt
2024-10-08 18:30 ` Derrick Stolee [this message]
2024-10-09 2:58 ` Derrick Stolee
2024-10-09 6:28 ` Patrick Steinhardt
2024-10-08 18:33 ` Junio C Hamano
2024-10-09 23:14 ` Junio C Hamano
2024-10-10 4:54 ` Patrick Steinhardt
2024-10-10 5:10 ` Patrick Steinhardt
2024-10-09 7:08 ` [PATCH v2] " Patrick Steinhardt
2024-10-09 13:13 ` Derrick Stolee
2024-10-09 17:28 ` Junio C Hamano
2024-10-09 17:10 ` Junio C Hamano
2024-10-10 5:33 ` [PATCH v3] " Patrick Steinhardt
2024-10-10 17:09 ` Junio C Hamano
2024-10-14 4:44 ` Shubham Kanodia
2024-10-14 8:38 ` Patrick Steinhardt
2024-10-15 0:36 ` Taylor Blau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c1271bf6-3648-4eca-916f-67a8518fe4e1@gmail.com \
--to=stolee@gmail.com \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
--cc=shubham.kanodia10@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).