* [PATCH] test-lib: run EXPENSIVE tests one at a time
@ 2026-11-19 7:40 Kaartic Sivaraam
2026-11-19 10:07 ` Patrick Steinhardt
` (3 more replies)
0 siblings, 4 replies; 19+ messages in thread
From: Kaartic Sivaraam @ 2026-11-19 7:40 UTC (permalink / raw)
To: Git mailing list; +Cc: Patrick Steinhardt
Recently, we've acquired quite a few expensive test in our test suite.
For instance, these commits add several tests that require
multi-gigabytes:
- 9048b48fb (t1600-index: add expensive tests for over-long
tree paths, 2026-10-16) added tests to t1600
- 288266c11d (xdiff: use size_t for merge buffer size computations,
2026-10-16) added tests to t4300
- 55c54fd375 (apply: reject binary patches greater than MAX_APPLY_SIZE,
2026-03-25), added tests to t4141
We also have the memory hungry 5GB filtered hash-object test in t1007.
When GIT_TEST_LONG is set, "prove --jobs" happily runs several of these
at once. On the 16GB GitLab CI runners this exhausts memory: the
sanitizer jobs have been hanging in t1007 until they hit the job
timeout ever since the new EXPENSIVE tests in t1600 started running
alongside it. Running the two under a 16GB memory cap reproduces it,
with the t1007 git process getting OOM-killed.
GitHub CI runners are no exception and observe the same behaviour.
Take a lock shared by all test scripts around each EXPENSIVE test, so
only one of them runs at a time. The lock is a directory in
TEST_RESULTS_DIR, created with mkdir(1) like the existing valgrind
symlink lock. It records the holder's PID so that a lock left behind by
a script that was killed with SIGKILL gets taken over by the next
waiter. It is released after the test and its cleanup finish, and from
the EXIT trap when a script dies or is interrupted while holding it.
Cheap tests in the same scripts keep running in parallel. Only the
expensive ones wait for each other.
Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
---
In recent times, we've been noticing the sanitizer jobs (linux-leaks,
linux-reftable-leaks, linux-asan-ubsan) hang and fail with timeout in
our GitLab CI runners. On some digging, it turns out that this is
because of multiple memory hungry tests running in parallel.
So, I thought of suggesting this patch to serialize the expensive tests
at least to avoid the putting the CI runners under memory pressure.
The GitHub CI runners also observed the same behaviour.
Both CI runners are happy with this change.
GitHub: https://github.com/sivaraam/git/actions/runs/43281285339
GitLab: https://gitlab.com/gitlab-org/git/-/pipelines/3079929506
---
t/README | 4 +++-
t/test-lib.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+), 1 deletion(-)
diff --git a/t/README b/t/README
index fd7e8504b5..c156dd3af6 100644
--- a/t/README
+++ b/t/README
@@ -117,7 +117,9 @@ appropriately before running "make". Short options can be bundled, i.e.
-l::
--long-tests::
This causes additional long-running tests to be run (where
- available), for more exhaustive testing.
+ available), for more exhaustive testing. These tests can use a
+ lot of memory and disk, so only one of them runs at a time, even
+ when several test scripts run in parallel (e.g. "prove --jobs").
-r::
--run=<test-selector>::
diff --git a/t/test-lib.sh b/t/test-lib.sh
index c56654b7c5..4d29172c9d 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -784,6 +784,7 @@ die () {
# test script run with '--immediate' fails, or when the user hits
# ctrl-C, i.e. when 'test_done' is not invoked at all.
test_atexit_handler || code=$?
+ release_expensive_lock_
if test -n "$GIT_EXIT_OK"
then
exit $code
@@ -1089,6 +1090,42 @@ fail_117 () {
return 117
}
+# EXPENSIVE tests can need many gigabytes of memory or disk, so two of
+# them running at the same time under "prove --jobs" can exhaust the
+# machine. Allow only one at a time across all test scripts that share
+# this TEST_OUTPUT_DIRECTORY.
+expensive_lock_="$TEST_RESULTS_DIR/expensive.lock"
+have_expensive_lock_=
+
+acquire_expensive_lock_ () {
+ mkdir -p "$TEST_RESULTS_DIR" || return 1
+ while ! mkdir "$expensive_lock_" 2>/dev/null
+ do
+ owner=$(cat "$expensive_lock_/pid" 2>/dev/null)
+ if test -n "$owner" && ! kill -0 "$owner" 2>/dev/null
+ then
+ # The holder was killed without releasing the lock.
+ rm -rf "$expensive_lock_"
+ continue
+ fi
+ if test -z "$expensive_lock_waited_"
+ then
+ say >&3 "waiting for another EXPENSIVE test to finish"
+ expensive_lock_waited_=t
+ fi
+ sleep 1
+ done
+ expensive_lock_waited_=
+ echo $$ >"$expensive_lock_/pid"
+ have_expensive_lock_=t
+}
+
+release_expensive_lock_ () {
+ test -n "$have_expensive_lock_" || return 0
+ rm -rf "$expensive_lock_"
+ have_expensive_lock_=
+}
+
test_run_ () {
test_cleanup=:
expecting_failure=$2
@@ -1103,6 +1140,12 @@ test_run_ () {
fi
fi
+ case ",$test_prereq," in
+ *,EXPENSIVE,*)
+ acquire_expensive_lock_
+ ;;
+ esac
+
setup_malloc_check
test_eval_ "$1"
eval_ret=$?
@@ -1115,6 +1158,7 @@ test_run_ () {
test_eval_ "$test_cleanup"
teardown_malloc_check
fi
+ release_expensive_lock_
if test "$verbose" = "t" && test -n "$HARNESS_ACTIVE"
then
echo ""
---
base-commit: e1ec09b23c8e0deb21a0b95ac5996422277395d4
change-id: 20261117-ks-ci-long-test-hang-fix-008e72fd40c6
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH] test-lib: run EXPENSIVE tests one at a time
2026-11-19 7:40 [PATCH] test-lib: run EXPENSIVE tests one at a time Kaartic Sivaraam
@ 2026-11-19 10:07 ` Patrick Steinhardt
2026-11-19 17:12 ` Kaartic Sivaraam
2026-11-19 17:29 ` [PATCH v2] " Kaartic Sivaraam
` (2 subsequent siblings)
3 siblings, 1 reply; 19+ messages in thread
From: Patrick Steinhardt @ 2026-11-19 10:07 UTC (permalink / raw)
To: Kaartic Sivaraam; +Cc: Git mailing list
On Thu, Nov 19, 2026 at 01:10:31PM +0530, Kaartic Sivaraam wrote:
> Recently, we've acquired quite a few expensive test in our test suite.
s/test/tests/
> For instance, these commits add several tests that require
> multi-gigabytes:
Multi-gigabytes what?
[snip]
> In recent times, we've been noticing the sanitizer jobs (linux-leaks,
> linux-reftable-leaks, linux-asan-ubsan) hang and fail with timeout in
> our GitLab CI runners. On some digging, it turns out that this is
> because of multiple memory hungry tests running in parallel.
Yeah, our pipelines are currently a mess because of this, so I'd be
really happy to have this resolved soonish.
> diff --git a/t/test-lib.sh b/t/test-lib.sh
> index c56654b7c5..4d29172c9d 100644
> --- a/t/test-lib.sh
> +++ b/t/test-lib.sh
> @@ -1089,6 +1090,42 @@ fail_117 () {
> return 117
> }
>
> +# EXPENSIVE tests can need many gigabytes of memory or disk, so two of
s/can/may/
> +# them running at the same time under "prove --jobs" can exhaust the
I wouldn't single out `prove --jobs` here, as we know to run
concurrently without prove either via our plain Makefile or via Meson.
> +# machine. Allow only one at a time across all test scripts that share
> +# this TEST_OUTPUT_DIRECTORY.
> +expensive_lock_="$TEST_RESULTS_DIR/expensive.lock"
> +have_expensive_lock_=
> +
> +acquire_expensive_lock_ () {
> + mkdir -p "$TEST_RESULTS_DIR" || return 1
> + while ! mkdir "$expensive_lock_" 2>/dev/null
> + do
> + owner=$(cat "$expensive_lock_/pid" 2>/dev/null)
> + if test -n "$owner" && ! kill -0 "$owner" 2>/dev/null
> + then
> + # The holder was killed without releasing the lock.
> + rm -rf "$expensive_lock_"
> + continue
Okay, if the previous owner does not exist anymore we prune the lock.
Two racing processes which try to acquire the lock may race in a way
that the "/pid" file does not exist anymore because the other process
has already deleted it. But you protect against that by checking whether
we have been able to read a PID in the first place via `test -n`.
> + fi
> + if test -z "$expensive_lock_waited_"
> + then
> + say >&3 "waiting for another EXPENSIVE test to finish"
Hmm. So file descriptor 3 points to stderr or to the test output file.
And if I remember correctly, we're indeed free to write to stderr
whatever data we want without breaking the TAP format?
> + expensive_lock_waited_=t
> + fi
> + sleep 1
> + done
> + expensive_lock_waited_=
Should this be declared as a local variable?
Overall this is a rather pragmatic approach to solve the issue. I was
thinking whether it would make sense to distinguish e.g. EXPENISVE_MEM
from EXPENSIVE_DISK, and have different locks for each of those. But I
doubt adding this kind of complexity would really be worth it in the
end.
So I'm fine with the approach. Onward to green pipelines again! Well,
until the next thing breaks next week...
Thanks!
Patrick
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] test-lib: run EXPENSIVE tests one at a time
2026-11-19 10:07 ` Patrick Steinhardt
@ 2026-11-19 17:12 ` Kaartic Sivaraam
0 siblings, 0 replies; 19+ messages in thread
From: Kaartic Sivaraam @ 2026-11-19 17:12 UTC (permalink / raw)
To: Patrick Steinhardt; +Cc: Git mailing list
On 11/19/26 15:37, Patrick Steinhardt wrote:
> On Thu, Nov 19, 2026 at 01:10:31PM +0530, Kaartic Sivaraam wrote:
>> Recently, we've acquired quite a few expensive test in our test suite.
>
> s/test/tests/
Corrected it.
>
>> For instance, these commits add several tests that require
>> multi-gigabytes:
>
> Multi-gigabytes what?
>
Fixed it!
>> diff --git a/t/test-lib.sh b/t/test-lib.sh
>> index c56654b7c5..4d29172c9d 100644
>> --- a/t/test-lib.sh
>> +++ b/t/test-lib.sh
>> @@ -1089,6 +1090,42 @@ fail_117 () {
>> return 117
>> }
>>
>> +# EXPENSIVE tests can need many gigabytes of memory or disk, so two of
>
> s/can/may/
>
Done.
>> +# them running at the same time under "prove --jobs" can exhaust the
>
> I wouldn't single out `prove --jobs` here, as we know to run
> concurrently without prove either via our plain Makefile or via Meson.
>
Makes sense. Will remove the part mentioning 'prove --jobs' specifically.
>> +# machine. Allow only one at a time across all test scripts that share
>> +# this TEST_OUTPUT_DIRECTORY.
>> +expensive_lock_="$TEST_RESULTS_DIR/expensive.lock"
>> +have_expensive_lock_=
>> +
>> +acquire_expensive_lock_ () {
>> + mkdir -p "$TEST_RESULTS_DIR" || return 1
>> + while ! mkdir "$expensive_lock_" 2>/dev/null
>> + do
>> + owner=$(cat "$expensive_lock_/pid" 2>/dev/null)
>> + if test -n "$owner" && ! kill -0 "$owner" 2>/dev/null
>> + then
>> + # The holder was killed without releasing the lock.
>> + rm -rf "$expensive_lock_"
>> + continue
>
> Okay, if the previous owner does not exist anymore we prune the lock.
> Two racing processes which try to acquire the lock may race in a way
> that the "/pid" file does not exist anymore because the other process
> has already deleted it. But you protect against that by checking whether
> we have been able to read a PID in the first place via `test -n`.
Indeed. There might still be a race in the case when two racing
processes (A and B) both see the same dead PID before either acts. A
would have deleted the lock, created a new one, written its PID. B which
still holds the stale PID would proceed to delete the lock which is
actually the live lock held by A, create a new one and write its PID.
This might happen if a holder was SIGKILLed and two or more scripts were
waiting at that exact moment, so it's rare. So, I wouldn't complicate
the code to handle this. In the worst case, we'd have 2 expensive test
cases running in place of the one we intend.
>
>> + fi
>> + if test -z "$expensive_lock_waited_"
>> + then
>> + say >&3 "waiting for another EXPENSIVE test to finish"
>
> Hmm. So file descriptor 3 points to stderr or to the test output file.
> And if I remember correctly, we're indeed free to write to stderr
> whatever data we want without breaking the TAP format?
>
Yep. With no '--verbose' or '--verbose-log' flags this message would
just go to /dev/null. I suppose that will only happen when someone runs
this manually. So, hopefully that's fine.
>> + expensive_lock_waited_=t
>> + fi
>> + sleep 1
>> + done
>> + expensive_lock_waited_=
>
> Should this be declared as a local variable?
>
Sure. Will make 'owner' local too.
> Overall this is a rather pragmatic approach to solve the issue. I was
> thinking whether it would make sense to distinguish e.g. EXPENISVE_MEM
> from EXPENSIVE_DISK, and have different locks for each of those. But I
> doubt adding this kind of complexity would really be worth it in the
> end.
>
Got it. Thank you for sharing your thoughts!
> So I'm fine with the approach. Onward to green pipelines again! Well,
> until the next thing breaks next week...
>
Totally. It feels is like we're constantly fire-fighting in the CI these
days ...
--
Sivaraam
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v2] test-lib: run EXPENSIVE tests one at a time
2026-11-19 7:40 [PATCH] test-lib: run EXPENSIVE tests one at a time Kaartic Sivaraam
2026-11-19 10:07 ` Patrick Steinhardt
@ 2026-11-19 17:29 ` Kaartic Sivaraam
2026-11-19 17:33 ` Kaartic Sivaraam
` (2 more replies)
2026-11-27 17:23 ` [PATCH v3] " Kaartic Sivaraam
2026-11-28 14:57 ` [PATCH v4 0/2] test-lib: serialize EXPENSIVE tests to avoid OOM in CI Kaartic Sivaraam
3 siblings, 3 replies; 19+ messages in thread
From: Kaartic Sivaraam @ 2026-11-19 17:29 UTC (permalink / raw)
To: Git mailing list; +Cc: Patrick Steinhardt, Kaartic Sivaraam
Recently, we've acquired quite a few expensive tests in our test suite.
For instance, these commits add several tests that require
multi-gigabytes of memory:
- 9048b48fb (t1600-index: add expensive tests for over-long
tree paths, 2026-10-16) added tests to t1600
- 288266c11d (xdiff: use size_t for merge buffer size computations,
2026-10-16) added tests to t4300
- 55c54fd375 (apply: reject binary patches greater than MAX_APPLY_SIZE,
2026-03-25), added tests to t4141
We also have the memory hungry 5GB filtered hash-object test in t1007.
When GIT_TEST_LONG is set, "prove --jobs" happily runs several of these
at once. On the 16GB GitLab CI runners this exhausts memory: the
sanitizer jobs have been hanging in t1007 until they hit the job
timeout ever since the new EXPENSIVE tests in t1600 started running
alongside it. Running the two under a 16GB memory cap reproduces it,
with the t1007 git process getting OOM-killed.
GitHub CI runners are no exception and observe the same behaviour.
Take a lock shared by all test scripts around each EXPENSIVE test, so
only one of them runs at a time. The lock is a directory in
TEST_RESULTS_DIR, created with mkdir(1) like the existing valgrind
symlink lock. It records the holder's PID so that a lock left behind by
a script that was killed with SIGKILL gets taken over by the next
waiter. It is released after the test and its cleanup finish, and from
the EXIT trap when a script dies or is interrupted while holding it.
Cheap tests in the same scripts keep running in parallel. Only the
expensive ones wait for each other.
Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
---
In recent times, we've been noticing the sanitizer jobs (linux-leaks,
linux-reftable-leaks, linux-asan-ubsan) hang and fail with timeout in
our GitLab CI runners. On some digging, it turns out that this is
because of multiple memory hungry tests running in parallel.
So, I thought of suggesting this patch to serialize the expensive tests
at least to avoid the putting the CI runners under memory pressure.
The GitHub CI runners also observed the same behaviour.
Both CI runners are happy with this change.
GitHub: https://github.com/sivaraam/git/actions/runs/43281285339
GitLab: https://gitlab.com/gitlab-org/git/-/pipelines/3079929506
---
Changes in v2:
- Corrected commit messages as per Patrick's suggestions
- Tweaked the shell function comment to avoid mentioning 'prove --jobs'
- Made the owner and waiting variables local within acquire_expensive_lock_
Link to v1: https://patch.msgid.link/20261119-ks-ci-long-test-hang-fix-v1-1-45c2fff6d9f0@gmail.com
---
t/README | 4 +++-
t/test-lib.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 48 insertions(+), 1 deletion(-)
diff --git a/t/README b/t/README
index fd7e8504b5..c156dd3af6 100644
--- a/t/README
+++ b/t/README
@@ -117,7 +117,9 @@ appropriately before running "make". Short options can be bundled, i.e.
-l::
--long-tests::
This causes additional long-running tests to be run (where
- available), for more exhaustive testing.
+ available), for more exhaustive testing. These tests can use a
+ lot of memory and disk, so only one of them runs at a time, even
+ when several test scripts run in parallel (e.g. "prove --jobs").
-r::
--run=<test-selector>::
diff --git a/t/test-lib.sh b/t/test-lib.sh
index c56654b7c5..193bf06aea 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -784,6 +784,7 @@ die () {
# test script run with '--immediate' fails, or when the user hits
# ctrl-C, i.e. when 'test_done' is not invoked at all.
test_atexit_handler || code=$?
+ release_expensive_lock_
if test -n "$GIT_EXIT_OK"
then
exit $code
@@ -1089,6 +1090,43 @@ fail_117 () {
return 117
}
+# EXPENSIVE tests may need many gigabytes of memory or disk, so two of
+# them running at the same time can exhaust the machine.
+#
+# Allow only one at a time across all test scripts that share
+# this TEST_OUTPUT_DIRECTORY.
+expensive_lock_="$TEST_RESULTS_DIR/expensive.lock"
+have_expensive_lock_=
+
+acquire_expensive_lock_ () {
+ local owner waited=
+ mkdir -p "$TEST_RESULTS_DIR" || return 1
+ while ! mkdir "$expensive_lock_" 2>/dev/null
+ do
+ owner=$(cat "$expensive_lock_/pid" 2>/dev/null)
+ if test -n "$owner" && ! kill -0 "$owner" 2>/dev/null
+ then
+ # The holder was killed without releasing the lock.
+ rm -rf "$expensive_lock_"
+ continue
+ fi
+ if test -z "$waited"
+ then
+ say >&3 "waiting for another EXPENSIVE test to finish"
+ waited=t
+ fi
+ sleep 1
+ done
+ echo $$ >"$expensive_lock_/pid"
+ have_expensive_lock_=t
+}
+
+release_expensive_lock_ () {
+ test -n "$have_expensive_lock_" || return 0
+ rm -rf "$expensive_lock_"
+ have_expensive_lock_=
+}
+
test_run_ () {
test_cleanup=:
expecting_failure=$2
@@ -1103,6 +1141,12 @@ test_run_ () {
fi
fi
+ case ",$test_prereq," in
+ *,EXPENSIVE,*)
+ acquire_expensive_lock_
+ ;;
+ esac
+
setup_malloc_check
test_eval_ "$1"
eval_ret=$?
@@ -1115,6 +1159,7 @@ test_run_ () {
test_eval_ "$test_cleanup"
teardown_malloc_check
fi
+ release_expensive_lock_
if test "$verbose" = "t" && test -n "$HARNESS_ACTIVE"
then
echo ""
---
base-commit: e1ec09b23c8e0deb21a0b95ac5996422277395d4
change-id: 20261117-ks-ci-long-test-hang-fix-008e72fd40c6
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v2] test-lib: run EXPENSIVE tests one at a time
2026-11-19 17:29 ` [PATCH v2] " Kaartic Sivaraam
@ 2026-11-19 17:33 ` Kaartic Sivaraam
2026-11-20 6:28 ` Junio C Hamano
2026-11-25 19:09 ` Harald Nordgren
2 siblings, 0 replies; 19+ messages in thread
From: Kaartic Sivaraam @ 2026-11-19 17:33 UTC (permalink / raw)
To: Git mailing list; +Cc: Patrick Steinhardt
On 11/19/26 22:59, Kaartic Sivaraam wrote:
> Changes in v2:
> - Corrected commit messages as per Patrick's suggestions
> - Tweaked the shell function comment to avoid mentioning 'prove --jobs'
> - Made the owner and waiting variables local within acquire_expensive_lock_
>
> Link to v1: https://patch.msgid.link/20261119-ks-ci-long-test-hang-fix-v1-1-45c2fff6d9f0@gmail.com
I thought b4 would've included it by itself. Anyways, here's the range-diff:
1: f0664ff4ee ! 1: fbf773f39a test-lib: run EXPENSIVE tests one at a time
@@ Metadata
## Commit message ##
test-lib: run EXPENSIVE tests one at a time
- Recently, we've acquired quite a few expensive test in our
test suite.
+ Recently, we've acquired quite a few expensive tests in our
test suite.
For instance, these commits add several tests that require
- multi-gigabytes:
+ multi-gigabytes of memory:
- 9048b48fb (t1600-index: add expensive tests for over-long
tree paths, 2026-10-16) added tests to t1600
@@ t/test-lib.sh: fail_117 () {
return 117
}
-+# EXPENSIVE tests can need many gigabytes of memory or disk, so
two of
-+# them running at the same time under "prove --jobs" can exhaust the
-+# machine. Allow only one at a time across all test scripts that
share
++# EXPENSIVE tests may need many gigabytes of memory or disk, so
two of
++# them running at the same time can exhaust the machine.
++#
++# Allow only one at a time across all test scripts that share
+# this TEST_OUTPUT_DIRECTORY.
+expensive_lock_="$TEST_RESULTS_DIR/expensive.lock"
+have_expensive_lock_=
+
+acquire_expensive_lock_ () {
++ local owner waited=
+ mkdir -p "$TEST_RESULTS_DIR" || return 1
+ while ! mkdir "$expensive_lock_" 2>/dev/null
+ do
@@ t/test-lib.sh: fail_117 () {
+ rm -rf "$expensive_lock_"
+ continue
+ fi
-+ if test -z "$expensive_lock_waited_"
++ if test -z "$waited"
+ then
+ say >&3 "waiting for another EXPENSIVE test to finish"
-+ expensive_lock_waited_=t
++ waited=t
+ fi
+ sleep 1
+ done
-+ expensive_lock_waited_=
+ echo $$ >"$expensive_lock_/pid"
+ have_expensive_lock_=t
+}
--
Sivaraam
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2] test-lib: run EXPENSIVE tests one at a time
2026-11-19 17:29 ` [PATCH v2] " Kaartic Sivaraam
2026-11-19 17:33 ` Kaartic Sivaraam
@ 2026-11-20 6:28 ` Junio C Hamano
2026-11-24 13:34 ` Kaartic Sivaraam
2026-11-25 19:09 ` Harald Nordgren
2 siblings, 1 reply; 19+ messages in thread
From: Junio C Hamano @ 2026-11-20 6:28 UTC (permalink / raw)
To: Kaartic Sivaraam; +Cc: Git mailing list, Patrick Steinhardt
Kaartic Sivaraam <kaartic.sivaraam@gmail.com> writes:
> Recently, we've acquired quite a few expensive tests in our test suite.
> For instance, these commits add several tests that require
> multi-gigabytes of memory:
>
> - 9048b48fb (t1600-index: add expensive tests for over-long
> tree paths, 2026-10-16) added tests to t1600
No such commit X-<. Perhaps 89048b48fb (t1600-index: add expensive
tests for over-long tree paths, 2026-10-16).
> - 288266c11d (xdiff: use size_t for merge buffer size computations,
> 2026-10-16) added tests to t4300
>
> - 55c54fd375 (apply: reject binary patches greater than MAX_APPLY_SIZE,
> 2026-03-25), added tests to t4141
Inconsistent use of "," after the (close parentheses).
> +# EXPENSIVE tests may need many gigabytes of memory or disk, so two of
> +# them running at the same time can exhaust the machine.
> +#
> +# Allow only one at a time across all test scripts that share
> +# this TEST_OUTPUT_DIRECTORY.
> +expensive_lock_="$TEST_RESULTS_DIR/expensive.lock"
> +have_expensive_lock_=
> +
> +acquire_expensive_lock_ () {
> + local owner waited=
> + mkdir -p "$TEST_RESULTS_DIR" || return 1
> + while ! mkdir "$expensive_lock_" 2>/dev/null
> + do
> + owner=$(cat "$expensive_lock_/pid" 2>/dev/null)
> + if test -n "$owner" && ! kill -0 "$owner" 2>/dev/null
> + then
> + # The holder was killed without releasing the lock.
> + rm -rf "$expensive_lock_"
> + continue
> + fi
> + if test -z "$waited"
> + then
> + say >&3 "waiting for another EXPENSIVE test to finish"
> + waited=t
> + fi
> + sleep 1
> + done
> + echo $$ >"$expensive_lock_/pid"
> + have_expensive_lock_=t
> +}
Hmph, is the above safe when multiple processes are working with
expensive tests during normal (i.e., not involving SIGKILL)
operation, or does it still have TOCTOU race on the lock file?
* T1 holds $expensive_lock_, finishes its last EXPENSIVE test,
calls release_expensive_lock_ (rm -rf "$expensive_lock_"), and
exits.
* Waiter T2 read owner=$(cat "$expensive_lock_/pid" 2>/dev/null)
(obtaining T1's PID) just before T1 removed the directory.
* Waiter T3 runs mkdir "$expensive_lock_", succeeds, writes T3's
PID to pid, and begins its EXPENSIVE test.
* T2 now checks test -n "$owner" && ! kill -0 "$owner" 2>/dev/null
against T1's exited PID, finds that T1 is gone, runs rm -rf
"$expensive_lock_", which deletes T3's active lock. It loops,
succeeds on mkdir "$expensive_lock_", and runs its EXPENSIVE test
concurrently with T3.
Also, between the time you successfully mkdir the lock directory and
the time you leave this function, you can be killed by a signal with
INT, TERM, or HUP, for which t/test-lib.sh installs a hander to call
exit, and there is a "trap die EXIT".
You may manage to create $expensive_lock_ directory, open pid file
for writing, and then get killed before you echo $$ to the pid file
or assign 't' to have_expensive_lock_ variable.
When your die handler calls release_expensive_lock_, you would leave
with the directory behind and exit. You may not have pid file, or
the pid file may be empty. The waiting processes will not run the
kill -0 "$owner" part (because they do not know who you are that held
the lock and left before writing $$ in pid), the waiters will wait
for the mkdir to successfully create the directory that already
exists and nobody will ever remove, no?
Between the TOCTOU race allowing multiple processes entering the
expensive region and deadlocking denying everybody from entering the
expensive region, the latter is far worse, of course.
> +release_expensive_lock_ () {
> + test -n "$have_expensive_lock_" || return 0
> + rm -rf "$expensive_lock_"
> + have_expensive_lock_=
> +}
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2] test-lib: run EXPENSIVE tests one at a time
2026-11-20 6:28 ` Junio C Hamano
@ 2026-11-24 13:34 ` Kaartic Sivaraam
2026-11-25 20:21 ` Junio C Hamano
0 siblings, 1 reply; 19+ messages in thread
From: Kaartic Sivaraam @ 2026-11-24 13:34 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git mailing list, Patrick Steinhardt
On 11/20/26 11:58, Junio C Hamano wrote:
> Kaartic Sivaraam <kaartic.sivaraam@gmail.com> writes:
>
>> Recently, we've acquired quite a few expensive tests in our test suite.
>> For instance, these commits add several tests that require
>> multi-gigabytes of memory:
>>
>> - 9048b48fb (t1600-index: add expensive tests for over-long
>> tree paths, 2026-10-16) added tests to t1600
>
> No such commit X-<. Perhaps 89048b48fb (t1600-index: add expensive
> tests for over-long tree paths, 2026-10-16).
>
Indeed. Sorry about the paste-error.
>> - 288266c11d (xdiff: use size_t for merge buffer size computations,
>> 2026-10-16) added tests to t4300
>>
>> - 55c54fd375 (apply: reject binary patches greater than MAX_APPLY_SIZE,
>> 2026-03-25), added tests to t4141
>
> Inconsistent use of "," after the (close parentheses).
>
Good catch. I've fixed it.
>> +# EXPENSIVE tests may need many gigabytes of memory or disk, so two of
>> +# them running at the same time can exhaust the machine.
>> +#
>> +# Allow only one at a time across all test scripts that share
>> +# this TEST_OUTPUT_DIRECTORY.
>> +expensive_lock_="$TEST_RESULTS_DIR/expensive.lock"
>> +have_expensive_lock_=
>> +
>> +acquire_expensive_lock_ () {
>> + local owner waited=
>> + mkdir -p "$TEST_RESULTS_DIR" || return 1
>> + while ! mkdir "$expensive_lock_" 2>/dev/null
>> + do
>> + owner=$(cat "$expensive_lock_/pid" 2>/dev/null)
>> + if test -n "$owner" && ! kill -0 "$owner" 2>/dev/null
>> + then
>> + # The holder was killed without releasing the lock.
>> + rm -rf "$expensive_lock_"
>> + continue
>> + fi
>> + if test -z "$waited"
>> + then
>> + say >&3 "waiting for another EXPENSIVE test to finish"
>> + waited=t
>> + fi
>> + sleep 1
>> + done
>> + echo $$ >"$expensive_lock_/pid"
>> + have_expensive_lock_=t
>> +}
>
> Hmph, is the above safe when multiple processes are working with
> expensive tests during normal (i.e., not involving SIGKILL)
> operation, or does it still have TOCTOU race on the lock file?
>
> * T1 holds $expensive_lock_, finishes its last EXPENSIVE test,
> calls release_expensive_lock_ (rm -rf "$expensive_lock_"), and
> exits.
>
> * Waiter T2 read owner=$(cat "$expensive_lock_/pid" 2>/dev/null)
> (obtaining T1's PID) just before T1 removed the directory.
>
> * Waiter T3 runs mkdir "$expensive_lock_", succeeds, writes T3's
> PID to pid, and begins its EXPENSIVE test.
>
> * T2 now checks test -n "$owner" && ! kill -0 "$owner" 2>/dev/null
> against T1's exited PID, finds that T1 is gone, runs rm -rf
> "$expensive_lock_", which deletes T3's active lock. It loops,
> succeeds on mkdir "$expensive_lock_", and runs its EXPENSIVE test
> concurrently with T3.
>
Indeed. That is possible. I think we could tackle this by re-verifying
the owner before the removal of the leftover lockfile. Additionally
wrapping it within an additional break lock will help us to avoid the
race where two waiter threads T2 and T3 both read T1's pid just before
T1 removes it. Without the break lock, both would proceed to run the
expensive test.
Something like this on top:
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 193bf06aea..a769e10303 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1104,10 +1104,18 @@ acquire_expensive_lock_ () {
while ! mkdir "$expensive_lock_" 2>/dev/null
do
owner=$(cat "$expensive_lock_/pid" 2>/dev/null)
- if test -n "$owner" && ! kill -0 "$owner" 2>/dev/null
+ if test -n "$owner" && ! kill -0 "$owner" 2>/dev/null &&
+ mkdir "$expensive_lock_.break" 2>/dev/null
then
# The holder was killed without releasing the lock.
- rm -rf "$expensive_lock_"
+ #
+ # Another waiter may have taken it over since we
+ # looked, so only remove it if it is still the same.
+ if test "$(cat "$expensive_lock_/pid" 2>/dev/null)" = "$owner"
+ then
+ rm -rf "$expensive_lock_"
+ fi
+ rmdir "$expensive_lock_.break" 2>/dev/null
continue
fi
if test -z "$waited"
> Also, between the time you successfully mkdir the lock directory and
> the time you leave this function, you can be killed by a signal with
> INT, TERM, or HUP, for which t/test-lib.sh installs a hander to call
> exit, and there is a "trap die EXIT".
>
> You may manage to create $expensive_lock_ directory, open pid file
> for writing, and then get killed before you echo $$ to the pid file
> or assign 't' to have_expensive_lock_ variable.
>
> When your die handler calls release_expensive_lock_, you would leave
> with the directory behind and exit. You may not have pid file, or
> the pid file may be empty. The waiting processes will not run the
> kill -0 "$owner" part (because they do not know who you are that held
> the lock and left before writing $$ in pid), the waiters will wait
> for the mkdir to successfully create the directory that already
> exists and nobody will ever remove, no?
>
That's a good catch. I suppose setting the have_expensive_lock_ variable
before writing the pid to the file, the issue should be sufficiently
averted. That's because release_expensive_lock_ would proceed with
removal of the directory even if we fail to write the pid file.
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 193bf06aea..a769e10303 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1117,8 +1125,8 @@ acquire_expensive_lock_ () {
fi
sleep 1
done
- echo $$ >"$expensive_lock_/pid"
have_expensive_lock_=t
+ echo $$ >"$expensive_lock_/pid"
}
Of course, even with these the code is not foolproof and would miss the
following cases:
- kill -9 before the pid is written: a holder killed after creating
the lock but before writing its pid leaves a lock that nobody treats
as stale, so every waiter hangs.
- Signal before the flag is set: an INT, TERM or HUP landing in the
microseconds between creating the lock and setting the flag does the
same thing.
I'm not sure if we need to go down the rabbit hold of fixing those too
without actually facing those issues. I suppose it may be better to get
the jobs running with a version of the patch that includes the above
changes and look into further changes as we notice any more issues. I
would love to hear your thoughts.
> Between the TOCTOU race allowing multiple processes entering the
> expensive region and deadlocking denying everybody from entering the
> expensive region, the latter is far worse, of course.
>
Indeed.
-- Sivaraam
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v2] test-lib: run EXPENSIVE tests one at a time
2026-11-19 17:29 ` [PATCH v2] " Kaartic Sivaraam
2026-11-19 17:33 ` Kaartic Sivaraam
2026-11-20 6:28 ` Junio C Hamano
@ 2026-11-25 19:09 ` Harald Nordgren
2 siblings, 0 replies; 19+ messages in thread
From: Harald Nordgren @ 2026-11-25 19:09 UTC (permalink / raw)
To: Kaartic Sivaraam; +Cc: Git mailing list, Patrick Steinhardt
Great idea! Hopefully we can get this merged soon to unbreak the
GitHub CI pipeline.
Harald
On Wed, Nov 25, 2026 at 8:08 PM Kaartic Sivaraam
<kaartic.sivaraam@gmail.com> wrote:
>
> Recently, we've acquired quite a few expensive tests in our test suite.
> For instance, these commits add several tests that require
> multi-gigabytes of memory:
>
> - 9048b48fb (t1600-index: add expensive tests for over-long
> tree paths, 2026-10-16) added tests to t1600
>
> - 288266c11d (xdiff: use size_t for merge buffer size computations,
> 2026-10-16) added tests to t4300
>
> - 55c54fd375 (apply: reject binary patches greater than MAX_APPLY_SIZE,
> 2026-03-25), added tests to t4141
>
> We also have the memory hungry 5GB filtered hash-object test in t1007.
>
> When GIT_TEST_LONG is set, "prove --jobs" happily runs several of these
> at once. On the 16GB GitLab CI runners this exhausts memory: the
> sanitizer jobs have been hanging in t1007 until they hit the job
> timeout ever since the new EXPENSIVE tests in t1600 started running
> alongside it. Running the two under a 16GB memory cap reproduces it,
> with the t1007 git process getting OOM-killed.
>
> GitHub CI runners are no exception and observe the same behaviour.
>
> Take a lock shared by all test scripts around each EXPENSIVE test, so
> only one of them runs at a time. The lock is a directory in
> TEST_RESULTS_DIR, created with mkdir(1) like the existing valgrind
> symlink lock. It records the holder's PID so that a lock left behind by
> a script that was killed with SIGKILL gets taken over by the next
> waiter. It is released after the test and its cleanup finish, and from
> the EXIT trap when a script dies or is interrupted while holding it.
>
> Cheap tests in the same scripts keep running in parallel. Only the
> expensive ones wait for each other.
>
> Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
> ---
> In recent times, we've been noticing the sanitizer jobs (linux-leaks,
> linux-reftable-leaks, linux-asan-ubsan) hang and fail with timeout in
> our GitLab CI runners. On some digging, it turns out that this is
> because of multiple memory hungry tests running in parallel.
>
> So, I thought of suggesting this patch to serialize the expensive tests
> at least to avoid the putting the CI runners under memory pressure.
>
> The GitHub CI runners also observed the same behaviour.
>
> Both CI runners are happy with this change.
>
> GitHub: https://github.com/sivaraam/git/actions/runs/43281285339
> GitLab: https://gitlab.com/gitlab-org/git/-/pipelines/3079929506
> ---
> Changes in v2:
> - Corrected commit messages as per Patrick's suggestions
> - Tweaked the shell function comment to avoid mentioning 'prove --jobs'
> - Made the owner and waiting variables local within acquire_expensive_lock_
>
> Link to v1: https://patch.msgid.link/20261119-ks-ci-long-test-hang-fix-v1-1-45c2fff6d9f0@gmail.com
> ---
> t/README | 4 +++-
> t/test-lib.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 48 insertions(+), 1 deletion(-)
>
> diff --git a/t/README b/t/README
> index fd7e8504b5..c156dd3af6 100644
> --- a/t/README
> +++ b/t/README
> @@ -117,7 +117,9 @@ appropriately before running "make". Short options can be bundled, i.e.
> -l::
> --long-tests::
> This causes additional long-running tests to be run (where
> - available), for more exhaustive testing.
> + available), for more exhaustive testing. These tests can use a
> + lot of memory and disk, so only one of them runs at a time, even
> + when several test scripts run in parallel (e.g. "prove --jobs").
>
> -r::
> --run=<test-selector>::
> diff --git a/t/test-lib.sh b/t/test-lib.sh
> index c56654b7c5..193bf06aea 100644
> --- a/t/test-lib.sh
> +++ b/t/test-lib.sh
> @@ -784,6 +784,7 @@ die () {
> # test script run with '--immediate' fails, or when the user hits
> # ctrl-C, i.e. when 'test_done' is not invoked at all.
> test_atexit_handler || code=$?
> + release_expensive_lock_
> if test -n "$GIT_EXIT_OK"
> then
> exit $code
> @@ -1089,6 +1090,43 @@ fail_117 () {
> return 117
> }
>
> +# EXPENSIVE tests may need many gigabytes of memory or disk, so two of
> +# them running at the same time can exhaust the machine.
> +#
> +# Allow only one at a time across all test scripts that share
> +# this TEST_OUTPUT_DIRECTORY.
> +expensive_lock_="$TEST_RESULTS_DIR/expensive.lock"
> +have_expensive_lock_=
> +
> +acquire_expensive_lock_ () {
> + local owner waited=
> + mkdir -p "$TEST_RESULTS_DIR" || return 1
> + while ! mkdir "$expensive_lock_" 2>/dev/null
> + do
> + owner=$(cat "$expensive_lock_/pid" 2>/dev/null)
> + if test -n "$owner" && ! kill -0 "$owner" 2>/dev/null
> + then
> + # The holder was killed without releasing the lock.
> + rm -rf "$expensive_lock_"
> + continue
> + fi
> + if test -z "$waited"
> + then
> + say >&3 "waiting for another EXPENSIVE test to finish"
> + waited=t
> + fi
> + sleep 1
> + done
> + echo $$ >"$expensive_lock_/pid"
> + have_expensive_lock_=t
> +}
> +
> +release_expensive_lock_ () {
> + test -n "$have_expensive_lock_" || return 0
> + rm -rf "$expensive_lock_"
> + have_expensive_lock_=
> +}
> +
> test_run_ () {
> test_cleanup=:
> expecting_failure=$2
> @@ -1103,6 +1141,12 @@ test_run_ () {
> fi
> fi
>
> + case ",$test_prereq," in
> + *,EXPENSIVE,*)
> + acquire_expensive_lock_
> + ;;
> + esac
> +
> setup_malloc_check
> test_eval_ "$1"
> eval_ret=$?
> @@ -1115,6 +1159,7 @@ test_run_ () {
> test_eval_ "$test_cleanup"
> teardown_malloc_check
> fi
> + release_expensive_lock_
> if test "$verbose" = "t" && test -n "$HARNESS_ACTIVE"
> then
> echo ""
>
> ---
> base-commit: e1ec09b23c8e0deb21a0b95ac5996422277395d4
> change-id: 20261117-ks-ci-long-test-hang-fix-008e72fd40c6
>
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2] test-lib: run EXPENSIVE tests one at a time
2026-11-24 13:34 ` Kaartic Sivaraam
@ 2026-11-25 20:21 ` Junio C Hamano
2026-11-27 13:59 ` Kaartic Sivaraam
0 siblings, 1 reply; 19+ messages in thread
From: Junio C Hamano @ 2026-11-25 20:21 UTC (permalink / raw)
To: Kaartic Sivaraam; +Cc: Git mailing list, Patrick Steinhardt
Kaartic Sivaraam <kaartic.sivaraam@gmail.com> writes:
> That's a good catch. I suppose setting the have_expensive_lock_ variable
> before writing the pid to the file, the issue should be sufficiently
> averted. That's because release_expensive_lock_ would proceed with
> removal of the directory even if we fail to write the pid file.
> ...
> I'm not sure if we need to go down the rabbit hold of fixing those too
> without actually facing those issues. I suppose it may be better to get
> the jobs running with a version of the patch that includes the above
> changes and look into further changes as we notice any more issues. I
> would love to hear your thoughts.
If we open ourselves to a possible deadlock, then it will be a serious
regression. If our locking is leaky or buggy and allows multiple
processes to run simultaneously, that is the same as the status quo, so
as long as we kill the deadlock this proposed version introduces in the
updated version, I will be happy.
Thanks.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2] test-lib: run EXPENSIVE tests one at a time
2026-11-25 20:21 ` Junio C Hamano
@ 2026-11-27 13:59 ` Kaartic Sivaraam
2026-11-27 18:34 ` Junio C Hamano
0 siblings, 1 reply; 19+ messages in thread
From: Kaartic Sivaraam @ 2026-11-27 13:59 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git mailing list, Patrick Steinhardt
On 11/26/26 01:51, Junio C Hamano wrote:
> Kaartic Sivaraam <kaartic.sivaraam@gmail.com> writes:
>
>> That's a good catch. I suppose setting the have_expensive_lock_ variable
>> before writing the pid to the file, the issue should be sufficiently
>> averted. That's because release_expensive_lock_ would proceed with
>> removal of the directory even if we fail to write the pid file.
>> ...
>> I'm not sure if we need to go down the rabbit hold of fixing those too
>> without actually facing those issues. I suppose it may be better to get
>> the jobs running with a version of the patch that includes the above
>> changes and look into further changes as we notice any more issues. I
>> would love to hear your thoughts.
>
> If we open ourselves to a possible deadlock, then it will be a serious
> regression. If our locking is leaky or buggy and allows multiple
> processes to run simultaneously, that is the same as the status quo, so
> as long as we kill the deadlock this proposed version introduces in the
> updated version, I will be happy.
>
Okay. I'll try to send a v3 with another variant of this which tries to
avoid deadlocks as much as possible by using a different mechanism for
the locking. I suppose we may have to trade-off on the "only one test
runs" guarantee as a consequence.
--
Sivaraam
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v3] test-lib: run EXPENSIVE tests one at a time
2026-11-19 7:40 [PATCH] test-lib: run EXPENSIVE tests one at a time Kaartic Sivaraam
2026-11-19 10:07 ` Patrick Steinhardt
2026-11-19 17:29 ` [PATCH v2] " Kaartic Sivaraam
@ 2026-11-27 17:23 ` Kaartic Sivaraam
2026-11-27 20:46 ` Junio C Hamano
2026-11-28 14:57 ` [PATCH v4 0/2] test-lib: serialize EXPENSIVE tests to avoid OOM in CI Kaartic Sivaraam
3 siblings, 1 reply; 19+ messages in thread
From: Kaartic Sivaraam @ 2026-11-27 17:23 UTC (permalink / raw)
To: Git mailing list; +Cc: Harald Nordgren, Kaartic Sivaraam
Recently, we've acquired quite a few expensive tests in our test suite.
For instance, these commits add several tests that require
multi-gigabytes of memory:
- 89048b48fb (t1600-index: add expensive tests for over-long
tree paths, 2026-10-16) added tests to t1600
- 288266c11d (xdiff: use size_t for merge buffer size computations,
2026-10-16) added tests to t4300
- 55c54fd375 (apply: reject binary patches greater than MAX_APPLY_SIZE,
2026-03-25) added tests to t4141
We also have the memory hungry 5GB filtered hash-object test in t1007.
When GIT_TEST_LONG is set, "prove --jobs" happily runs several of these
at once. On the 16GB GitLab CI runners this exhausts memory: the
sanitizer jobs have been hanging in t1007 until they hit the job
timeout ever since the new EXPENSIVE tests in t1600 started running
alongside it. Running the two under a 16GB memory cap reproduces it,
with the t1007 git process getting OOM-killed.
GitHub CI runners are no exception and observe the same behaviour.
Take a lock shared by all test scripts around each EXPENSIVE test, so
only one of them runs at a time. Cheap tests in the same scripts keep
running in parallel. Only the expensive ones wait for each other.
The lock is a file in TEST_RESULTS_DIR holding its owner's PID. A
script writes its PID to a file of its own and hard links it into place
with ln(1). Like mkdir(1), that is atomic and fails if the lock exists,
but the lock never exists without its owner recorded in it.
The lock is released after the test and its cleanup finish, and from
the EXIT trap. A lock whose owner is gone was left by a killed script,
and a waiter removes it after re-reading it, so that a lock another
waiter has just taken is left alone. Two waiters clearing the same
stale lock at once may let two expensive tests run together, which is
rare and better than hanging. If the lock cannot be created although
nobody holds it, e.g. without hard link support, the test runs anyway.
Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
---
In recent times, we've been noticing the sanitizer jobs (linux-leaks,
linux-reftable-leaks, linux-asan-ubsan) hang and fail with timeout in
our GitLab CI runners. On some digging, it turns out that this is
because of multiple memory hungry tests running in parallel.
So, I thought of suggesting this patch to serialize the expensive tests
at least to avoid the putting the CI runners under memory pressure.
The GitHub CI runners also observed the same behaviour.
Both CI runners are happy with this change.
GitHub: https://github.com/sivaraam/git/actions/runs/43281285339
GitLab: https://gitlab.com/gitlab-org/git/-/pipelines/3079929506
---
Changes in v3:
- Fixed issues in the commit message as pointed out by Junio.
- Fixed a race, pointed out in review, where a waiter could remove a
lock another script had just taken, letting two EXPENSIVE tests run
at once. A waiter now re-reads the owner and only removes the lock
if it still names the same dead process.
- Fixed a deadlock where a script killed between creating the lock and
recording its PID left a lock that nobody would ever remove. The lock
is now a hard link to a file that already holds the PID, so it never
exists without an owner.
- A lock that names the waiter's own PID (left by a dead holder whose
PID was reused) is now treated as stale instead of waited on forever.
- If the lock cannot be created although nobody holds it (no hard
links, read-only or full disk), the test runs without it instead of
waiting forever.
- Rewrote the lock part of the commit message for the new scheme.
- Link to v2: https://patch.msgid.link/20261119-ks-ci-long-test-hang-fix-v2-1-37011c08380d@gmail.com
Changes in v2:
- Corrected commit messages as per Patrick's suggestions
- Tweaked the shell function comment to avoid mentioning 'prove --jobs'
- Made the owner and waiting variables local within acquire_expensive_lock_
- Link to v1: https://patch.msgid.link/20261119-ks-ci-long-test-hang-fix-v1-1-45c2fff6d9f0@gmail.com
Range-diff vs. v2
1: 7152a81bdc ! 1: fd87caa359 test-lib: run EXPENSIVE tests one at a time
@@ Commit message
For instance, these commits add several tests that require
multi-gigabytes of memory:
- - 9048b48fb (t1600-index: add expensive tests for over-long
+ - 89048b48fb (t1600-index: add expensive tests for over-long
tree paths, 2026-10-16) added tests to t1600
- 288266c11d (xdiff: use size_t for merge buffer size computations,
2026-10-16) added tests to t4300
- 55c54fd375 (apply: reject binary patches greater than MAX_APPLY_SIZE,
- 2026-03-25), added tests to t4141
+ 2026-03-25) added tests to t4141
We also have the memory hungry 5GB filtered hash-object test in t1007.
@@ Commit message
GitHub CI runners are no exception and observe the same behaviour.
Take a lock shared by all test scripts around each EXPENSIVE test, so
- only one of them runs at a time. The lock is a directory in
- TEST_RESULTS_DIR, created with mkdir(1) like the existing valgrind
- symlink lock. It records the holder's PID so that a lock left behind by
- a script that was killed with SIGKILL gets taken over by the next
- waiter. It is released after the test and its cleanup finish, and from
- the EXIT trap when a script dies or is interrupted while holding it.
+ only one of them runs at a time. Cheap tests in the same scripts keep
+ running in parallel. Only the expensive ones wait for each other.
- Cheap tests in the same scripts keep running in parallel. Only the
- expensive ones wait for each other.
+ The lock is a file in TEST_RESULTS_DIR holding its owner's PID. A
+ script writes its PID to a file of its own and hard links it into place
+ with ln(1). Like mkdir(1), that is atomic and fails if the lock exists,
+ but the lock never exists without its owner recorded in it.
+
+ The lock is released after the test and its cleanup finish, and from
+ the EXIT trap. A lock whose owner is gone was left by a killed script,
+ and a waiter removes it after re-reading it, so that a lock another
+ waiter has just taken is left alone. Two waiters clearing the same
+ stale lock at once may let two expensive tests run together, which is
+ rare and better than hanging. If the lock cannot be created although
+ nobody holds it, e.g. without hard link support, the test runs anyway.
Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
@@ t/README: appropriately before running "make". Short options can be bundled, i.e
This causes additional long-running tests to be run (where
- available), for more exhaustive testing.
+ available), for more exhaustive testing. These tests can use a
-+ lot of memory and disk, so only one of them runs at a time, even
++ lot of memory, so only one of them runs at a time, even
+ when several test scripts run in parallel (e.g. "prove --jobs").
++ They take turns through a lock file, "expensive.lock" in the
++ test-results directory. A lock left behind by a killed test
++ script is cleared by the next one that needs it. If the lock
++ cannot be created at all, the test runs anyway.
-r::
--run=<test-selector>::
@@ t/test-lib.sh: die () {
# ctrl-C, i.e. when 'test_done' is not invoked at all.
test_atexit_handler || code=$?
+ release_expensive_lock_
++ test -z "$expensive_lock_" || rm -f "$expensive_lock_.$$"
if test -n "$GIT_EXIT_OK"
then
exit $code
@@ t/test-lib.sh: fail_117 () {
return 117
}
-+# EXPENSIVE tests may need many gigabytes of memory or disk, so two of
-+# them running at the same time can exhaust the machine.
++# EXPENSIVE tests may need many gigabytes of memory, so two of them
++# running at the same time can exhaust the machine.
+#
+# Allow only one at a time across all test scripts that share
+# this TEST_OUTPUT_DIRECTORY.
@@ t/test-lib.sh: fail_117 () {
+have_expensive_lock_=
+
+acquire_expensive_lock_ () {
-+ local owner waited=
++ local owner waited= tmp="$expensive_lock_.$$" misses=0
+ mkdir -p "$TEST_RESULTS_DIR" || return 1
-+ while ! mkdir "$expensive_lock_" 2>/dev/null
++ # The lock is a hard link to a file that already holds our PID, so
++ # it never exists without its owner recorded in it. Remove any
++ # $tmp left by a dead process with our PID first: it may still be
++ # linked to that process's lock, which writing to it would empty.
++ rm -f "$tmp"
++ echo $$ >"$tmp" || return 1
++ while ! ln "$tmp" "$expensive_lock_" 2>/dev/null
+ do
-+ owner=$(cat "$expensive_lock_/pid" 2>/dev/null)
-+ if test -n "$owner" && ! kill -0 "$owner" 2>/dev/null
++ if ! test -f "$expensive_lock_"
++ then
++ # Nobody holds the lock, yet we cannot create it (no
++ # hard links, disk full, ...). Retry in case it was
++ # just released, then run anyway rather than wait
++ # forever.
++ misses=$((misses + 1))
++ test $misses -lt 3 && continue
++ say >&3 "cannot take the EXPENSIVE lock, running anyway"
++ rm -f "$tmp"
++ return 0
++ fi
++ misses=0
++ owner=$(cat "$expensive_lock_" 2>/dev/null)
++ # A lock carrying our own PID was left by a dead holder whose
++ # PID we were given again; we know we do not hold it.
++ if test -n "$owner" &&
++ { test "$owner" = $$ || ! kill -0 "$owner" 2>/dev/null; }
+ then
+ # The holder was killed without releasing the lock.
-+ rm -rf "$expensive_lock_"
++ #
++ # Another waiter may have taken it over since we
++ # looked, so only remove it if it is still the same.
++ if test "$(cat "$expensive_lock_" 2>/dev/null)" = "$owner"
++ then
++ rm -f "$expensive_lock_"
++ fi
+ continue
+ fi
+ if test -z "$waited"
@@ t/test-lib.sh: fail_117 () {
+ fi
+ sleep 1
+ done
-+ echo $$ >"$expensive_lock_/pid"
+ have_expensive_lock_=t
++ rm -f "$tmp"
+}
+
+release_expensive_lock_ () {
+ test -n "$have_expensive_lock_" || return 0
-+ rm -rf "$expensive_lock_"
++ rm -f "$expensive_lock_"
+ have_expensive_lock_=
+}
+
---
t/README | 8 ++++++-
t/test-lib.sh | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 81 insertions(+), 1 deletion(-)
diff --git a/t/README b/t/README
index fd7e8504b5..824783acfa 100644
--- a/t/README
+++ b/t/README
@@ -117,7 +117,13 @@ appropriately before running "make". Short options can be bundled, i.e.
-l::
--long-tests::
This causes additional long-running tests to be run (where
- available), for more exhaustive testing.
+ available), for more exhaustive testing. These tests can use a
+ lot of memory, so only one of them runs at a time, even
+ when several test scripts run in parallel (e.g. "prove --jobs").
+ They take turns through a lock file, "expensive.lock" in the
+ test-results directory. A lock left behind by a killed test
+ script is cleared by the next one that needs it. If the lock
+ cannot be created at all, the test runs anyway.
-r::
--run=<test-selector>::
diff --git a/t/test-lib.sh b/t/test-lib.sh
index c56654b7c5..916ec2d7d1 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -784,6 +784,8 @@ die () {
# test script run with '--immediate' fails, or when the user hits
# ctrl-C, i.e. when 'test_done' is not invoked at all.
test_atexit_handler || code=$?
+ release_expensive_lock_
+ test -z "$expensive_lock_" || rm -f "$expensive_lock_.$$"
if test -n "$GIT_EXIT_OK"
then
exit $code
@@ -1089,6 +1091,71 @@ fail_117 () {
return 117
}
+# EXPENSIVE tests may need many gigabytes of memory, so two of them
+# running at the same time can exhaust the machine.
+#
+# Allow only one at a time across all test scripts that share
+# this TEST_OUTPUT_DIRECTORY.
+expensive_lock_="$TEST_RESULTS_DIR/expensive.lock"
+have_expensive_lock_=
+
+acquire_expensive_lock_ () {
+ local owner waited= tmp="$expensive_lock_.$$" misses=0
+ mkdir -p "$TEST_RESULTS_DIR" || return 1
+ # The lock is a hard link to a file that already holds our PID, so
+ # it never exists without its owner recorded in it. Remove any
+ # $tmp left by a dead process with our PID first: it may still be
+ # linked to that process's lock, which writing to it would empty.
+ rm -f "$tmp"
+ echo $$ >"$tmp" || return 1
+ while ! ln "$tmp" "$expensive_lock_" 2>/dev/null
+ do
+ if ! test -f "$expensive_lock_"
+ then
+ # Nobody holds the lock, yet we cannot create it (no
+ # hard links, disk full, ...). Retry in case it was
+ # just released, then run anyway rather than wait
+ # forever.
+ misses=$((misses + 1))
+ test $misses -lt 3 && continue
+ say >&3 "cannot take the EXPENSIVE lock, running anyway"
+ rm -f "$tmp"
+ return 0
+ fi
+ misses=0
+ owner=$(cat "$expensive_lock_" 2>/dev/null)
+ # A lock carrying our own PID was left by a dead holder whose
+ # PID we were given again; we know we do not hold it.
+ if test -n "$owner" &&
+ { test "$owner" = $$ || ! kill -0 "$owner" 2>/dev/null; }
+ then
+ # The holder was killed without releasing the lock.
+ #
+ # Another waiter may have taken it over since we
+ # looked, so only remove it if it is still the same.
+ if test "$(cat "$expensive_lock_" 2>/dev/null)" = "$owner"
+ then
+ rm -f "$expensive_lock_"
+ fi
+ continue
+ fi
+ if test -z "$waited"
+ then
+ say >&3 "waiting for another EXPENSIVE test to finish"
+ waited=t
+ fi
+ sleep 1
+ done
+ have_expensive_lock_=t
+ rm -f "$tmp"
+}
+
+release_expensive_lock_ () {
+ test -n "$have_expensive_lock_" || return 0
+ rm -f "$expensive_lock_"
+ have_expensive_lock_=
+}
+
test_run_ () {
test_cleanup=:
expecting_failure=$2
@@ -1103,6 +1170,12 @@ test_run_ () {
fi
fi
+ case ",$test_prereq," in
+ *,EXPENSIVE,*)
+ acquire_expensive_lock_
+ ;;
+ esac
+
setup_malloc_check
test_eval_ "$1"
eval_ret=$?
@@ -1115,6 +1188,7 @@ test_run_ () {
test_eval_ "$test_cleanup"
teardown_malloc_check
fi
+ release_expensive_lock_
if test "$verbose" = "t" && test -n "$HARNESS_ACTIVE"
then
echo ""
---
base-commit: acba8bf9753134d9bde89f94369f775838a8c5fe
change-id: 20261117-ks-ci-long-test-hang-fix-008e72fd40c6
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v2] test-lib: run EXPENSIVE tests one at a time
2026-11-27 13:59 ` Kaartic Sivaraam
@ 2026-11-27 18:34 ` Junio C Hamano
0 siblings, 0 replies; 19+ messages in thread
From: Junio C Hamano @ 2026-11-27 18:34 UTC (permalink / raw)
To: Kaartic Sivaraam; +Cc: Git mailing list, Patrick Steinhardt
Kaartic Sivaraam <kaartic.sivaraam@gmail.com> writes:
> Okay. I'll try to send a v3 with another variant of this which tries to
> avoid deadlocks as much as possible by using a different mechanism for
> the locking. I suppose we may have to trade-off on the "only one test
> runs" guarantee as a consequence.
Yeah, in other words, there is no need for such guarantee. We never
deadlock must be a strong guarantee, and it is sufficient if we make
sure that most of the time the expensive ones try not to run at the same
time.
Thanks.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v3] test-lib: run EXPENSIVE tests one at a time
2026-11-27 17:23 ` [PATCH v3] " Kaartic Sivaraam
@ 2026-11-27 20:46 ` Junio C Hamano
2026-11-28 8:06 ` Kaartic Sivaraam
0 siblings, 1 reply; 19+ messages in thread
From: Junio C Hamano @ 2026-11-27 20:46 UTC (permalink / raw)
To: Kaartic Sivaraam; +Cc: Git mailing list, Harald Nordgren
Kaartic Sivaraam <kaartic.sivaraam@gmail.com> writes:
> Recently, we've acquired quite a few expensive tests in our test suite.
> For instance, these commits add several tests that require
> multi-gigabytes of memory:
Either "multi-gigabyte" or "multiple gigabytes"?
> GitHub CI runners are no exception and observe the same behaviour.
Pedantic. You "observe" that runners "experience/suffer from/trigger".
They do not observe themselves ;-).
> diff --git a/t/test-lib.sh b/t/test-lib.sh
> index c56654b7c5..916ec2d7d1 100644
> --- a/t/test-lib.sh
> +++ b/t/test-lib.sh
> @@ -784,6 +784,8 @@ die () {
> # test script run with '--immediate' fails, or when the user hits
> # ctrl-C, i.e. when 'test_done' is not invoked at all.
> test_atexit_handler || code=$?
> + release_expensive_lock_
> + test -z "$expensive_lock_" || rm -f "$expensive_lock_.$$"
Minor ordering observation. Because "trap die EXIT" is registered right
after die(), well before fail_117() where release_expensive_lock_() is
defined, an early failure while sourcing test-lib-functions.sh under set
-e would enter die() while release_expensive_lock_() is still undefined.
I notice that "$expensive_lock_" already has a test -z guard here, and
that would help avoid such issues to some degree. Defining the lock
variables and helpers above die() (or guarding the call) would close
that small window.
> +acquire_expensive_lock_ () {
> + local owner waited= tmp="$expensive_lock_.$$" misses=0
> + mkdir -p "$TEST_RESULTS_DIR" || return 1
> + # The lock is a hard link to a file that already holds our PID, so
> + # it never exists without its owner recorded in it. Remove any
> + # $tmp left by a dead process with our PID first: it may still be
> + # linked to that process's lock, which writing to it would empty.
> + rm -f "$tmp"
> + echo $$ >"$tmp" || return 1
This pre-cleanup and hard-link scheme is neat. Removing any leftover
"$tmp" before writing "$$" keeps us from truncating the inode of a stale
lock still hard-linked to an old "$tmp" from a recycled PID, and
hard-linking after writing "$$" guarantees $expensive_lock_ never exists
empty.
One minor consistency note. When ln(1) fails three times with no lock
present, acquire_expensive_lock_() prints "cannot take the EXPENSIVE
lock, running anyway" to FD 3, removes "$tmp", and returns 0.
If mkdir or redirecting to "$tmp" fails instead (say, a read-only
TEST_RESULTS_DIR or a full disk), it returns 1 silently and leaves an
empty "$tmp" behind on write failure until die() runs. Because
test_run_() ignores the return value, the test still runs anyway as
documented, though sharing the same cleanup, message, and return 0 would
keep all fallback paths consistent.
> @@ -1103,6 +1170,12 @@ test_run_ () {
> fi
> fi
>
> + case ",$test_prereq," in
> + *,EXPENSIVE,*)
> + acquire_expensive_lock_
> + ;;
> + esac
Because test_expect_success() and test_expect_failure() call test_skip()
first, skipped tests never enter test_run_(), and the chainlint dry-run
above this block runs before we take the lock. Placing the lock around
test_eval_() and outside its set -x block also keeps the polling loop
out of -x trace logs under CI --verbose-log -x, while still releasing
the lock before _error_exit() on --immediate failures.
Optional thought. A small subtest in t/t0000-basic.sh seeding a stale
expensive.lock with a dead PID or "$$" and checking that it is cleared
and released (including under --immediate) could give quick regression
coverage without any sleep delay.
Overall this is clean and well thought out.
Very nice.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v3] test-lib: run EXPENSIVE tests one at a time
2026-11-27 20:46 ` Junio C Hamano
@ 2026-11-28 8:06 ` Kaartic Sivaraam
0 siblings, 0 replies; 19+ messages in thread
From: Kaartic Sivaraam @ 2026-11-28 8:06 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git mailing list, Harald Nordgren
On 11/28/26 02:16, Junio C Hamano wrote:
> Kaartic Sivaraam <kaartic.sivaraam@gmail.com> writes:
>
>> Recently, we've acquired quite a few expensive tests in our test suite.
>> For instance, these commits add several tests that require
>> multi-gigabytes of memory:
>
> Either "multi-gigabyte" or "multiple gigabytes"?
>
Good catch. Will fix it.
>> GitHub CI runners are no exception and observe the same behaviour.
>
> Pedantic. You "observe" that runners "experience/suffer from/trigger".
> They do not observe themselves ;-).
>
Ah. Thanks for correcting my grammar. Will fix this too :-)
> Minor ordering observation. Because "trap die EXIT" is registered right
> after die(), well before fail_117() where release_expensive_lock_() is
> defined, an early failure while sourcing test-lib-functions.sh under set
> -e would enter die() while release_expensive_lock_() is still undefined.
>
> I notice that "$expensive_lock_" already has a test -z guard here, and
> that would help avoid such issues to some degree. Defining the lock
> variables and helpers above die() (or guarding the call) would close
> that small window.
>
That's an interesting one. I've defined it above die() per your suggestion.
>> +acquire_expensive_lock_ () {
>> + local owner waited= tmp="$expensive_lock_.$$" misses=0
>> + mkdir -p "$TEST_RESULTS_DIR" || return 1
>> + # The lock is a hard link to a file that already holds our PID, so
>> + # it never exists without its owner recorded in it. Remove any
>> + # $tmp left by a dead process with our PID first: it may still be
>> + # linked to that process's lock, which writing to it would empty.
>> + rm -f "$tmp"
>> + echo $$ >"$tmp" || return 1
>
> This pre-cleanup and hard-link scheme is neat. Removing any leftover
> "$tmp" before writing "$$" keeps us from truncating the inode of a stale
> lock still hard-linked to an old "$tmp" from a recycled PID, and
> hard-linking after writing "$$" guarantees $expensive_lock_ never exists
> empty.
>
> One minor consistency note. When ln(1) fails three times with no lock
> present, acquire_expensive_lock_() prints "cannot take the EXPENSIVE
> lock, running anyway" to FD 3, removes "$tmp", and returns 0.
>
> If mkdir or redirecting to "$tmp" fails instead (say, a read-only
> TEST_RESULTS_DIR or a full disk), it returns 1 silently and leaves an
> empty "$tmp" behind on write failure until die() runs. Because
> test_run_() ignores the return value, the test still runs anyway as
> documented, though sharing the same cleanup, message, and return 0 would
> keep all fallback paths consistent.
>
That's a good point. Will make the fallback paths consistent.
>> @@ -1103,6 +1170,12 @@ test_run_ () {
>> fi
>> fi
>>
>> + case ",$test_prereq," in
>> + *,EXPENSIVE,*)
>> + acquire_expensive_lock_
>> + ;;
>> + esac
>
> Because test_expect_success() and test_expect_failure() call test_skip()
> first, skipped tests never enter test_run_(), and the chainlint dry-run
> above this block runs before we take the lock. Placing the lock around
> test_eval_() and outside its set -x block also keeps the polling loop
> out of -x trace logs under CI --verbose-log -x, while still releasing
> the lock before _error_exit() on --immediate failures.
>
> Optional thought. A small subtest in t/t0000-basic.sh seeding a stale
> expensive.lock with a dead PID or "$$" and checking that it is cleared
> and released (including under --immediate) could give quick regression
> coverage without any sleep delay.
>
Let me give this a shot. I'll keep it in a separate patch so that we
could discuss it separately.
> Overall this is clean and well thought out.
>
> Very nice.
That's good to hear :-)
--
Sivaraam
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v4 0/2] test-lib: serialize EXPENSIVE tests to avoid OOM in CI
2026-11-19 7:40 [PATCH] test-lib: run EXPENSIVE tests one at a time Kaartic Sivaraam
` (2 preceding siblings ...)
2026-11-27 17:23 ` [PATCH v3] " Kaartic Sivaraam
@ 2026-11-28 14:57 ` Kaartic Sivaraam
2026-11-28 14:57 ` [PATCH v4 1/2] test-lib: run EXPENSIVE tests one at a time Kaartic Sivaraam
2026-11-28 14:58 ` [PATCH v4 2/2] t0000: test taking over and releasing the EXPENSIVE lock Kaartic Sivaraam
3 siblings, 2 replies; 19+ messages in thread
From: Kaartic Sivaraam @ 2026-11-28 14:57 UTC (permalink / raw)
To: Git mailing list; +Cc: Harald Nordgren, Junio C Hamano, Patrick Steinhardt
In recent times, we've been noticing the sanitizer jobs (linux-leaks,
linux-reftable-leaks, linux-asan-ubsan) hang and fail with timeout in
our GitLab CI runners. On some digging, it turns out that this is
because of multiple memory hungry tests running in parallel.
So, I thought of suggesting this patch to serialize the expensive tests
at least to avoid the putting the CI runners under memory pressure.
The GitHub CI runners also observed the same behaviour.
Both CI runners are happy with this change.
GitHub: https://github.com/sivaraam/git/actions/runs/46125210187/job/140918221115
GitLab: https://gitlab.com/gitlab-org/git/-/pipelines/3126154287
Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
---
Changes in v4:
- Made a few more commit messages tweaks pointed out by Junio.
- Moved release_expensive_lock_ above die() to ensure it is always
defined before die() is invoked.
- All ways of failing to take the lock now print the same message,
clean up, and run the test anyway.
- 2/2 is new. It adds a few subtests to ensure the lock cleanup
happens appropriately.
- Link to v3: https://patch.msgid.link/20261127-ks-ci-long-test-hang-fix-v3-1-91b2aac82a1c@gmail.com
Changes in v3:
- Fixed issues in the commit message as pointed out by Junio.
- Fixed a race, pointed out in review, where a waiter could remove a
lock another script had just taken, letting two EXPENSIVE tests run
at once. A waiter now re-reads the owner and only removes the lock
if it still names the same dead process.
- Fixed a deadlock where a script killed between creating the lock and
recording its PID left a lock that nobody would ever remove. The lock
is now a hard link to a file that already holds the PID, so it never
exists without an owner.
- A lock that names the waiter's own PID (left by a dead holder whose
PID was reused) is now treated as stale instead of waited on forever.
- If the lock cannot be created although nobody holds it (no hard
links, read-only or full disk), the test runs without it instead of
waiting forever.
- Rewrote the lock part of the commit message for the new scheme.
- Link to v2: https://patch.msgid.link/20261119-ks-ci-long-test-hang-fix-v2-1-37011c08380d@gmail.com
Changes in v2:
- Corrected commit messages as per Patrick's suggestions
- Tweaked the shell function comment to avoid mentioning 'prove --jobs'
- Made the owner and waiting variables local within acquire_expensive_lock_
- Link to v1: https://patch.msgid.link/20261119-ks-ci-long-test-hang-fix-v1-1-45c2fff6d9f0@gmail.com
---
Kaartic Sivaraam (2):
test-lib: run EXPENSIVE tests one at a time
t0000: test taking over and releasing the EXPENSIVE lock
t/README | 8 +++++-
t/t0000-basic.sh | 48 ++++++++++++++++++++++++++++++++
t/test-lib.sh | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 138 insertions(+), 1 deletion(-)
Range-diff versus v3:
1: 0d7635ef9f ! 1: 71b765784d test-lib: run EXPENSIVE tests one at a time
@@ Commit message
Recently, we've acquired quite a few expensive tests in our test suite.
For instance, these commits add several tests that require
- multi-gigabytes of memory:
+ multiple gigabytes of memory:
- 89048b48fb (t1600-index: add expensive tests for over-long
tree paths, 2026-10-16) added tests to t1600
@@ Commit message
alongside it. Running the two under a 16GB memory cap reproduces it,
with the t1007 git process getting OOM-killed.
- GitHub CI runners are no exception and observe the same behaviour.
+ GitHub CI runners are no exception and experience the same behaviour.
Take a lock shared by all test scripts around each EXPENSIVE test, so
only one of them runs at a time. Cheap tests in the same scripts keep
@@ Commit message
and a waiter removes it after re-reading it, so that a lock another
waiter has just taken is left alone. Two waiters clearing the same
stale lock at once may let two expensive tests run together, which is
- rare and better than hanging. If the lock cannot be created although
- nobody holds it, e.g. without hard link support, the test runs anyway.
+ rare and better than hanging. If the lock cannot be taken although
+ nobody holds it, e.g. without hard link support or on a read-only or
+ full disk, the test runs anyway.
Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
@@ t/README: appropriately before running "make". Short options can be bundled, i.e
--run=<test-selector>::
## t/test-lib.sh ##
-@@ t/test-lib.sh: die () {
+@@ t/test-lib.sh: test_missing_prereq=
+
+ test_external_has_tap=0
+
++# This function takes care of cleaning up the lock we
++# acquire in acquire_expensive_lock_. It is defined
++# up here as we refer to it in die().
++release_expensive_lock_ () {
++ test -n "$have_expensive_lock_" || return 0
++ rm -f "$expensive_lock_"
++ have_expensive_lock_=
++}
++
+ die () {
+ code=$?
+ # This is responsible for running the atexit commands even when a
# test script run with '--immediate' fails, or when the user hits
# ctrl-C, i.e. when 'test_done' is not invoked at all.
test_atexit_handler || code=$?
@@ t/test-lib.sh: fail_117 () {
+expensive_lock_="$TEST_RESULTS_DIR/expensive.lock"
+have_expensive_lock_=
+
++expensive_lock_unavailable_ () {
++ say >&3 "cannot take the EXPENSIVE lock, running anyway"
++ rm -f "$expensive_lock_.$$"
++}
++
+acquire_expensive_lock_ () {
+ local owner waited= tmp="$expensive_lock_.$$" misses=0
-+ mkdir -p "$TEST_RESULTS_DIR" || return 1
++ mkdir -p "$TEST_RESULTS_DIR" ||
++ { expensive_lock_unavailable_; return 0; }
+ # The lock is a hard link to a file that already holds our PID, so
+ # it never exists without its owner recorded in it. Remove any
+ # $tmp left by a dead process with our PID first: it may still be
+ # linked to that process's lock, which writing to it would empty.
+ rm -f "$tmp"
-+ echo $$ >"$tmp" || return 1
++ echo $$ >"$tmp" ||
++ { expensive_lock_unavailable_; return 0; }
+ while ! ln "$tmp" "$expensive_lock_" 2>/dev/null
+ do
+ if ! test -f "$expensive_lock_"
@@ t/test-lib.sh: fail_117 () {
+ # forever.
+ misses=$((misses + 1))
+ test $misses -lt 3 && continue
-+ say >&3 "cannot take the EXPENSIVE lock, running anyway"
-+ rm -f "$tmp"
++ expensive_lock_unavailable_
+ return 0
+ fi
+ misses=0
@@ t/test-lib.sh: fail_117 () {
+ have_expensive_lock_=t
+ rm -f "$tmp"
+}
-+
-+release_expensive_lock_ () {
-+ test -n "$have_expensive_lock_" || return 0
-+ rm -f "$expensive_lock_"
-+ have_expensive_lock_=
-+}
+
test_run_ () {
test_cleanup=:
-: ---------- > 2: 6ca7f04310 t0000: test taking over and releasing the EXPENSIVE lock
---
base-commit: acba8bf9753134d9bde89f94369f775838a8c5fe
change-id: 20261117-ks-ci-long-test-hang-fix-008e72fd40c6
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v4 1/2] test-lib: run EXPENSIVE tests one at a time
2026-11-28 14:57 ` [PATCH v4 0/2] test-lib: serialize EXPENSIVE tests to avoid OOM in CI Kaartic Sivaraam
@ 2026-11-28 14:57 ` Kaartic Sivaraam
2026-11-29 16:55 ` Junio C Hamano
2026-11-30 14:13 ` Christian Couder
2026-11-28 14:58 ` [PATCH v4 2/2] t0000: test taking over and releasing the EXPENSIVE lock Kaartic Sivaraam
1 sibling, 2 replies; 19+ messages in thread
From: Kaartic Sivaraam @ 2026-11-28 14:57 UTC (permalink / raw)
To: Git mailing list; +Cc: Harald Nordgren, Junio C Hamano, Patrick Steinhardt
Recently, we've acquired quite a few expensive tests in our test suite.
For instance, these commits add several tests that require
multiple gigabytes of memory:
- 89048b48fb (t1600-index: add expensive tests for over-long
tree paths, 2026-10-16) added tests to t1600
- 288266c11d (xdiff: use size_t for merge buffer size computations,
2026-10-16) added tests to t4300
- 55c54fd375 (apply: reject binary patches greater than MAX_APPLY_SIZE,
2026-03-25) added tests to t4141
We also have the memory hungry 5GB filtered hash-object test in t1007.
When GIT_TEST_LONG is set, "prove --jobs" happily runs several of these
at once. On the 16GB GitLab CI runners this exhausts memory: the
sanitizer jobs have been hanging in t1007 until they hit the job
timeout ever since the new EXPENSIVE tests in t1600 started running
alongside it. Running the two under a 16GB memory cap reproduces it,
with the t1007 git process getting OOM-killed.
GitHub CI runners are no exception and experience the same behaviour.
Take a lock shared by all test scripts around each EXPENSIVE test, so
only one of them runs at a time. Cheap tests in the same scripts keep
running in parallel. Only the expensive ones wait for each other.
The lock is a file in TEST_RESULTS_DIR holding its owner's PID. A
script writes its PID to a file of its own and hard links it into place
with ln(1). Like mkdir(1), that is atomic and fails if the lock exists,
but the lock never exists without its owner recorded in it.
The lock is released after the test and its cleanup finish, and from
the EXIT trap. A lock whose owner is gone was left by a killed script,
and a waiter removes it after re-reading it, so that a lock another
waiter has just taken is left alone. Two waiters clearing the same
stale lock at once may let two expensive tests run together, which is
rare and better than hanging. If the lock cannot be taken although
nobody holds it, e.g. without hard link support or on a read-only or
full disk, the test runs anyway.
Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
---
t/README | 8 +++++-
t/test-lib.sh | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 90 insertions(+), 1 deletion(-)
diff --git a/t/README b/t/README
index fd7e8504b5..824783acfa 100644
--- a/t/README
+++ b/t/README
@@ -117,7 +117,13 @@ appropriately before running "make". Short options can be bundled, i.e.
-l::
--long-tests::
This causes additional long-running tests to be run (where
- available), for more exhaustive testing.
+ available), for more exhaustive testing. These tests can use a
+ lot of memory, so only one of them runs at a time, even
+ when several test scripts run in parallel (e.g. "prove --jobs").
+ They take turns through a lock file, "expensive.lock" in the
+ test-results directory. A lock left behind by a killed test
+ script is cleared by the next one that needs it. If the lock
+ cannot be created at all, the test runs anyway.
-r::
--run=<test-selector>::
diff --git a/t/test-lib.sh b/t/test-lib.sh
index c56654b7c5..bfd2fc8374 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -778,12 +778,23 @@ test_missing_prereq=
test_external_has_tap=0
+# This function takes care of cleaning up the lock we
+# acquire in acquire_expensive_lock_. It is defined
+# up here as we refer to it in die().
+release_expensive_lock_ () {
+ test -n "$have_expensive_lock_" || return 0
+ rm -f "$expensive_lock_"
+ have_expensive_lock_=
+}
+
die () {
code=$?
# This is responsible for running the atexit commands even when a
# test script run with '--immediate' fails, or when the user hits
# ctrl-C, i.e. when 'test_done' is not invoked at all.
test_atexit_handler || code=$?
+ release_expensive_lock_
+ test -z "$expensive_lock_" || rm -f "$expensive_lock_.$$"
if test -n "$GIT_EXIT_OK"
then
exit $code
@@ -1089,6 +1100,71 @@ fail_117 () {
return 117
}
+# EXPENSIVE tests may need many gigabytes of memory, so two of them
+# running at the same time can exhaust the machine.
+#
+# Allow only one at a time across all test scripts that share
+# this TEST_OUTPUT_DIRECTORY.
+expensive_lock_="$TEST_RESULTS_DIR/expensive.lock"
+have_expensive_lock_=
+
+expensive_lock_unavailable_ () {
+ say >&3 "cannot take the EXPENSIVE lock, running anyway"
+ rm -f "$expensive_lock_.$$"
+}
+
+acquire_expensive_lock_ () {
+ local owner waited= tmp="$expensive_lock_.$$" misses=0
+ mkdir -p "$TEST_RESULTS_DIR" ||
+ { expensive_lock_unavailable_; return 0; }
+ # The lock is a hard link to a file that already holds our PID, so
+ # it never exists without its owner recorded in it. Remove any
+ # $tmp left by a dead process with our PID first: it may still be
+ # linked to that process's lock, which writing to it would empty.
+ rm -f "$tmp"
+ echo $$ >"$tmp" ||
+ { expensive_lock_unavailable_; return 0; }
+ while ! ln "$tmp" "$expensive_lock_" 2>/dev/null
+ do
+ if ! test -f "$expensive_lock_"
+ then
+ # Nobody holds the lock, yet we cannot create it (no
+ # hard links, disk full, ...). Retry in case it was
+ # just released, then run anyway rather than wait
+ # forever.
+ misses=$((misses + 1))
+ test $misses -lt 3 && continue
+ expensive_lock_unavailable_
+ return 0
+ fi
+ misses=0
+ owner=$(cat "$expensive_lock_" 2>/dev/null)
+ # A lock carrying our own PID was left by a dead holder whose
+ # PID we were given again; we know we do not hold it.
+ if test -n "$owner" &&
+ { test "$owner" = $$ || ! kill -0 "$owner" 2>/dev/null; }
+ then
+ # The holder was killed without releasing the lock.
+ #
+ # Another waiter may have taken it over since we
+ # looked, so only remove it if it is still the same.
+ if test "$(cat "$expensive_lock_" 2>/dev/null)" = "$owner"
+ then
+ rm -f "$expensive_lock_"
+ fi
+ continue
+ fi
+ if test -z "$waited"
+ then
+ say >&3 "waiting for another EXPENSIVE test to finish"
+ waited=t
+ fi
+ sleep 1
+ done
+ have_expensive_lock_=t
+ rm -f "$tmp"
+}
+
test_run_ () {
test_cleanup=:
expecting_failure=$2
@@ -1103,6 +1179,12 @@ test_run_ () {
fi
fi
+ case ",$test_prereq," in
+ *,EXPENSIVE,*)
+ acquire_expensive_lock_
+ ;;
+ esac
+
setup_malloc_check
test_eval_ "$1"
eval_ret=$?
@@ -1115,6 +1197,7 @@ test_run_ () {
test_eval_ "$test_cleanup"
teardown_malloc_check
fi
+ release_expensive_lock_
if test "$verbose" = "t" && test -n "$HARNESS_ACTIVE"
then
echo ""
--
2.56.1.911.g883d8bcb20
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v4 2/2] t0000: test taking over and releasing the EXPENSIVE lock
2026-11-28 14:57 ` [PATCH v4 0/2] test-lib: serialize EXPENSIVE tests to avoid OOM in CI Kaartic Sivaraam
2026-11-28 14:57 ` [PATCH v4 1/2] test-lib: run EXPENSIVE tests one at a time Kaartic Sivaraam
@ 2026-11-28 14:58 ` Kaartic Sivaraam
1 sibling, 0 replies; 19+ messages in thread
From: Kaartic Sivaraam @ 2026-11-28 14:58 UTC (permalink / raw)
To: Git mailing list; +Cc: Harald Nordgren, Junio C Hamano, Patrick Steinhardt
The previous commit serializes EXPENSIVE tests with a lock that a
waiter takes over when its holder was killed, and that the EXIT trap
releases when a script dies while holding it.
Add subtests checking that:
- a lock left by a dead process is taken over, held while the test
runs, and released afterwards;
- a lock carrying the script's own PID, which can only be left by a
dead holder whose PID was reused, is taken over;
- a script exiting in the middle of an EXPENSIVE test does not leave
the lock behind.
None of them has to wait, as a stale lock is cleared without polling.
Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
---
t/t0000-basic.sh | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
index 7bd1f4e7b7..1535b7aa7e 100755
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
@@ -746,6 +746,54 @@ test_expect_success 'subtest: lazy prereqs do not turn off tracing' '
test_grep "echo trace" lazy-prereq-and-tracing/err
'
+test_expect_success 'subtest: EXPENSIVE lock of a dead holder is taken over' '
+ write_sub_test_lib_test expensive-lock-dead <<-\EOF &&
+ test_expect_success EXPENSIVE "holds the lock" "
+ echo $$ >expect &&
+ test_cmp expect \"$TEST_RESULTS_DIR/expensive.lock\"
+ "
+ test_done
+ EOF
+ mkdir expensive-lock-dead/test-results &&
+ sh -c "echo \$\$" >expensive-lock-dead/test-results/expensive.lock &&
+ run_sub_test_lib_test expensive-lock-dead --long &&
+ check_sub_test_lib_test expensive-lock-dead <<-\EOF &&
+ > ok 1 - holds the lock
+ > # passed all 1 test(s)
+ > 1..1
+ EOF
+ test_path_is_missing expensive-lock-dead/test-results/expensive.lock
+'
+
+test_expect_success 'subtest: EXPENSIVE lock carrying our own PID is taken over' '
+ write_sub_test_lib_test expensive-lock-own-pid <<-\EOF &&
+ mkdir -p "$TEST_RESULTS_DIR" &&
+ echo $$ >"$TEST_RESULTS_DIR/expensive.lock"
+ test_expect_success EXPENSIVE "takes the lock" "true"
+ test_done
+ EOF
+ run_sub_test_lib_test expensive-lock-own-pid --long &&
+ check_sub_test_lib_test expensive-lock-own-pid <<-\EOF &&
+ > ok 1 - takes the lock
+ > # passed all 1 test(s)
+ > 1..1
+ EOF
+ test_path_is_missing expensive-lock-own-pid/test-results/expensive.lock
+'
+
+test_expect_success 'subtest: EXPENSIVE lock is released when exiting mid-test' '
+ write_sub_test_lib_test expensive-lock-exit <<-\EOF &&
+ test_expect_success EXPENSIVE "exits holding the lock" "
+ test_path_is_file \"$TEST_RESULTS_DIR/expensive.lock\" &&
+ exit 1
+ "
+ test_done
+ EOF
+ run_sub_test_lib_test_err expensive-lock-exit --long &&
+ test_grep "FATAL: Unexpected exit" expensive-lock-exit/out &&
+ test_path_is_missing expensive-lock-exit/test-results/expensive.lock
+'
+
test_expect_success 'subtest: tests clean up after themselves' '
write_and_run_sub_test_lib_test cleanup <<-\EOF &&
clean=no
--
2.56.1.911.g883d8bcb20
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v4 1/2] test-lib: run EXPENSIVE tests one at a time
2026-11-28 14:57 ` [PATCH v4 1/2] test-lib: run EXPENSIVE tests one at a time Kaartic Sivaraam
@ 2026-11-29 16:55 ` Junio C Hamano
2026-11-30 14:13 ` Christian Couder
1 sibling, 0 replies; 19+ messages in thread
From: Junio C Hamano @ 2026-11-29 16:55 UTC (permalink / raw)
To: Kaartic Sivaraam; +Cc: Git mailing list, Harald Nordgren, Patrick Steinhardt
Kaartic Sivaraam <kaartic.sivaraam@gmail.com> writes:
> +acquire_expensive_lock_ () {
> + local owner waited= tmp="$expensive_lock_.$$" misses=0
> + mkdir -p "$TEST_RESULTS_DIR" ||
> + { expensive_lock_unavailable_; return 0; }
> + # The lock is a hard link to a file that already holds our PID, so
> + # it never exists without its owner recorded in it. Remove any
> + # $tmp left by a dead process with our PID first: it may still be
> + # linked to that process's lock, which writing to it would empty.
> + rm -f "$tmp"
> + echo $$ >"$tmp" ||
> + { expensive_lock_unavailable_; return 0; }
> + while ! ln "$tmp" "$expensive_lock_" 2>/dev/null
> + do
Neat-o. We can try to hardlink ours, fail, notice the owner is gone,
unlink it, and try again. Another waiter may interfere while we are
doing so and take the lock, in which case we will fail to hardlink and
wait one more time, which isn't too bad.
> + if ! test -f "$expensive_lock_"
> + then
> + # Nobody holds the lock, yet we cannot create it (no
> + # hard links, disk full, ...). Retry in case it was
> + # just released, then run anyway rather than wait
> + # forever.
> + misses=$((misses + 1))
> + test $misses -lt 3 && continue
> + expensive_lock_unavailable_
> + return 0
> + fi
> + misses=0
> + owner=$(cat "$expensive_lock_" 2>/dev/null)
> + # A lock carrying our own PID was left by a dead holder whose
> + # PID we were given again; we know we do not hold it.
> + if test -n "$owner" &&
> + { test "$owner" = $$ || ! kill -0 "$owner" 2>/dev/null; }
> + then
> + # The holder was killed without releasing the lock.
> + #
> + # Another waiter may have taken it over since we
> + # looked, so only remove it if it is still the same.
> + if test "$(cat "$expensive_lock_" 2>/dev/null)" = "$owner"
> + then
> + rm -f "$expensive_lock_"
> + fi
> + continue
> + fi
> + if test -z "$waited"
> + then
> + say >&3 "waiting for another EXPENSIVE test to finish"
> + waited=t
> + fi
> + sleep 1
> + done
> + have_expensive_lock_=t
> + rm -f "$tmp"
> +}
Very nicely done.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v4 1/2] test-lib: run EXPENSIVE tests one at a time
2026-11-28 14:57 ` [PATCH v4 1/2] test-lib: run EXPENSIVE tests one at a time Kaartic Sivaraam
2026-11-29 16:55 ` Junio C Hamano
@ 2026-11-30 14:13 ` Christian Couder
1 sibling, 0 replies; 19+ messages in thread
From: Christian Couder @ 2026-11-30 14:13 UTC (permalink / raw)
To: Kaartic Sivaraam
Cc: Git mailing list, Harald Nordgren, Junio C Hamano,
Patrick Steinhardt
On Sat, Nov 28, 2026 at 3:59 PM Kaartic Sivaraam
<kaartic.sivaraam@gmail.com> wrote:
[...]
> Take a lock shared by all test scripts around each EXPENSIVE test, so
> only one of them runs at a time. Cheap tests in the same scripts keep
> running in parallel. Only the expensive ones wait for each other.
This looks good to me and we might want to merge this soon to unblock
CI, but here are still some optional suggestions for a v5 or a
separate hardening or polishing series.
> +# This function takes care of cleaning up the lock we
> +# acquire in acquire_expensive_lock_. It is defined
> +# up here as we refer to it in die().
> +release_expensive_lock_ () {
> + test -n "$have_expensive_lock_" || return 0
> + rm -f "$expensive_lock_"
> + have_expensive_lock_=
> +}
Something like the following would check whose lock it is before releasing it:
------------
# Remove the lock only if it still names $1 as its owner, so that
# a lock someone else has just taken is left alone.
remove_expensive_lock_owned_by_ () {
test "$(cat "$expensive_lock_" 2>/dev/null)" = "$1" &&
rm -f "$expensive_lock_"
}
release_expensive_lock_ () {
test -n "$have_expensive_lock_" || return 0
remove_expensive_lock_owned_by_ $$
have_expensive_lock_=
}
------------
This would limit the damage in the case (mentioned in the commit
message) where two waiters clearing the same stale lock at once let
two expensive tests run together:
- waiters A and B both see a stale lock,
- A removes it and takes the lock, then B, which re-checked before A
removed it, removes A's lock and takes it too,
- both run, and when A finishes it deletes B's lock, so C starts while
B is still running.
With the ownership check, A leaves B's lock alone, so the damage stays
at two tests instead of growing.
[...]
> +acquire_expensive_lock_ () {
> + local owner waited= tmp="$expensive_lock_.$$" misses=0
> + mkdir -p "$TEST_RESULTS_DIR" ||
> + { expensive_lock_unavailable_; return 0; }
> + # The lock is a hard link to a file that already holds our PID, so
> + # it never exists without its owner recorded in it. Remove any
> + # $tmp left by a dead process with our PID first: it may still be
> + # linked to that process's lock, which writing to it would empty.
> + rm -f "$tmp"
> + echo $$ >"$tmp" ||
> + { expensive_lock_unavailable_; return 0; }
> + while ! ln "$tmp" "$expensive_lock_" 2>/dev/null
> + do
> + if ! test -f "$expensive_lock_"
> + then
> + # Nobody holds the lock, yet we cannot create it (no
> + # hard links, disk full, ...). Retry in case it was
> + # just released, then run anyway rather than wait
> + # forever.
> + misses=$((misses + 1))
> + test $misses -lt 3 && continue
> + expensive_lock_unavailable_
> + return 0
> + fi
> + misses=0
> + owner=$(cat "$expensive_lock_" 2>/dev/null)
> + # A lock carrying our own PID was left by a dead holder whose
> + # PID we were given again; we know we do not hold it.
> + if test -n "$owner" &&
> + { test "$owner" = $$ || ! kill -0 "$owner" 2>/dev/null; }
> + then
> + # The holder was killed without releasing the lock.
> + #
> + # Another waiter may have taken it over since we
> + # looked, so only remove it if it is still the same.
> + if test "$(cat "$expensive_lock_" 2>/dev/null)" = "$owner"
> + then
> + rm -f "$expensive_lock_"
> + fi
Here we could both reuse the remove_expensive_lock_owned_by_() helper
and be a bit more verbose, for example:
# Another waiter may have taken it over since we
# looked, so only remove it if it is still the same.
if remove_expensive_lock_owned_by_ "$owner"
then
say >&3 "removing stale EXPENSIVE lock left by PID $owner"
fi
The extra message might help when reading the logs of a run where a
script was killed.
> + continue
> + fi
> + if test -z "$waited"
> + then
> + say >&3 "waiting for another EXPENSIVE test to finish"
This and the message in expensive_lock_unavailable_() use `say >&3`
which prints to /dev/null when `-v` or `--verbose-log` is not passed.
This is not an issue for CI runs as `--verbose-log` is used then. But
someone running tests locally without `-v` might wonder why their
local run is stuck.
With Meson, or when running scripts or `prove` directly, nothing
cleans test-results/. So a lock left behind by SIGKILL (including the
OOM killer) can still be there days later. The same PID could then be
reused by a long-running process of the same user. This would result
in the script silently waiting forever.
In such a case, printing something even if `-v` or `--verbose-log` is
not used, would likely make it much easier to understand what's going
on.
So I would suggest sending this message, as well as the "running
anyway" and "removing stale" messages, to stderr instead. There are
only a few dozen EXPENSIVE tests, so this should not add much output.
The subtests in 2/2 that go through the stale lock removal would then
need to expect that message on stderr though.
The message would also help even more if it included the holder's PID,
for example like "waiting for EXPENSIVE lock held by PID 1234".
> + waited=t
> + fi
> + sleep 1
> + done
> + have_expensive_lock_=t
> + rm -f "$tmp"
> +}
Thanks.
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2026-11-30 14:14 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19 7:40 [PATCH] test-lib: run EXPENSIVE tests one at a time Kaartic Sivaraam
2026-11-19 10:07 ` Patrick Steinhardt
2026-11-19 17:12 ` Kaartic Sivaraam
2026-11-19 17:29 ` [PATCH v2] " Kaartic Sivaraam
2026-11-19 17:33 ` Kaartic Sivaraam
2026-11-20 6:28 ` Junio C Hamano
2026-11-24 13:34 ` Kaartic Sivaraam
2026-11-25 20:21 ` Junio C Hamano
2026-11-27 13:59 ` Kaartic Sivaraam
2026-11-27 18:34 ` Junio C Hamano
2026-11-25 19:09 ` Harald Nordgren
2026-11-27 17:23 ` [PATCH v3] " Kaartic Sivaraam
2026-11-27 20:46 ` Junio C Hamano
2026-11-28 8:06 ` Kaartic Sivaraam
2026-11-28 14:57 ` [PATCH v4 0/2] test-lib: serialize EXPENSIVE tests to avoid OOM in CI Kaartic Sivaraam
2026-11-28 14:57 ` [PATCH v4 1/2] test-lib: run EXPENSIVE tests one at a time Kaartic Sivaraam
2026-11-29 16:55 ` Junio C Hamano
2026-11-30 14:13 ` Christian Couder
2026-11-28 14:58 ` [PATCH v4 2/2] t0000: test taking over and releasing the EXPENSIVE lock Kaartic Sivaraam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox