FS/XFS testing framework
 help / color / mirror / Atom feed
* [PATCH] generic/558: limit the number of spawned subprocesses
@ 2023-07-11 15:51 Mikulas Patocka
  2023-07-11 23:44 ` Darrick J. Wong
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Mikulas Patocka @ 2023-07-11 15:51 UTC (permalink / raw)
  To: Eryu Guan, Zorro Lang; +Cc: fstests, Kent Overstreet

When I run the test 558 on bcachefs, it works like a fork-bomb and kills
the machine. The reason is that the "while" loop spawns "create_file"
subprocesses faster than they are able to complete.

This patch fixes the crash by limiting the number of subprocesses to 128.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

---
 tests/generic/558 |    1 +
 1 file changed, 1 insertion(+)

Index: xfstests-dev/tests/generic/558
===================================================================
--- xfstests-dev.orig/tests/generic/558
+++ xfstests-dev/tests/generic/558
@@ -48,6 +48,7 @@ echo "Create $((loop * file_per_dir)) fi
 while [ $i -lt $loop ]; do
 	create_file $SCRATCH_MNT/testdir $file_per_dir $i >>$seqres.full 2>&1 &
 	let i=$i+1
+	if [ $((i % 128)) = 0 ]; then wait; fi
 done
 wait
 


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-07-13 15:09 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-11 15:51 [PATCH] generic/558: limit the number of spawned subprocesses Mikulas Patocka
2023-07-11 23:44 ` Darrick J. Wong
2023-07-12  1:09   ` Kent Overstreet
2023-07-12  5:15     ` Amir Goldstein
2023-07-12 10:10     ` Mikulas Patocka
2023-07-12 14:52       ` Kent Overstreet
2023-07-12 17:59         ` Mikulas Patocka
2023-07-12 18:35           ` Kent Overstreet
2023-07-12  9:57   ` Mikulas Patocka
2023-07-12 22:05     ` Darrick J. Wong
2023-07-12 18:40 ` Zorro Lang
2023-07-13  1:44   ` Theodore Ts'o
2023-07-13  1:48 ` Darrick J. Wong
2023-07-13 15:08   ` Mikulas Patocka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox