aboutsummaryrefslogtreecommitdiffstats
path: root/syz-ci/jobs.go
Commit message (Collapse)AuthorAgeFilesLines
* all: use any instead of interface{}Dmitry Vyukov2025-12-221-3/+3
| | | | Any is the preferred over interface{} now in Go.
* all: apply linter auto fixesTaras Madan2025-07-171-3/+3
| | | | ./tools/syz-env bin/golangci-lint run ./... --fix
* syz-ci: use context for terminationTaras Madan2025-06-041-16/+9
| | | | | 1. Use context for the goroutines termination. 2. uploadCoverJSONLToGCS reached 8 params, refactor.
* pkg/build: use the build environment in clean() callsFlorent Revest2024-10-141-11/+12
| | | | | | This unifies the build() and clean() interfaces such that if a custom compiler or make binary is provided in the manager or bisection config, they can be taken into account by the clean() interface.
* pkg/build/linux: support building with a custom make binaryFlorent Revest2024-10-141-0/+1
| | | | | | Certain environments might need a specific make command or wrap make calls with extra logic. This lets users provide a path to a custom make binary.
* syz-ci: include more details in job error logsAleksandr Nogikh2024-10-021-2/+2
| | | | | | | We currently observe episodic "job: reproducer consistency is empty" error messages, but there's little one can do with them. Make them more actionable.
* pkg/build: handle OOM-killed build errorSabyrzhan Tasbolatov2024-09-231-1/+1
| | | | | | | Handle SIGKILL (exit code = 137) on osutil.Run() during Linux kernel image building and return build.InfraError without reporting. Fixes: https://github.com/google/syzkaller/issues/5317
* all: rename build_jobs to build_cpusAleksandr Nogikh2024-08-221-1/+1
| | | | The latter is a better suitable name.
* syz-ci: accept a BuildJobs parameterAleksandr Nogikh2024-08-221-0/+1
| | | | | The parameter defines the maximum number of CPUs involved in the kernel build process.
* syz-ci: remove unneeded if statementsKris Alder2023-10-191-4/+1
| | | | | filepath.Join() will ignore empty parameters, so we don't need these checks.
* syz-ci: add kernel_src_suffix field to configKris Alder2023-10-191-0/+3
| | | | | This is used to add a suffix to the kernel_src config field. This is used in Android where kernel source is under .../kernel/aosp/.
* syz-ci: ignore one more bisection resultAleksandr Nogikh2023-09-131-0/+4
| | | | | The "devlink: bump the instance index directly when iterating" commit has already appeared in too many invalid fix bisection results.
* syz-ci: accept the global per-syz-ci backport listAleksandr Nogikh2023-08-041-1/+1
| | | | | | Now that we also support checking whether the guilty commit is present, we can afford to share the custom backport list among all syz-ci managers in a number of cases.
* syz-ci: specify custom ignore lists for bisectionsAleksandr Nogikh2023-08-031-10/+20
| | | | | | | | | Make syz-ci configuration more flexible by allowing users to set the list of commits that should never be reported as valid bisection results. Keep the list of such upstream Linux commits in the code in order not to duplicate it everywhere.
* syz-ci: increase bisection confidence cut-off to 0.66Aleksandr Nogikh2023-07-271-1/+1
| | | | | | | Judging from the bisection logs, the confidence level statistic indeed correlates with the chance of the result being true positive. Let's use a stricter threshold to publish fewer false positives.
* syz-ci: set bisection job build to start commitAleksandr Nogikh2023-07-261-1/+3
| | | | | | | | | | Given that mail_bisect_template.txt refers to that data as "start commit", let's directly use the information about the starting commit that we already have. Otherwise we get start commit: [unknown] in our reports.
* syz-ci: fix default job parametersAleksandr Nogikh2023-07-251-1/+1
| | | | There was a typo in the code.
* all: support cross-tree fix bisectionAleksandr Nogikh2023-07-251-3/+28
| | | | | | | | | | | | | If tree origin assessment code has identified that the bug is not reproducible in a tree from which we merge/cherry-pick commits, use fix bisection to identify that commit. This can e.g. be used to find fixing commits that were not backported from Linux kernel mainline into LTS branches. In case of bisection errors, re-do such jobs every 30 days. Remember in the Bug structure whether there's a fix candidate and return the details in the full bug info API query.
* syz-ci: don't always return Build.CommitAleksandr Nogikh2023-07-251-9/+4
| | | | | | | For bisections, only return it if it's successful. We don't seem to be interested in specific values for jobs anyway. Do the same for KernelCommitDate.
* dashboard: rename createPatchTestingJobs() to jobFromBugSample()Aleksandr Nogikh2023-07-251-1/+1
| | | | | This will let us use the same code for sampling-based generation of bisection jobs as well.
* all: use errors.As instead of .(type)Taras Madan2023-07-241-8/+12
|
* all: use special placeholder for errorsTaras Madan2023-07-241-14/+14
|
* syz-ci: specify per-manager bisection backportsAleksandr Nogikh2023-07-201-0/+1
| | | | | | | | It might be the case that the kernels that are being fuzzed on syz-ci require their own backports to build/test older revisions during bisection. Let users specify it in the syz-ci config.
* pkg/bisect: estimate confidence in the resultAleksandr Nogikh2023-07-141-0/+4
| | | | | | | | | | | | | | | | Estimate reproducer's flakiness more carefully, as it can help us get better results. During config minimization, do not let reproducibility drop too low. For each test() run, estimate our confidence in the result. For now, only consider the false negative case: if we got no crashes, it's likely that the bug is there, but the reproducer was not lucky enough. Given an estimate of reproduction likelihood, we can easily calculate the chance of an invalid result: (1-probability)^runs. Combine all individual test() confidences into Result.Confidence. If the resulting Confidence is too low, ignore the bisection result.
* syz-ci: don't wait for semaphore to query a jobAleksandr Nogikh2023-07-011-5/+0
| | | | | | | | | This condition is no longer really important -- build and test are anyway controlled by semaphores, so if we don't take the job, nobody else will be able to finish it sooner. Also, we reset job statuses on syz-ci restart, so it won't be a problem to take a job again.
* dashboard: restart failed cause bisectionsAleksandr Nogikh2023-05-091-0/+3
| | | | | If the bisection failed due to infrastructure problems, let's retry it in 7 days.
* syz-ci: increase bisection job timeoutAleksandr Nogikh2023-05-091-5/+3
| | | | | | Earlier it was limited to 8 hours mostly because syz-ci could execute only one job at a time. Now that it's no longer the case, we can increase the timeout to 12 hours.
* syz-ci: improve loggingAleksandr Nogikh2023-05-081-1/+1
| | | | | 1) Set the name of the instace to improve log analysis. 2) Use log.Errorf for errors that deserve human attention.
* syz-ci: extract job commit fetching logicAleksandr Nogikh2023-04-281-41/+52
| | | | | The functionality has become too complex to keep it together with the other job processing code.
* all: support patch testing on merge baseAleksandr Nogikh2023-04-281-1/+35
| | | | | | | | | | | | If merge base repo & branch are specified, syz-ci will first calculate the merge base between KernelRepo + KernelBranch and MergeBaseRepo + MergeBaseBranch and then it will execute patch testing on the latest commit reachable from both. If there's no such commit or several ones are equally good, abort the job with an error. Also, support a TreeOrigin job flag that will be needed later.
* all: ioutil is deprecated in go1.19 (#3718)Taras Madan2023-02-231-3/+2
|
* syz-ci: log the start of the job loopAleksandr Nogikh2023-02-011-0/+1
| | | | | This should help diagnose problems when several loops should have started.
* syz-ci: properly stop jobsAleksandr Nogikh2023-02-011-1/+1
| | | | | The stop channel must be closed in order to pass the signal to all listeners.
* syz-ci: don't duplicate job instance suffixesAleksandr Nogikh2023-01-231-2/+0
| | | | Currently a suffix is appended twice.
* syz-ci: don't start an idle parallel job processorAleksandr Nogikh2023-01-191-7/+21
| | | | | Check if there are any managers that could benefit from an extra job processor before starting it.
* syz-ci: explicitly stop all running jobs on updateAleksandr Nogikh2023-01-191-0/+17
| | | | | | Otherwise we might end up in a situation when we have stopped all fuzzing, but wait for the job processor to report Done to the waitgroup object.
* syz-ci: gate concurrent env.Test executionsAleksandr Nogikh2023-01-191-1/+2
| | | | This will help reduce the number of overcommitted VMs.
* syz-ci: do logging per job processorAleksandr Nogikh2023-01-191-11/+15
| | | | Now that we might have two, it might be helpful to split the logs.
* syz-ci: do jobs in parallelAleksandr Nogikh2023-01-191-42/+96
| | | | | | | | | Introduce a new ParallelJobs configuration parameter. If set, syz-ci will execute the specified kinds of jobs in parallel to the main job processing thread. This should resolve the 7-8 hour patch testing delays when syz-ci is busy doing a bisection.
* syz-ci: move build semaphore closer to buildsAleksandr Nogikh2023-01-191-10/+4
| | | | | | | | Currently it's held during the whole job processing, which can take too long. Adjust it so that it's only taken when we really begin to build the kernel or syzkaller.
* pkg/instance: move BuildKernel() args to structSpace Meyer2023-01-091-2/+9
|
* syz-ci/jobs: use linker supplied in syz-ci configSpace Meyer2023-01-091-2/+3
| | | | | | Previously we only used the linter from the syz-ci config when building the kernel for regular fuzzing. We were missing some plumbing to have this setting reach patch testing and bisection jobs.
* pkg/bisect: use default compiler during bisection where possibleSpace Meyer2022-10-071-5/+6
| | | | | | | This allows us to bisect at least recently introduced bugs, where the manager that found the bug uses a non standard compiler. This is usefull during development of a new sanitizer for which a compiler with non-upstreamed patches is required.
* pkg/bisect: try to reidentify commit rebased after crashSpace Meyer2022-10-061-0/+1
| | | | | | | | | | | | | | When bisecting a breaking commit, syzkaller starts the bisection from the commit recorded in the last crash for the given bug. Previously the bisection was aborted should the commit no longer exist in the repo. Now we try to reidentify the breaking commit. For git pretty much the best we can do is to search a commit reachable from HEAD with the same title. Other VCS systems might have something better. Syzkaller will still first validate that the start commit is indeed broken in the way it expects. This prevents syzkaller from getting confused should we accidentally pick a completely unrelated commit.
* pkg/bisect: support clang for crash bisectionSpace Meyer2022-09-011-4/+5
| | | | | Before we hardcoded bisection to use gcc, now the compiler family can be configured in the bisection config.
* syz-ci, dashboard: return alt titles in job resultsAleksandr Nogikh2022-08-261-0/+2
|
* syz-ci: remember syzkaller builds logsAleksandr Nogikh2022-06-281-5/+5
| | | | | This might help get more insight into patch testing failures, especially for old bugs.
* all: remember console output for all patch testsAleksandr Nogikh2022-06-081-14/+19
| | | | | | Currently syzbot only saves a log if there was a build/test error. Closes #3185
* syz-ci: don't require a repro for JobTestPatchAleksandr Nogikh2022-04-131-2/+4
| | | | | | For boot-time bugs there may be no repro, yet we can test it. Only leave a sanity check (if syz repro is present, then repro options must also be, and vice versa).
* all: try to query compiler id even when a build failsAleksandr Nogikh2021-09-161-1/+1
| | | | | | | | Currently syzkaller leaves an empty CompilerID, when it has failed to build a kernel. However, in almost all cases this is possible to do. Query compiler information irregardless of whether the build process is successful.