Commit Graph

65 Commits

Author SHA1 Message Date
Dmitry Vyukov
84277f259c syz-ci: unset GOPATH
syz-ci always passes own GOPATH,
if GOPATH is already present in env, it causes havoc.
Unset it.
2018-07-05 13:11:55 +02:00
Dmitry Vyukov
4906b5987e syz-ci: copy akaros object file 2018-07-05 13:11:37 +02:00
Dmitry Vyukov
68ce63c468 pkg/build: support fuchsia builds 2018-06-28 13:42:07 +02:00
Dmitry Vyukov
58e8587f64 pkg/vcs: pave way for multi-vcs support
Wrap current git interface in abstract interface.
Provide constructor that create repo interface for the given os/vm.
2018-06-27 13:57:21 +02:00
Dmitry Vyukov
43da5e3a1b pkg/vcs: move from pkg/git
Rename pkg/git to pkg/vcs because we need to support not only git.
2018-06-27 13:07:03 +02:00
Dmitry Vyukov
21caae5df6 syz-ci: don't report transient errors during patch testing
If no instances crashed and at least one booted and completed
testing successfully, report success.

Fixes #641
2018-06-26 19:17:45 +02:00
Dmitry Vyukov
802897bc33 pkg/instance: say that gvisor can create instances out of thin air 2018-06-23 10:12:35 +02:00
Dmitry Vyukov
c97f0d7a86 pkg/build: add gvisor support 2018-06-22 16:40:45 +02:00
Dmitry Vyukov
ea804a7120 pkg/build: pave way for multi-OS support
Unify kernel and image build, that distinction is really uninteresting.
Define interface that each OS needs to implement.
Add gvisor stub.
2018-06-22 16:40:45 +02:00
Dmitry Vyukov
94ef62054c pkg/build: move from pkg/kernel
Rename pkg/kernel to pkg/build and prepare for multi-OS support.
2018-06-22 16:40:45 +02:00
Dmitry Vyukov
2a075d57ab pkg/report: allow to specify suppressions per OS
Currently all (linux-specific) suppressions are hardcoded in mgrconfig.
This is very wrong. Move them to pkg/report and allow to specify per OS.
Add gvisor-specific suppressions.
This required a bit of refactoring. Introduce mgrconfig.KernelObj finally.
Make report.NewReporter and vm.Create accept mgrconfig directly
instead of passing it as multiple scattered args.
Remove tools/syz-parse and it always did the same as tools/syz-symbolize.
Simplify global vars in syz-manager/cover.go.
Create reporter eagerly in manager. Use sort.Slice more.
Overall -90 lines removed.
2018-06-22 16:40:45 +02:00
Dmitry Vyukov
6595937c34 tools/create-gce-image.sh: support both nbd and loop
Pass target OS/arch and VM type to kernel.CreateImage.
Use nbd for gce and loop for qemu VM type.
2018-05-17 14:50:18 +02:00
Dmitry Vyukov
477728038c syz-ci: fix manager config creation
SyzFuzzerBin/SyzExecprogBin/SyzExecutorBin are ended up being empty.
Fix this.
2018-05-14 12:17:34 +02:00
Dmitry Vyukov
2407e7407a pkg/instance: add package for testing of images/patches/bisection
Move helper image/patch testing code from syz-ci/testing.go
to a separate package so that it can be reused during bisection.

Update #501
2018-05-14 11:32:56 +02:00
Dmitry Vyukov
2a287a4dfc pkg/kernel: accept kernel config as byte slice
We usually have the config in memory,
so saving it to disk is an unnecessary step.
Accept byte slice directly.

Update #501
2018-05-14 11:17:23 +02:00
Dmitry Vyukov
4fce9bf152 syz-manager: add concept of partial configs
syz-ci uses partial (incomplete) manager config in several places.
Currently it is implemented in some ugly way.
Provide better support and unexport DefaultValues and SplitTarget.

Update #501
2018-05-14 11:16:57 +02:00
Dmitry Vyukov
9e0846e8a4 all: get rid of underscores in identifiers
Underscores are against Go coding style.

