Skip to content

Commit 735b8e0

Browse files
chore[fuzz]: more jobs (#6879)
<!-- Thank you for submitting a pull request! We appreciate your time and effort. Please make sure to provide enough information so that we can review your pull request. The Summary and Testing sections below contain guidance on what to include. --> ## Summary <!-- If this PR is related to a tracked effort, please link to the relevant issue here (e.g., `Closes: #123`). Otherwise, feel free to ignore / delete this. In this section, please: 1. Explain the rationale for this change. 2. Summarize the changes included in this PR. A general rule of thumb is that larger PRs should have larger summaries. If there are a lot of changes, please help us review the code by explaining what was changed and why. If there is an issue or discussion attached, there is no need to duplicate all the details, but clarity is always preferred over brevity. --> Closes: #000 <!-- ## API Changes Uncomment this section if there are any user-facing changes. Consider whether the change affects users in one of the following ways: 1. Breaks public APIs in some way. 2. Changes the underlying behavior of one of the engine integrations. 3. Should some documentation be updated to reflect this change? If a public API is changed in a breaking manner, make sure to add the appropriate label. You can run `./scripts/public-api.sh` locally to see if there are any public API changes (and this also runs in our CI). --> ## Testing <!-- Please describe how this change was tested. Here are some common categories for testing in Vortex: 1. Verifying existing behavior is maintained. 2. Verifying new behavior and functionality works correctly. 3. Serialization compatibility (backwards and forwards) should be maintained or explicitly broken. --> --------- Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
1 parent 557a2c8 commit 735b8e0

2 files changed

Lines changed: 36 additions & 18 deletions

File tree

.github/workflows/fuzz.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ jobs:
2121
uses: ./.github/workflows/run-fuzzer.yml
2222
with:
2323
fuzz_target: file_io
24-
family: "m8g.large"
25-
image: "ubuntu24-full-arm64"
24+
jobs: 16
2625
secrets:
2726
R2_FUZZ_ACCESS_KEY_ID: ${{ secrets.R2_FUZZ_ACCESS_KEY_ID }}
2827
R2_FUZZ_SECRET_ACCESS_KEY: ${{ secrets.R2_FUZZ_SECRET_ACCESS_KEY }}
@@ -72,8 +71,7 @@ jobs:
7271
uses: ./.github/workflows/run-fuzzer.yml
7372
with:
7473
fuzz_target: array_ops
75-
family: "m8g.large"
76-
image: "ubuntu24-full-arm64"
74+
jobs: 16
7775
secrets:
7876
R2_FUZZ_ACCESS_KEY_ID: ${{ secrets.R2_FUZZ_ACCESS_KEY_ID }}
7977
R2_FUZZ_SECRET_ACCESS_KEY: ${{ secrets.R2_FUZZ_SECRET_ACCESS_KEY }}
@@ -109,8 +107,7 @@ jobs:
109107
uses: ./.github/workflows/run-fuzzer.yml
110108
with:
111109
fuzz_target: compress_roundtrip
112-
family: "m8g.large"
113-
image: "ubuntu24-full-arm64"
110+
jobs: 16
114111
secrets:
115112
R2_FUZZ_ACCESS_KEY_ID: ${{ secrets.R2_FUZZ_ACCESS_KEY_ID }}
116113
R2_FUZZ_SECRET_ACCESS_KEY: ${{ secrets.R2_FUZZ_SECRET_ACCESS_KEY }}
@@ -123,9 +120,9 @@ jobs:
123120
uses: ./.github/workflows/run-fuzzer.yml
124121
with:
125122
fuzz_target: compress_gpu
126-
family: "g4dn"
127-
image: "ubuntu24-gpu-x64"
123+
runner: gpu
128124
extra_features: "cuda"
125+
jobs: 8
129126
secrets:
130127
R2_FUZZ_ACCESS_KEY_ID: ${{ secrets.R2_FUZZ_ACCESS_KEY_ID }}
131128
R2_FUZZ_SECRET_ACCESS_KEY: ${{ secrets.R2_FUZZ_SECRET_ACCESS_KEY }}

.github/workflows/run-fuzzer.yml

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ on:
1212
required: false
1313
type: number
1414
default: 7200
15-
family:
16-
description: "Runner family (e.g., m8g.large for CPU, g5+g4dn+g6 for GPU)"
15+
runner:
16+
description: "Runner name from .github-private runs-on.yml (e.g., arm64-medium, gpu)"
1717
required: false
1818
type: string
19-
default: "m8g.large"
20-
image:
21-
description: "Runner image (e.g., ubuntu24-full-arm64, ubuntu24-gpu-x64)"
22-
required: false
23-
type: string
24-
default: "ubuntu24-full-arm64"
19+
default: "arm64-medium"
2520
extra_features:
2621
description: "Extra cargo features to enable (e.g., cuda)"
2722
required: false
2823
type: string
2924
default: ""
25+
jobs:
26+
description: "Number of parallel fuzzing jobs (libfuzzer -fork=N). Set to match available vCPUs."
27+
required: false
28+
type: number
29+
default: 1
3030
outputs:
3131
crashes_found:
3232
description: "Whether crashes were found"
@@ -52,7 +52,7 @@ jobs:
5252
timeout-minutes: 230 # almost 4 hours
5353
runs-on: >-
5454
${{ github.repository == 'vortex-data/vortex'
55-
&& format('runs-on={0}/runner=arm64-medium/disk=large/tag={1}-fuzz', github.run_id, inputs.fuzz_target)
55+
&& format('runs-on={0}/runner={1}/disk=large/tag={2}-fuzz', github.run_id, inputs.runner, inputs.fuzz_target)
5656
|| 'ubuntu-latest' }}
5757
outputs:
5858
crashes_found: ${{ steps.check.outputs.crashes_found }}
@@ -108,11 +108,15 @@ jobs:
108108
if [ -n "${{ inputs.extra_features }}" ]; then
109109
FEATURES_FLAG="--features ${{ inputs.extra_features }}"
110110
fi
111+
FORK_FLAG=""
112+
if [ "${{ inputs.jobs }}" -gt 1 ]; then
113+
FORK_FLAG="-fork=${{ inputs.jobs }}"
114+
fi
111115
RUSTFLAGS="--cfg vortex_nightly" RUST_BACKTRACE=1 \
112116
cargo +$NIGHTLY_TOOLCHAIN fuzz run --release --debug-assertions \
113117
$FEATURES_FLAG \
114118
${{ inputs.fuzz_target }} -- \
115-
-max_total_time=${{ inputs.max_time }} -rss_limit_mb=0 \
119+
$FORK_FLAG -max_total_time=${{ inputs.max_time }} -rss_limit_mb=0 \
116120
2>&1 | tee fuzz_output.log
117121
continue-on-error: true
118122

@@ -137,6 +141,23 @@ jobs:
137141
echo "No crashes found"
138142
fi
139143
144+
- name: Reproduce crash for full output
145+
if: steps.check.outputs.crashes_found == 'true' && inputs.jobs > 1
146+
run: |
147+
# In fork mode, child output (backtrace, panic message) is not captured in
148+
# fuzz_output.log. Replay the crashing input in single-process mode to get
149+
# the full output for the crash reporting pipeline.
150+
FEATURES_FLAG=""
151+
if [ -n "${{ inputs.extra_features }}" ]; then
152+
FEATURES_FLAG="--features ${{ inputs.extra_features }}"
153+
fi
154+
RUSTFLAGS="--cfg vortex_nightly" RUST_BACKTRACE=1 \
155+
cargo +$NIGHTLY_TOOLCHAIN fuzz run --release --debug-assertions \
156+
$FEATURES_FLAG \
157+
${{ inputs.fuzz_target }} \
158+
"${{ steps.check.outputs.first_crash }}" \
159+
2>&1 | tee fuzz_output.log || true
160+
140161
- name: Archive crash artifacts
141162
id: upload_artifacts
142163
if: steps.check.outputs.crashes_found == 'true'

0 commit comments

Comments
 (0)