aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/bisect/bisect.go
Commit message (Collapse)AuthorAgeFilesLines
* all: capture compiler id during the build processAleksandr Nogikh2021-07-201-9/+8
| | | | | | | | | Default compilers are specified in the OS- and platform-dependent logic. It is more convenient to extract info about them during the kernel build itself, rather than during the manager object initialization. Apply the necessary changes throughout the code that is involved in building the kernels and processing information about this process.
* pkg/bisect: fix number of tests for flaky reprosDmitry Vyukov2021-02-201-1/+1
| | | | Fixes #2335
* pkg/bisect: remove unused varDmitry Vyukov2020-12-251-1/+0
| | | | Formally it's not unsed, so nothing complained.
* pkg/kconfig: store minimization resultsJouni Hogander2020-12-101-10/+4
| | | | | Store config options identified using DebugTracer. Also change bisection and configuration minimization code to use new DebugTracer.
* pkg/mgrconfig: add prog&sys.targets targets to ConfigDmitry Vyukov2020-11-301-11/+4
| | | | | | These are widely used with the config as the refactoring shows. This removes a bunch of unnecessary code. Also fixes a number of bugs where we confused Arch with VMArch.
* pkg/bisect: add flaky flagJouni Hogander2020-11-171-4/+21
| | | | | On first test (original commit) bump up number of tests always. Also bump up number of tests if observing more good results than bad.
* pkg/kconfig: accept target when parsing KconfigDmitry Vyukov2020-10-291-1/+8
| | | | | | Kconfig depends on the target arch. Add target argument for Kconfig parsing. Resolve $(SRCARCH) properly (previously we always assumed x86_64).
* pkg/bisect: switch to kconfig.MinimizeDmitry Vyukov2020-10-211-37/+8
| | | | | | | | | | | | | | | Use the new kconfig.Minimize for config minization instead of the config-bisect.pl script. This is mostly just deleting code. Also update tests: - minimization is now supposed to test the baseline config (update "testos" stub accordingly) - minimization is not supposed to return a config that does not build (a reasonable config minimization procedure can't arrive to such config), remove test that tests this Update #2171
* pkg/bisect: add ccache optionJouni Hogander2020-09-211-1/+2
| | | | | | Add option to use ccache in kernel builds. Signed-off-by: Jouni Hogander <jouni.hoegander@partner.bmw.de>
* pkg: get and store Maintainers dataPedro Lopes2020-07-311-1/+2
| | | | | | Create a struct on pkg/vcs to store data of syzkaller email recipients and update its users. The struct contains default name, email, and a label to divide user into To and Cc when sending the emails.
* syz-ci: set Timeout for bisectionsDmitry Vyukov2020-07-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Timeout config param for bisections. Specify timeout in syz-ci as 8h based on the following data. Out of 1049 cause bisections that we have now: - 891 finished under 6h (84.9%) - 957 finished under 8h (91.2%) - 980 finished under 10h (93.4%) - 989 finished under 12h (94.3%) - 1011 finished under 18h (96.3%) - 1025 finished under 24h (97.7%) There is also a significant increase in errors/inconclusive bisections after ~8h. Out of 4075 fix bisections: - 4015 finished under 6h (98.5%) - 4020 finished under 8h (98.7%) - 4026 finished under 10h (98.8%) - 4032 finished under 12h (98.9%) Significant increase in errors starts after ~12h. The current timeout also take into account that bisection jobs compete with patch testing jobs (it's bad delaying patch testing). When/if bisection jobs don't compete with patch testing, it makes sense to increase this to 12-24h. Fixes #1923
* pkg/bisect: fix noop change detection with config minimizationDmitry Vyukov2020-07-021-18/+23
| | | | | | Config minimization did not update test results for the starting commit. Test result for the starting commit still refered to the original config, not the minimized config that was actually used during bisection.
* pkg/bisect: move checking of minimized config into common codeDmitry Vyukov2020-07-021-0/+13
| | | | | That part is not linux-specific, move it to the common code. The more code we have in the common code, the more code we can test.
* pkg/bisect: don't overwrite user configurationDmitry Vyukov2020-07-021-20/+21
| | | | | We don't own this object and should not touch, it may be unexpected by the caller and may cause data races.
* pkg/bisect: don't ignore errors during config minimizationDmitry Vyukov2020-07-021-25/+31
| | | | | | | Ignoring errors is bad. It leads to silent failures. If there is some particular error condition that is expected to happen and we want to ignore, we need to ignore that one only rather than all potenital errors in the whole process.
* pkg/bisect: minor style fix upsDmitry Vyukov2020-07-021-18/+15
|
* pkg/bisect: fix crash when all releases are brokenDmitry Vyukov2020-07-021-0/+6
| | | | Currently we crash with nil deref in this special case.
* pkg/bisect: Implement config bisectionJouni Hogander2020-07-021-13/+70
| | | | | | | | | Implement Linux kernel configuration bisection. Use bisected minimalistic configuration in commit bisection. Utilizes config_bisect.pl script from Linux kernel tree in bisection. Modify syz-bisect to read in kernel.baseline_config. This is used as a "good" configuration when bisection is run.
* Pass baseline config aroundJukka Kaartinen2020-07-021-7/+8
| | | | | | | | Add new new Syzkaller configuration option kernel_baseline_config. This option is supposed to be used by kernel configruation bisection as a "good" config" Signed-off-by: Jukka Kaartinen <jukka.kaartinen@unikie.com> Signed-off-by: Jouni Hogander <jouni.hogander@unikie.com>
* pkg/build: find maintainers for build errorsDmitry Vyukov2020-05-091-2/+2
| | | | | | | Extract build error source file and obtain maintainers so that we can mail the report to the right people. Update #1667
* pkg/bisect: minor refactoringDmitry Vyukov2019-12-101-3/+4
| | | | | Define the bisection predicate closure in a separate statement, it become too large over time.
* pkg/bisect: always test parent commitDmitry Vyukov2019-12-101-21/+59
| | | | Fixes #1527
* dashboard/app: don't report bisections pointing to release commitsDmitry Vyukov2019-11-271-0/+7
| | | | | | | | | | | They should have been detected by "same binary" logic. But the problem is that we may use different compilers for different commits and they switch exactly at release commits. So we can build the release with a differnet compiler than the rest of commits and then obviously it won't be "same binary". Detect release commits separately. Update #1271
* pkg/bisect: fix some off-by-onesDmitry Vyukov2019-11-271-14/+19
| | | | | | | | | | 3/4 added tests currently fail. The problem is that we don't collect results from initial bisection range detection. As the result we won't detect "same binary" for release and first commit in a release. Update #1271
* pkg/bisect: add more logging for build signaturesDmitry Vyukov2019-11-181-0/+5
| | | | | It seems that some signatures that should be equal are not (or something else is going on). Add some logging for transparency.
* pkg/bisect: detect wrong bisectionsDmitry Vyukov2019-11-071-75/+112
| | | | | | | | Detect bisection to merge commits and to commits that don't affect kernel binary (comments, other arches, whitespaces, etc). Such bisections are not reported in emails (but shown on web). Update #1271
* pkg/bisect: modify Run() to return information about commitZubin Mithra2019-11-051-43/+51
| | | | | | | * Modify Run() to return the commit object when a failure occurs on the oldest tested release(for BisectCause) and latest tested release(for BisectFix). * Modify tests to check the returned commit object.
* pkg/vcs: make EnvForCommit return full compiler pathDmitry Vyukov2019-10-221-4/+3
| | | | | | | All callers of EnvForCommit need the compiler path, so move this logic into EnvForCommit to avoid duplication. Also simplifies tests because test impl can now return an empty compiler (which should be unused).
* pkg/bisect: add initial testing support for cause bisectionZubin Mithra2019-10-221-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | (note: incomplete change) Refactor existing code as follows: * Move reusable test utility functions from git_repo_test.go to pkg/vcs/test_util.go and make them exported. * Split Run() into Run()+runImpl(). * Change type of bisect.go:env.inst to `instance.BuilderTester`. Change usage inside syz-testbuild/testbuild.go accordingly. * Move most of linux.PreviousReleaseTags() into vcs/git.go as git.previousReleaseTags(). * Allow build.CompilerIdentity to be mocked. Introduce the following changes: * instance.BuilderTester is an interface with methods BuildSyzkaller() BuildKernel() Test() NewEnv() now returns this interface. * type testEnv implements instance.BuilderTester. * type testBuilder implements builder interface. Add a entry into table inside pkg/build/build.go:getBuilder() to return testBuilder object.
* syz-ci: don't assume kernel config is called .configDmitry Vyukov2019-05-121-1/+1
| | | | | .config is linux-ism. We have a convention that kernel config is copied to kernel.config file. Use it.
* syz-ci: always use 10 VMs for bisectionDmitry Vyukov2019-05-101-3/+4
| | | | | If a manager has less then 10 VMs override it to 10 for bisection. If a manager has only 1 VM, bisection won't end well.
* pkg/bisect: detect when too many instances erroredDmitry Vyukov2019-03-221-1/+6
| | | | | | | | | We currently skip a commit iff all 10 instances errored. But if, say, only 9 errored we consider it as OK, but this significnalty reduces chances of detecting flaky crashes. So skip if more than 2/3 errored. Update #501
* pkg/bisect: use CheckoutCommit instead of SwitchCommitDmitry Vyukov2019-03-201-1/+1
| | | | | | | | | | Use CheckoutCommit instead of SwitchCommitto get the crashing commit. The problem is with trees like linux-next. They require at least fetching tags and maybe even different tree (-history). Use CheckoutCommit which at least fetches tags which is enough for recent commits. Update #501
* pkg/bisect: various improvementsDmitry Vyukov2019-03-171-115/+110
| | | | | | | | | | A bunch of improvements after more wide bisection testing. Improve logging. Support returning several commits for inconclusive bisection. Return Report with the final crash. Remove code that was moved to pkg/vcs. Update #501
* pkg/vcs: refactor bisection supportDmitry Vyukov2019-03-171-3/+10
| | | | | | | | | | | | | | | In preparation for syz-ci bisection: - move bisection function into a separate interface they look out of place in vcs.Repo because most OSes don't implement it and most users don't case - extract author name and more CC emails for commits - move linux-specific PreviousReleaseTags into linux.go - fix inconclusive bisection (more than 1 potential commits) - add tests fr bisection - add maintainers returned from get_maintainers.pl for commits that don't have enough emails (e.g. only author email) Update #501
* pkg/bisect: check existence of input filesDmitry Vyukov2018-12-171-0/+20
| | | | | | It's better to fail early then to wait for kernel build. Update #501
* pkg/mgrconfig: move from syz-manager/mgrconfigDmitry Vyukov2018-08-021-1/+1
| | | | | | | | mgrconfig was used only by syz-manager initially, but now it's used by a dozen of packages and it's weird to import from under a binary dir. pkg/ is much more reasonable dir for a widely used helper package.
* syz-ci: fix arch passed to build.CleanDmitry Vyukov2018-07-171-2/+2
|
* pkg/vcs: pave way for multi-vcs supportDmitry Vyukov2018-06-271-9/+15
| | | | | Wrap current git interface in abstract interface. Provide constructor that create repo interface for the given os/vm.
* pkg/vcs: move from pkg/gitDmitry Vyukov2018-06-271-30/+30
| | | | Rename pkg/git to pkg/vcs because we need to support not only git.
* pkg/build: pave way for multi-OS supportDmitry Vyukov2018-06-221-2/+4
| | | | | | Unify kernel and image build, that distinction is really uninteresting. Define interface that each OS needs to implement. Add gvisor stub.
* pkg/build: move from pkg/kernelDmitry Vyukov2018-06-221-4/+4
| | | | Rename pkg/kernel to pkg/build and prepare for multi-OS support.
* pkg/kernel: allow to split full make outputDmitry Vyukov2018-05-171-1/+6
| | | | | | | | | | | Currently kernel build failures are insanely verbose (contain full kernel build output) and there is no way to separate short descriptions from full output. Make it possible. Also try to extract failure root cause froom build log. Use this in pkg/bisect to not pollute log on build failures. Update #501
* pkg/bisect: stop at Linux v3.8Dmitry Vyukov2018-05-171-0/+9
| | | | Update #501
* pkg/bisect: increase number of tries to 8Dmitry Vyukov2018-05-171-14/+30
| | | | | | | | | With 5 tries sometimes only 1 fails, and sometimes we probably have false negatives. Increase number of tries to 8 and compress results if they all are the same. Update #501
* pkg/git: extract relevant email addresses from commitsDmitry Vyukov2018-05-171-0/+1
| | | | Update #501
* pkg/bisect: add bisection logicDmitry Vyukov2018-05-171-0/+306
Add first version of bisection package (supports both bug and fix bisection). And tools/syz-bisect wrapper for testing. Update #501