Skip to content

Commit bf09c2c

Browse files
authored
Wait for background process end in libfuzzer workflow (#10177)
We have to ensure the background fuzzer processes have finished before inspecting the resulting fuzzing corpus, otherwise there can be errors because of concurrent modification of files.
1 parent 2a99f01 commit bf09c2c

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/libfuzzer.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,16 @@ jobs:
256256
257257
find db/corpus -mindepth 1 -maxdepth 1 | wc -l
258258
259+
# Check that the server is still alive.
260+
psql -c "select 1"
261+
262+
# End the background fuzzing processes before we inspect the resulting
263+
# fuzzing corpus, otherwise there can be errors because of concurrent
264+
# modifications.
265+
pg_ctl stop
266+
pg_ctl start
267+
wait ||:
268+
259269
fn="ts_read_compressed_data_directory('${{ matrix.case.algo }}',
260270
'${{ matrix.case.pgtype }}', 'corpus', '${{ matrix.case.bulk }}')"
261271
@@ -281,9 +291,6 @@ jobs:
281291
# Shouldn't have any WARNINGS in the log.
282292
if grep -F "] WARNING: " postmaster.log; then exit 1; fi
283293
284-
# Check that the server is still alive.
285-
psql -c "select 1"
286-
287294
- name: Collect the logs
288295
if: always()
289296
id: collectlogs

0 commit comments

Comments
 (0)