Commit Graph

38 Commits

Author SHA1 Message Date
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
Dmitry Vyukov
954d506c30 syz-ci: support additional syscall descriptions
Add new "syzkaller_descriptions" config param that allows
to specify a dir with additional syscall descriptions
that will be copied on top of syzkaller checkout.
2017-08-01 18:25:18 +02:00
Dmitry Vyukov
032fb6f70a syz-ci: send commits to dashboard
Dashboard needs to know when bug fixing commits reach
builders in order to fully close bugs.
Send commits that dashboard is interested in to dashboard.
2017-07-28 20:14:24 +02:00
Dmitry Vyukov
0f42bbec24 syz-ci: extend dashboard interface
1. Add manager name to builds.
2. Add centralized logging.
3. Add types for bug reports and bug updates.
2017-07-21 10:06:46 +02:00
Dmitry Vyukov
1a3751c444 syz-ci: save previous manager log
If manager exits during start, it's hard to understand what happens.
Save the previous manager log as manager.log.old until we have a better solution.
Also log errors on 0 log level.
2017-07-21 10:06:46 +02:00
Dmitry Vyukov
012622d3c9 syz-ci: fix dashboard settings in manager config 2017-07-18 16:34:33 +02:00
Dmitry Vyukov
cc1c342923 syz-ci: allow to specify cmdline/sysctls
Allow to specify per-kernel command line and sysctl values
to more closely mimic the target kernel.
2017-07-17 12:39:11 +02:00
Dmitry Vyukov
e489b6cafd syz-ci: don't duplicate manager config default values 2017-07-17 12:39:11 +02:00
Dmitry Vyukov
0fd1458dba syz-ci: specify dashboard client per manager
Dashboard will need to distinguish managers
to understand what kernel they are testing.
2017-07-17 12:39:06 +02:00
Dmitry Vyukov
1841d5a558 syz-ci: don't rebuild syzkaller if commit has not changed 2017-07-05 19:44:57 +02:00
Dmitry Vyukov
e7b1c55592 syz-ci: fix manager config creation
Don't write hub/dashboard params if they are not enabled
in syz-ci config. Otherwise manager gets name but not addr/key,
and that does not pass config validation.
2017-07-03 14:23:35 +02:00
Dmitry Vyukov
a7b199253f all: use consistent file permissions
Currently we have unix permissions for new files/dirs
hardcoded throughout the code base. Some places use 0644,
some - 0640, some - 0600 and a variety of other constants.

Introduce osutil.MkdirAll/WriteFile that use the default
permissions and use them throughout the code base.

This makes permissions consistent and also allows to easily
change the permissions later if we change our minds.

Also merge pkg/fileutil into pkg/osutil as they become
dependent on each other. The line between them was poorly
defined anyway as both operate on files.
2017-07-03 14:00:47 +02:00
Dmitry Vyukov
a8b32c55ab syz-ci: switch to the new dashboard
Switch to the new dashboard and start uploading build info.
2017-06-30 16:04:30 +02:00
Dmitry Vyukov
cc9db10249 syz-ci: extend build info
We currently store 3 tags (compiler id, kernel commit and config hash).
But we also kernel git report/branch. To not store 2 more tag files,
combine everything into a single json file that holds all info about the build.
Will allow simpler extenstion in future as well.
2017-06-30 15:32:30 +02:00
Dmitry Vyukov
9af3153420 syz-dash/dashboard: move from dashboard
Move the old dashboard API into syz-dash
to get it out of the way of the new dashboard.
2017-06-23 15:22:34 +02:00
Dmitry Vyukov
6573032fff syz-ci: add continuous integration system 2017-06-20 19:59:55 +02:00