aboutsummaryrefslogtreecommitdiffstats
path: root/syz-ci/manager.go
Commit message (Collapse)AuthorAgeFilesLines
* all: use any instead of interface{}Dmitry Vyukov2025-12-221-2/+2
| | | | Any is the preferred over interface{} now in Go.
* pkg/osutil: move Semaphore from pkg/instanceDmitry Vyukov2025-11-241-2/+2
| | | | | | | | Semaphore is a very low-level primitive type, while pkg/instance is a very high-level package with lots of deps. Semaphore does not belong there, and may lead to cyclic deps if we use it more. Move it to pkg/osutil. It's not really OS-specific, but we don't have a better package.
* pkg/updater: factor out of syz-ciDmitry Vyukov2025-11-241-4/+5
| | | | | | Factor syzkaller updating functionality out of syz-ci so that it can be reused in other binaries. No functional changes intended.
* pkg/osutil: make VerboseError nest other errorsAleksandr Nogikh2025-10-011-1/+1
| | | | | After this change it fits more naturally into the Go's error functionality.
* all: apply linter auto fixesTaras Madan2025-07-171-1/+1
| | | | ./tools/syz-env bin/golangci-lint run ./... --fix
* syz-ci: don't report context.Canceled errorsAleksandr Nogikh2025-06-101-0/+10
| | | | | | | | | | | After #6066, we have started to see a number of log messages about bench/corpus uploads aborted due to context cancelation. These messages are not of any value. Ignore Errorf() calls where one of the arguments encloses a context.Canceled error. This is probably a bit hacky, but at least prevents repeating errors.Is(err, context.Canceled) for every call that may be canceled.
* syz-ci: use context for terminationTaras Madan2025-06-041-35/+42
| | | | | 1. Use context for the goroutines termination. 2. uploadCoverJSONLToGCS reached 8 params, refactor.
* syz-ci/manager: upload programs coverage to the same fileTaras Madan2025-03-281-7/+4
|
* syz-ci/manager.go: compress programs coverage dataTaras Madan2025-03-271-31/+55
| | | | | Each fuzzing session costs 2G-13G now. It looks too much. The data is highly redundant (jsonl) thus compression should help.
* pkg/gcs: define Client interfaceTaras Madan2025-03-251-1/+1
| | | | | | Some functions are not the struct members now. Some functions deleted. Client mock generated.
* syz-ci/manager.go: make CoverProgramsPath target publicTaras Madan2025-03-191-31/+9
| | | | | PublishGCS param now controls the CoverProgramsPath targets too. Previously it controlled only CoverUploadPath and CorpusUploadPath.
* syz-ci/manager.go: fix parameter propagationTaras Madan2025-03-181-1/+1
|
* syz-ci: upload syz progs with coverage to gcsTaras Madan2025-03-101-25/+66
|
* pkg/instance: extract the smoke test methodAleksandr Nogikh2025-01-211-54/+15
| | | | | | | Move the logic from syz-ci to pkg/instance to make it reusable. In case of a failure without a crash report, report the issue as a SYZFATAL crash instead of just printing to the error log.
* all: support empty HTTP configAleksandr Nogikh2025-01-141-2/+1
| | | | | | | | We don't really need an HTTP server when running syz-manager during kernel image testing and when running syz-diff automatically. Don't require the config to be set and don't start the HTTP server in this case.
* syz-ci: rename bench file on all syz-manager restartsAleksandr Nogikh2024-12-121-2/+1
| | | | | | ManagerCmd transparently restarts the instance in case of crashes, so we should better be cleaning up the bench file within its loop, rather than in manager.go.
* syz-ci: manager dash value is nil if dashboard is nilLaura Peskin2024-12-031-1/+4
| | | | | | | The introduction of the ManagerDashapi interface unintentionally overrode the nil checks on the manager's dashboard value. This change sets the interface value only if there is a valid dashboard.
* 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: introduce gitArchive parametersTaras Madan2024-10-101-1/+13
| | | | | | | Some commits don't live long remotely. It sometimes happens we need them later to: 1. Merge coverage. 2. Mention during communication.
* syz-ci: reset to the build commit at restartAleksandr Nogikh2024-09-241-0/+7
| | | | | | | | | | | | If we failed to build/test the current tip of the tree, it seems that we still stay on that commit, which may lead to problems in fix commit collection, coverage report generation and in determining the right people to Cc. Always reset to the last successfully built kernel commit before restarting a syz-manager instance. Closes #5333.
* pkg/build: handle OOM-killed build errorSabyrzhan Tasbolatov2024-09-231-0/+2
| | | | | | | 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
* syz-ci: upload bench files to GCSAleksandr Nogikh2024-08-271-2/+41
| | | | | Collect and periodically upload the bench information for every running syz-manager.
* 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.
* all: pkg/gcs supports AppEngine contextTaras Madan2024-08-121-1/+2
|
* syz-ci: fix RPC connections to test syz-managersAleksandr Nogikh2024-05-241-2/+3
| | | | | For GCE-based fuzzing, we need to bind to a real networking interface to accept connections from the VMs.
* syz-ci: use unique ports for test instancesDmitry Vyukov2024-05-221-0/+3
| | | | | Currently they can collide with the main instance and fail. Use unique ports for test instances.
* syz-ci: switch to using syz-manager for smoke testingDmitry Vyukov2024-05-211-44/+50
| | | | | Add smoke testing mode to manager and use it in syz-ci instead of pkg/instance which uses syz-fuzzer binary.
* syz-ci: flush coverage report generatorDmitry Vyukov2024-04-101-1/+4
| | | | | Flush manager coverage report generator after requesting JSONL report. We won't use coverage reports after this point, but it consumes gigs of RAM.
* syz-ci/manager.go: don't upload empty reportsTaras Madan2024-04-051-3/+8
| | | | | I observe the reports with 0 len. I'm sure it happens because of the connection timeouts etc.
* syz-ci/manager.go: use dashboard_client from manager configTaras Madan2024-04-021-1/+1
| | | | It currently uses ci level dashboard_client.
* syz-ci/manager.go: save jsonl to namespace folderTaras Madan2024-03-221-1/+2
| | | | | dashboard_client maps 1:1 to the namespace upstream is the only exception with 2 clients
* syz-ci: pipeline coverage from manager to gcsTaras Madan2024-03-211-1/+2
|
* syz-ci, pkg/cover: stream coverage from manager to gcsTaras Madan2024-03-211-24/+89
|
* syz-ci: increase log level for managersAleksandr Nogikh2024-02-051-1/+1
| | | | Let's have more insight into the individual syz-managers.
* syz-ci: don't stop fuzzing when we're at ToTAleksandr Nogikh2024-01-231-8/+7
| | | | If there's no newer kernel revision, do not stop kernel fuzzing.
* syz-ci: make stale kernel error less noticeableAleksandr Nogikh2024-01-231-2/+2
| | | | | If the kernel build is broken, we must have already filed a bug for it. Let's just print to the logs instead of recording an error.
* syz-ci: limit fuzzing of old kernel imagesAleksandr Nogikh2024-01-171-0/+11
| | | | | | | | | Introduce a new manager config -- the maximum allowed (non-)freshness of the kernel image that we fuzz. Once the kernel image is old enough and we're unable to build a newer version, don't start the instance. Enforce the restriction only after we have tried to build a newer kernel and failed.
* syz-ci/manager: separate build and coverage dirsLiz Prucka2024-01-151-37/+39
| | | | | | | Fix to [4f9b680](https://github.com/google/syzkaller/commit/4f9b680bf7d56a0023c4ec0e87207c77de7d276a), which broke kernel builds by changing build directory when kernel_src_suffix is used.
* syz-ci: refactor loadManagerConfig()Aleksandr Nogikh2024-01-121-0/+19
| | | | | The linters are complaining about a too high cyclomatic complexity. Split out a ManagerConfig.validate() method.
* syz-ci: query manager commits and commit info similarlyAleksandr Nogikh2023-12-201-8/+33
| | | | | | | | | | | | | | We used GetCommitsByTitles() for commit info querying and it looks quite far back into the history. But the ListRecentCommits() call only looked at the last 1.5 years, which was causing problems for bugs that were fixed a long time ago. Use GetCommitsByTitles() in Manager's pollCommits(). Sample commits in case dashboard requests too many to be checked. Test pollCommits(). Closes #4347.
* syz-ci: remove unneeded if statementsKris Alder2023-10-191-5/+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/+4
| | | | | 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: accept the global per-syz-ci backport listAleksandr Nogikh2023-08-041-0/+7
| | | | | | 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.
* all: use errors.As instead of .(type)Taras Madan2023-07-241-10/+14
|
* all: use special placeholder for errorsTaras Madan2023-07-241-19/+19
|
* syz-ci: optionally publish GCS objectsAleksandr Nogikh2023-05-151-6/+9
| | | | | | | | | | Earlier `syz-ci: don't publish uploaded files` commit completely disabled the GCS object publishing after each object. However, it turns out that otherwise the objects quickly lose the `public to internet` flag. Make the option configurable.
* syz-ci: upload guilty file info for build/boot/test errorsAleksandr Nogikh2023-05-151-0/+3
| | | | This will enable automatic subsystem assignment.
* syz-ci: don't publish uploaded filesAleksandr Nogikh2023-05-101-1/+1
| | | | | It should be defined by the bucket's settings and not for individual files.
* 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.