Update #538
2018-05-07 17:59:06 +02:00
Dmitry Vyukov
9fe5658a1b gometalinter: check dot imports
Update #538
2018-05-03 14:41:34 +02:00
Dmitry Vyukov
2bf86f4022 syz-ci: remove restriction on empty patch 2018-04-24 14:55:39 +02:00
Dmitry Vyukov
9366d03f00 dashboard/app: allow testing fixes on exact commit and without patch
This implements 2 features:
1. It's now possible to specify exact commit when testing as:

2. It's possible to test without patch attached
assuming the patch is already committed to the tested tree.

Fixes #558
2018-04-24 13:23:01 +02:00
Dmitry Vyukov
0d8e591c31 syz-ci: reduce git poll period 2018-04-23 16:28:24 +02:00
Dmitry Vyukov
8b5dcf17b0 syz-ci: clean kernel dir before patch test build
This leads to false errors when we are switching between gcc and clang:

kernel build failed: failed to run /usr/bin/make [make bzImage -j 32 CC=/syzkaller/clang-kmsan/bin/clang]: exit status 2
arch/x86/Makefile:184: *** Compiler lacks asm-goto support..  Stop.

Fixes #568
2018-04-23 16:26:26 +02:00
Dmitry Vyukov
36d1c4540a all: fix gometalinter warnings
Fix typos, non-canonical code, remove dead code, etc.
2018-03-08 18:48:26 +01:00
Dmitry Vyukov
b0d99d1ebb syz-ci: add config parameter that enables jobs
If a syz-ci is not meant to do patch testing,
it's better to not start jobs polling loop at all.
2018-03-08 12:24:03 +01:00
Dmitry Vyukov
b8970f313e syz-ci: fix log message 2018-01-17 21:09:02 +01:00
Dmitry Vyukov
fbc4659e78 syz-ci: disable fix commit extraction for mmots
mmots contains weird squashed commits titled "linux-next" or "origin",
which contain hundreds of other commits. This makes fix attribution totally broken.
Obviously need something better long term, but also need to fight fire now.
2018-01-17 20:17:23 +01:00
Dmitry Vyukov
d7bc58204e dashboard/app: collect more info for better reports
Collect kernel build commit title/date.
Add support for kernel repo aliases (to be able
to say linux-next instead of full git repo address).
Collect on what managers a bug happened.
Reuse Crash.ReportLen as generic crash reporting priority.
Make it possible to prioritize reporting of particular
kernel repos and arches.

Fixes #473
2018-01-17 19:52:30 +01:00
Dmitry Vyukov
b48312c59d syz-ci: retry test jobs up to 3 times
GCE can be buggy, kernel can be buggy.
2018-01-16 13:37:14 +01:00
Dmitry Vyukov
c206e64a01 syz-ci: use the original syzkaller commit for patch testing
Currently we use the latest syzkaller commit that syz-ci uses itself.
As the result syz-execprog can fail to deserialize the reproducer.
Use the original syzkaller commit.
2018-01-16 13:37:14 +01:00
Dmitry Vyukov
9dd89763a1 syz-ci: don't mark build errors as corrupted
Otherwise they get merged with other corrupted reports.
2017-12-27 14:28:08 +01:00
Dmitry Vyukov
6f03c35620 dashboard/app: extract fixing tags from commits
Support the new scheme of associating fixing commits with bugs.
Now we provide a tag along the lines of:

Reported-by: <syzbot+a4a91f6fc35e102@syzkaller.appspotmail.com>

The tag is supposed to be added to the commit.
Then we parse commit logs and extract these tags.

