aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/report/report.go
Commit message (Collapse)AuthorAgeFilesLines
* pkg/report: move TitleToCrashType to crash packageDmitry Vyukov2026-01-091-12/+1
| | | | | | | | | TitleToCrashType is a simple function with no heavy dependencies that is used by the dashboard app. Currnetly we have to import pkg/report into dashboard/app, and this package has lots of heavy deps (symbolizer, demangler, coverage report generation, etc). Move TitleToCrashType to pkg/report/crash (where it arguably belongs anyway).
* pkg/manager: store tail reportsTaras Madan2025-08-281-0/+15
| | | | Send only the first report to dashboard.
* vm: refactoringTaras Madan2025-08-071-1/+1
| | | | | 1. func Run optionally accepts the opts. 2. Some refactoring, more comments.
* all: apply linter auto fixesTaras Madan2025-07-171-4/+4
| | | | ./tools/syz-env bin/golangci-lint run ./... --fix
* dashboard/app: use crash types instead, no regexpsTaras Madan2025-07-021-2/+2
|
* pkg/report: factor out type definitionsTaras Madan2025-06-271-24/+13
|
* pkg/report: minor refactoringTaras Madan2025-06-201-17/+17
| | | | | | setExecutorInfo is closer to Report. Distinguish reportType and defaultReportType Make setter a Report member function.
* pkg/report: improve Rust report parsingAleksandr Nogikh2025-06-201-3/+7
| | | | | | | We need to look for the error type after the "rust_kernel: panicked" line. Ignore some common irrelevant frames.
* pkg/report: demangle Rust reportsAleksandr Nogikh2025-06-181-1/+2
| | | | | | | | Do demangling as a part of Symbolize() processing. Add a TestSymbolize test to verify the results. Fix old report_test.go bugs to better react to the -update flags. Closes #6035.
* pkg/report: include partially stripped prefixes to alt titlesAleksandr Nogikh2025-04-151-28/+115
| | | | | It will help avoid bug duplication in case of adding new prefixes to strip.
* pkg: use kernelDir instead of 3 parametersTaras Madan2025-03-271-14/+10
| | | | It allows to reduce parameters count for some functions.
* all: use min/max functionsDmitry Vyukov2025-01-171-5/+3
| | | | They are shorter, more readable, and don't require temp vars.
* pkg/report: better suppress ALSA-caused go runtime errorAleksandr Nogikh2024-09-231-0/+1
| | | | | | Sometimes it may happen that we only get part of the string. Let's suppress the report both for the specific error message and for ALSA in general.
* pkg/report: extract the syz-executor infoAleksandr Nogikh2024-08-221-0/+7
| | | | | For Linux bugs, extract the proc id and the prog id from the crash report.
* pkg/report: support to symbolize line with module+offsetJoey Jiao2024-07-231-0/+13
|
* sys/targets: add consts for gvisor/starnixDmitry Vyukov2024-05-271-3/+3
| | | | | Lint started warning about duplicate "gvisor" const in pkg/cover. Add gvisor/starnix consts to sys/targets package to avoid duplication.
* syz-ci: switch to using syz-manager for smoke testingDmitry Vyukov2024-05-211-0/+2
| | | | | Add smoke testing mode to manager and use it in syz-ci instead of pkg/instance which uses syz-fuzzer binary.
* pkg/report: remove unnecessary NewScan() callsAleksandr Nogikh2024-04-151-6/+11
| | | | | These are susceptible to potentially very long lines in the input. Direct splitting by \n is more reliable.
* all: remove akaros supportDmitry Vyukov2024-04-151-1/+0
| | | | | | | Akaros support is unused, it was shutdown on syzbot for a while, the akaros development seems to be frozen for years as well. We have a bunch of hacks for Akaros since it supported only super old gcc and haven't supported Go. Remove it.
* syz-manager: truncate repro logs before reportingAleksandr Nogikh2024-02-211-0/+21
| | | | | Until we have figured out a way to solve #4495, let's just truncate repro logs before sending them over the dashboard API.
* pkg/report: gather Go runtime bugs under one bugFlorent Revest2023-07-261-12/+13
| | | | | | | | | | | | | | | | | | | | | | | When a "fatal error:" bug is reported, this usually means that syzkaller itself had a memory corruption (except in the gVisor fuzzing case where this could be an actual bug in gVisor) Most likely, this is due to a kernel that went wild and corrupted the syzkaller address space, but in that case the exact details of what part of the runtime failed are rarely relevant. This gathers all these go runtime errors under one umbrella so they are easier to track. Except for gVisor on which the logic is kept the same as existing. Add three test cases to the linux reporting: - 705 (equivalent to the current all/report/7) to make sure Go OOO are suppressed (they have a different title now but still get suppressed) - 706 (equivalent to the current all/report/8) to make sure that ALSA "fatal errors" are not handled as Go fatal errors - 707 (new) to make sure that reports like https://syzkaller.appspot.com/bug?extid=3f00d7083c52713ba3b0 are re-named to "go runtime error"
* all: use special placeholder for errorsTaras Madan2023-07-241-1/+1
|
* pkg/report: introduce crash.SyzFailure report typeAleksandr Nogikh2023-07-061-2/+2
| | | | It refers to SYZFAIL and SYZFATAL errors.
* pkg/report: move report.Type to pkg/report/crashAleksandr Nogikh2023-07-051-32/+13
| | | | | This will help avoid a circular dependency pkg/vcs -> pkg/report -> pkg/vcs.
* pkg/report: extract more report types for LinuxAleksandr Nogikh2023-07-051-29/+32
| | | | Amend oops and oopsFormat to contain report type.
* pkg/report: refactor TypeAleksandr Nogikh2023-07-051-20/+7
| | | | Make it string -- it will be easier and cause less code duplication.
* pkg/bisect: mark jobs with untestable history as failedSpace Meyer2023-05-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Background info: When a bisection is started, we only know the kernel commit on which syzkaller encountered the crash. Before the actual bisection begins, bisect() needs to find a good commit. Then we can bisect between them. For fix bisections bisect() tests HEAD. If HEAD doesn't have the bug the fixing commit must be somewhere in the middle. For cause bisection we test a number of old releases, starting with the newest release. Both this commit range search and the actual bisection later use test() to build the kernel and run the reproducer. During actual bisections we invoke test() for every step. If any test() invocation returns a non nil error, the bisection it was called from is aborted. Any non-fatal errors should be signaled via the testResult returned from test(). For this reason a build/boot failure does not return an error. Instead testResult.verdict will be vcs.BisectSkip. The Problem: Given the following call stack: bisect() -> commitRange() -> commitRangeFor{Fix,Cause}() -> test() Previously we reported fix bisections, where HEAD was build broken and cause bisections where all tested releases were build broken as inconclusive. This is confusing for users. For fix bisections it looks like the fixing commit is either the commit from the original crash or HEAD. For cause bisections it looks like the breaking commit is either the original commit or the commit of the oldest tested release. Neither is correct. For fix bisections we see this, when the HEAD of a tested branch is build broken. When this happens all attempted fix bisections will get nonsense results. For cause bisections we see this, when changes to the bisection compilers or test rootfs cause us to not be able to build or boot very old kernels. These inconclusive bisection results will not be retried automatically and we don't have an easy way to clear them. The Solution: For fix bisections: Retry the bisection later. If HEAD is completely broken we will know, because fuzzing will stop. For cause bisections: Mark the bisection as failed. The result is unlikely to change in the future without intervention by the syzbot admins. Users won't bother looking at those bisections and the dashboard already has code to mass-retry failed bisections. - In test(): Populate testResult.rep with a meaningful report before returning, after build/boot failures. - In bisect(): Explicitly check the testResult.verdict of the last commit tested in commitRange(), instead of using testResult.rep==nil as an oracle for aborting the bisection. - In bisect(): Don't return an inconclusive result when build/boot failures prevent us from finding a commit range to bisect between.
* pkg/report: ignore ALSA fatal errorsDmitry Vyukov2023-02-221-1/+3
| | | | | Of course something in the kernel prints "fatal error" and it's not a kernel bug.
* pkg/report: improve Go throw/panic parsingDmitry Vyukov2023-02-221-1/+22
| | | | | | | | | | | | | | | This several small improvements: 1. Move these patterns into the common part. We run Go code on (almost) all OSes and error messages are the same for all of them. 2. Detect "fatal error:" as a bug as well. This is what I currently see from Go 1.20 runtime, but we don't recognize it, so these reports probably go into "lost connection" bucket now (bad). 3. Add a pattern for panic(ENOMEM) message. pkg/image/compression_optimized.go can produce it on mmap failure. 4. Add tests.
* pkg/report: add a ReportToGuiltyFile methodAleksandr Nogikh2023-02-081-0/+14
| | | | | | | | We cannot unfortunately just substitute Report and invoke Symbolize(), because in this case a non-emtpy reportPrefixLen may lead to `panic: runtime error: slice bounds out`. Create a special external method in the pkg/report package.
* vm/starnix: add support for fuzzing starnix (#3624)juanPabloMiceli2023-01-191-1/+2
| | | | | | | This commit adds a new VM for fuzzing starnix. The VM will boot a fuchsia image using the `ffx` tool and will connect to an adb server inside it. Fuzzing will be done using HostFuzzer mode due to some features not being implemented yet in starnix. Once this is possible, fuzzing will be performed without HostFuzzer mode. Co-authored-by: Juampi Miceli <jpmiceli@google.com>
* pkg/report: export GuiltyFile and report it to the dashboardAleksandr Nogikh2022-12-161-3/+3
|
* pkg/report: extract top frame in arm reportsDmitry Vyukov2022-11-151-1/+0
|
* pkg/report: don't call get_maintainer.pl for cuttlefishkalder2022-11-091-0/+2
| | | | | | | | | | | | | * pkg/report: check for get_maintainer.pl before calling it For Android kernels, this tool will be in a different location (common/scripts/get_maintainer.pl). Currently this causes the Symbolize() call to fail, which stops reproduction. * pkg/report: check for get_maintainer.pl before calling it For Android kernels, this tool will be in a different location (common/scripts/get_maintainer.pl). Currently this causes the Symbolize() call to fail, which stops reproduction.
* pkg/report: better replace numbersDmitry Vyukov2022-10-041-1/+8
| | | | | | | | Currently "./syzkaller-testdir264563108" is replaced with "./syzkaller-testdir2ADDR". That's due to a bug in the ADDR replacement rule. Fix it. Also improve NUM replement b/c currently "testdir264563108" is considered as it can be a function name.
* pkg/report: improve guilty file identificationHrutvik Kanabar2022-09-301-0/+2
| | | | | | | | | | | | | | | | | | | | | Previously we would pick the first non-ignored file. Now instead, continue searching the stack trace for more specific files. A "more specific" file wrt the first non-ignored file has: - the same directory prefix - a deeper directory nesting E.g. `fs/ntfs3/*.c` is "more specific" than "fs/*.c". We search for the most specific file (i.e. the deepest nesting), and take the first most specific if there are multiple files with the same nesting. This commit also adds three tests for this behaviour, taken from recent `syzbot` bugs which identified the wrong file. Now the desired file is identified. Only one existing test shows different output with the new behaviour. Updates #3393.
* report: report fuzzer fatal errorsAndrei Vagin2022-04-251-0/+13
| | | | Signed-off-by: Andrei Vagin <avagin@google.com>
* pkg/report: use KMSAN origin to dedup reportsDmitry Vyukov2022-01-041-26/+50
| | | | | | | | Support extracting multiple frames from a single report (one per parseStackTrace marker). Extract KMSAN origin frame and use it as an additional ALT title for deduplication. Fixes #2927
* syz-manager: don't symbolize reproducer twiceDmitry Vyukov2021-12-201-0/+6
| | | | | | | | The recent commit 'pkg/mgrconfig: add "interests"' made pkg/repro symbolize returned reports. But syz-manager symbolizes them as well. This leads to double symbolization. Don't symbolize second time. Fixes #2934
* pkg/mgrconfig: add "interests"Dmitry Vyukov2021-12-161-3/+50
| | | | | | | We have "suppressions" parameter to suppress non-interesting reports. Add "interests" parameter which is an opposite of "suppressions" -- everything that's not in "interests" is suppressed. It's matched against bug title, guilty file and maintainer emails.
* pkg/report: parse new-style KMSAN reportsAleksandr Nogikh2021-11-161-1/+3
| | | | | | | | | Currently KMSAN does not include the "Call Trace" line into its reports. As syzkaller still expects it, most of those reports end up being classified as corruped and do not get published by syzbot (see #2733). Adjust the parsing rules to support these new reports. Add a test to validate the new behavior.
* pkg/report: do more agressive NUM-replacementAleksandr Nogikh2021-08-131-8/+14
| | | | | | | | | | | | Replace not just long sequences of digits in report titles, but every sequence of '0'-'9' that is not surrounded by word characters. As such matches will overlap and Go does not (currently?) support regexp lookarounds, do the replacement multiple times until there is nothing more to do. This should not slow down syzkaller, since this code is only invoked during crash processing. Restrict LINE replacement only to fragments that have a preceeding file name. This prevents replacements like [1:2] -> [NUM:LINE].
* all: use entire log to detect reports to suppressAleksandr Nogikh2021-08-061-10/+12
| | | | | | | | | | Currently syzkaller only applies its suppressions regexps to the oops message itself and a small number of its preceding bytes. A case has been reported (#2685), where it was important to analyse a bigger portion of output data. Pass the whole log and a starting position to the `Report.Parse` method separately instead of passing an already cut log there. Adjust use cases of the `Report.Parse` method to handle its new behavior.
* pkg/report: separate reporter wrapper from OS-specific implementationsAleksandr Nogikh2021-08-061-16/+30
| | | | | | | | | | | | | Currently a number of report post-processing activities are implemented as a decorator over the interface that defines OS-specific implementations. Following exactly the same interface is too restrictive in this case as adding extra parameters to the post-processing forces the developer to adjust all implementations thay may not need these parameters at all. Untie the wrapper from the Reporter interface. Use a package-private reporterImpl interface for the OS-specific implementations, while having an exported Reporter structure. Make sure that Reporter is stored and passed as a pointer.
* pkg/report: initial darwin supportPatrick Meyer2021-05-201-0/+1
|
* pkg/report: ignore another android panic in logDmitry Vyukov2021-02-251-0/+1
|
* pkg/report: detect executor failuresDmitry Vyukov2021-02-211-0/+12
| | | | | | | | | | | | Currently all executor fail errors go into "lost connection" bucket. This is not very useful. First, there are different executor failures. Second, it's not possible to understand what failures happen how frequently. Third, there are not authentic lost connection. Create separate SYZFAIL: bugs for them. Update #573 Update #502 Update #318
* pkg/report: fix NUM replacementDmitry Vyukov2021-02-121-2/+2
|
* pkg/report: support alternative bug titlesDmitry Vyukov2021-01-171-2/+16
| | | | Update #1575
* pkg/report: replace IP addresses in titlesDmitry Vyukov2020-12-081-0/+5
|