The final part on the dashboard is not ready yet,
but syz-ci should already parse and send the tags.
2017-12-27 09:09:18 +01:00
Dmitry Vyukov
528deaed27 syz-ci: combine build.ID from both kernel tag and syzkaller commit
Builds with equal IDs are merged by dashboard,
so if only syzkaller commit has changed
dashboard won't create a new build and the new
syzkaller commit will be lost.
2017-12-06 13:12:38 +01:00
Dmitry Vyukov
9118cb4ae2 syz-ci: rebuild syzkaller on restart
Forced syzkaller updates is the main reason for syz-ci restarts.
Reduce syzkaller freshness threshold from 6h to 1m.
Rebuilding syzkaller is relatively cheap anyway.
2017-12-04 11:31:31 +01:00
Dmitry Vyukov
2fa91450df dashboard/app: add manager monitoring
Make it possible to monitor health and operation
of all managers from dashboard.
1. Notify dashboard about internal syz-ci errors
   (currently we don't know when/if they happen).
2. Send statistics from managers to dashboard.
2017-12-01 13:58:11 +01:00
Dmitry Vyukov
5153aeaffd syz-ci: test images before using them
Boot and minimally test images before declaring them as good
and switching to using them.

If image build/boot/test fails, upload report about this to dashboard.
2017-11-30 14:50:50 +01:00
Dmitry Vyukov
29b0fd90e6 pkg/report: include Maintainers into report
Currently getting a complete report requires a complex,
multi-step dance (including getting information that
external users are not interested in -- guilty file).

Simplify interface down to 2 functions: Parse and Symbolize.
Parse does what it did before, Symbolize symbolizes report
and fills in maintainers. This simplifies both implementations
of Reporter interface and all users of the interface.

Potentially we could get this down to 1 function Parse
that does everything. However, (1) Symbolize can fail,
while Parse cannot, (2) usually we want to ignore (log)
Symbolize errors, but otherwise proceed with the report,
(3) repro does not need symbolization for all but the
last report.
2017-11-29 18:24:30 +01:00
Dmitry Vyukov
34f2c2332b pkg/report: add Output to Report
Whole raw output is indivisble part of Report,
currently we always pass Output separately along with Report.
Make Output a Report field.

Then, put whole Report into manager Crash and repro context and Result.
There is little point in passing Report as aa bunch of separate fields.
2017-11-29 14:36:51 +01:00
Dmitry Vyukov
ad0af9fff5 vm: return Report from MonitorExecution
This allows callers to get access to Report.Corrupted.
Better than adding 6-th return value and will allow
to pipe other report properties if necessary.
2017-11-21 19:02:35 +01:00
Dmitry Vyukov
2da09f3c79 syz-ci: fix false "no output" during patch testing 2017-11-19 11:58:55 +01:00
Dmitry Vyukov
2950adb95c syz-ci: use repro opts during job testing 2017-11-17 18:32:09 +01:00
Dmitry Vyukov
bcf027edf8 syz-ci: pre-fill kernel/syzkaller commits in job build
Dashboard requires kernel/syzkaller commits to be filled,
but we don't know them yet. Put stub values there.
2017-11-17 17:58:09 +01:00
Dmitry Vyukov
c4d43f4773 pkg/osutil: don't leace runaway processes
When manager is stopped there are sometimes runaway qemu
processes still running. Set PDEATHSIG for all subprocesses.
We never need child processes outliving parents.
2017-11-16 12:48:02 +01:00
Dmitry Vyukov
4bc654f911 syz-ci: add support for patch testing 2017-11-16 13:09:50 +03:00
Dmitry Vyukov
708390a039 syz-ci: pre-parse and pre-populate manager config
Config is currently parsed in 2 places.
Parse it in constructor once.
2017-11-16 10:15:23 +01:00
Dmitry Vyukov
4121c7b5d1 syz-ci: add global dashboard client
Will allow to do connections to dashboard by syz-ci itself.
Unused for now, but will allow graceful config update.
2017-11-15 18:13:51 +01:00
Dmitry Vyukov
8f3e774b76 syz-ci: improve commit matching
1. Fetch last 200K commits instead of commits for past year.
For merged commits both author date and commit date can be
arbitrary long in past (e.g. we got a commit dated by 2014).

2. Strip some commit prefixes from commits.
We have some trees where backports are prefixed with "BACKPORT:".
Previously we could no match such commits.
2017-11-07 13:31:00 +01:00
Dmitry Vyukov
d394531e95 dashboard/app, syz-ci: upload target OS/arch to dashboard 2017-09-19 17:00:26 +02:00
Dmitry Vyukov
62114d6064 Makefile: build target binaries into separate dirs
We currently build binaries for all targets into bin.
This makes mess in bin/ and does not allow testing of different archs.
Build target binaries into bin/OS_ARCH/ subdirs.

Host binaries are still built into bin/.

Update #333
Update #324
Update #191
2017-09-19 16:44:54 +02:00
Dmitry Vyukov
f7b1163afb syz-manager/mgrconfig: explicitly specify target in config
Add target config parameter (e.g. linux/amd64) which controls target OS/arch.
No more explicit assumptions about target.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
18e96021ed sys: move linux descriptions to sys/linux 2017-09-15 16:02:37 +02:00