aboutsummaryrefslogtreecommitdiffstats
path: root/vm
Commit message (Collapse)AuthorAgeFilesLines
* vm/gce: connect to instances by ipDmitry Vyukov2017-12-271-2/+2
| | | | | | | Don't connect by hostname, this seems to be broken on GCE. Episodically connecting by hostname gives: Could not resolve hostname: Name or service not known
* vm/qemu: respect cpu config parameterDmitry Vyukov2017-12-171-3/+15
| | | | Fixes #42
* vm/isolated: allow to specify ssh port for target machinesDmitry Vyukov2017-12-171-13/+40
|
* pkg/report: fix report extractionAndrey Konovalov2017-12-081-2/+4
| | | | | | | | | | | Try extracting report from console output only first. If that doesn't work, try extracting it from the whole log. Add regexp for executor printed BUGs. Optimize regexps for rcu detected stalls. Update rep.StartPos and rep.EndPos in vm/vm.go as well as rep.Output.
* vm/gce: always ignore serial relay errorsDmitry Vyukov2017-12-053-3/+21
| | | | | | | GCE serial reply seems to be buggy, we see lots of "serialport: VM disconnected" and "packet_write_wait: Connection to 1.2.3.4 port 9600: Broken pipe" errors, which do not have any explanation. Ignore all serial relay errors.
* dashboard/app: add manager monitoringDmitry Vyukov2017-12-012-6/+7
| | | | | | | | 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.
* syz-ci: test images before using themDmitry Vyukov2017-11-304-4/+21
| | | | | | | 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.
* pkg/report: include Maintainers into reportDmitry Vyukov2017-11-291-1/+1
| | | | | | | | | | | | | | | | | | 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.
* pkg/report: add Output to ReportDmitry Vyukov2017-11-291-15/+19
| | | | | | | | | 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.
* vm/qemu: fix up osutil.RunCmd callDmitry Vyukov2017-11-241-1/+1
|
* vm/gce: fix boot output captureDmitry Vyukov2017-11-221-7/+52
| | | | | | Turns out GetSerialPortOutput API does not work if instance has serial port connections enabled (which we always have). Get output from serial port relay service instead.
* vm: return Report from MonitorExecutionDmitry Vyukov2017-11-211-12/+35
| | | | | | 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.
* vm/gce: fix nil derefDmitry Vyukov2017-11-201-2/+2
| | | | | | | | | | | New console output code crashes with nil deref, because we shadow outer err variable and then dereference nil err. Also express ssh connect timeout in real time. Currently the timeout is on par of ~25 mins (5s sleep + 10s connect timeout) * 100. Reduce timeout to 5m of real time.
* vm/gce: provide VM console output on boot failuresDmitry Vyukov2017-11-191-0/+4
| | | | "can't ssh into the instance" is not a very useful error.
* pkg/osutil: don't leace runaway processesDmitry Vyukov2017-11-167-23/+21
| | | | | | When manager is stopped there are sometimes runaway qemu processes still running. Set PDEATHSIG for all subprocesses. We never need child processes outliving parents.
* pkg/report, pkg/repro, syz-manager: name crash attributes consistentlyDmitry Vyukov2017-11-141-4/+4
| | | | | | | | | We currently have several names for crash attributes, which is disturbing. E.g. crash title is called "Title" or "Desc". Name them consistently. Title - single line bug identity. Report - whole crash text. Log - whole fuzzer/kernel output.
* vm: remove needOutput arg for MonitorExecutionDmitry Vyukov2017-11-141-7/+3
| | | | | | Always wait 10 secs for output. If anything this can only lead to missed crashes during repro. Let's unify manager and repro behavior.
* pkg/report: combine report data into a structDmitry Vyukov2017-11-141-4/+7
| | | | | Parse returns 5 variables now. Later we may want to add crash "priority". Introduce Report struct that holds all report data.
* pkg/report: add corrupted report detectionAndrey Konovalov2017-11-131-1/+1
| | | | | This change makes pkg/report try to detect corrupted reports by using some heuristics.
* vm: merge "not executing programs" into "no output"Dmitry Vyukov2017-11-081-2/+4
| | | | | | | | Frequently it's the same condition. In one case there is just a stray error message on console that turns the crash into "not executing programs". While in another case there is no stray message, and then it's detected as "no output".
* vm/gce: fix error formattingDmitry Vyukov2017-11-071-2/+2
| | | | | | | This is detected with newer Go toolchain: vm/gce/gce.go:376: Errorf format %v reads arg #1, but call has only 0 args vm/gce/gce.go:381: Errorf format %v reads arg #1, but call has only 0 args
* vm/vmimpl: add netbsd console stubDmitry Vyukov2017-10-261-0/+12
|
* vm/qemu: support netbsdDmitry Vyukov2017-10-231-0/+4
|
* pkg/report: support multiple OSesDmitry Vyukov2017-10-181-5/+5
| | | | | | Introduce report.Reporter interface. Add an implementation per-OS. Make users be explicit about OS they are testing.
* vm/qemu: update error message for newer qemuDmitry Vyukov2017-10-171-1/+2
| | | | Newer qemu prints "Could" instead of "could".
* vm/qemu: add freebsd supportDmitry Vyukov2017-10-021-0/+4
|
* pkg/kd: add KD protocol decoderDmitry Vyukov2017-09-282-1/+20
| | | | | | | | | | | | | | | | | | Very primitive decoder that only decodes amd64 exceptions. Use it in vm/gce. Now crashes contain something more or less reasonable which is caught by manager as crash: BUG: first chance exception 0x80000003 &kd.stateChange64{state:0x3030, processorLevel:0x6, processor:0x0, numProcessors:0x2, thread:0xffff9c0bd015e080, pc:0xfffff8017615c380, exception:kd.exception64{code:0x80000003, flags:0x0, record:0x0, address:0xfffff8017615c380, numParams:0x1, unused:0x0, params:[15]uint64{ 0x0, 0x40, 0xfffff801768699e0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, firstChance:0x1}, report:kd.controlReport{ dr6:0xffff0ff0, dr7:0x400, eflags:0x86, numInstr:0x10, reportFlags:0x3, instr:[16]uint8{0xcc, 0xc3, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xf, 0x1f, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0}, cs:0x10, ds:0x2b, es:0x2b, fs:0x53}}
* vm/gce: fix GCE image checkDmitry Vyukov2017-09-281-3/+3
|
* vm/gce: windows supportDmitry Vyukov2017-09-274-47/+64
| | | | | | | Support custom pre-created images. Support non-root user. Use dir instead of pwd on windows. Don't use sudo on windows.
* vm/qemu: fix typoDmitry Vyukov2017-09-251-1/+1
|
* vm/qemu: initial multi-OS supportDmitry Vyukov2017-09-251-6/+13
|
* vm/qemu: tune some qemu arguments based on target archDmitry Vyukov2017-09-151-13/+31
|
* vm/vmimpl: add target OS/arch to envDmitry Vyukov2017-09-151-0/+2
| | | | Allows future VM tuning based on target OS/arch.
* Fix reboot support for VM isolatedThomas Garnier2017-08-301-6/+7
| | | | | | | Do not fail a reboot if the reboot command returns an error. Reduces the wait time per ssh commands to 30 seconds. Signed-off-by: Thomas Garnier <thgarnie@google.com>
* all: support i386 archDmitry Vyukov2017-08-191-0/+16
| | | | Update #191
* vm/vmimpl: support linux/armDmitry Vyukov2017-08-181-0/+16
| | | | Update #324
* vm/gce: work around GCE console bugDmitry Vyukov2017-08-081-3/+9
| | | | | Sometimes connects to serial console spuriously fail with: Permission denied (publickey)
* vm/gce: another attempt to fix trimmed console outputDmitry Vyukov2017-08-011-0/+2
| | | | | We still see trimmed reports even with the "serialport" grep. Add a 5 second sleep in an attempt to fix it.
* vm/gce: fix truncated console outputDmitry Vyukov2017-07-251-8/+40
| | | | | | | | Sometimes we get truncated console output during repro. The problem is that we start the console reading ssh command, but do not wait for it to actually connect and start piping console. Wait while the command actually starts piping console before starting the target command.
* vm/isolated: reformatDmitry Vyukov2017-07-181-1/+0
|
* Add Isolated VMThomas Garnier2017-07-183-7/+373
| | | | | | | | Add a new isolated VM for machines that you cannot easily manage. It assumes the machine is only available through SSH and create a reverse proxy to ensure the machine can connect back to syz-manager. Signed-off-by: Thomas Garnier <thgarnie@google.com>
* all: use consistent file permissionsDmitry Vyukov2017-07-033-9/+6
| | | | | | | | | | | | | | | | 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.
* vm/gce: support debug modeDmitry Vyukov2017-06-301-25/+32
| | | | Print ssh/console output to stdout in debug mode.
* vm: increase stored log size to 1 MBAndrey Konovalov2017-06-271-1/+1
|
* vm/adb: add an option to disable battery checkDmitry Vyukov2017-06-271-3/+13
| | | | | | | | | | | | | Add a new VM option: // Ensure that a device battery level is at 20+% before fuzzing. // Sometimes we observe that a device can't charge during heavy fuzzing // and eventually powers down (which then requires manual intervention). // This option is enabled by default. Turn it off if your devices // don't have battery service, or it causes problems otherwise. Battery_Check bool Fixes #258
* vm/vmimpl: fix linux/ppc64le buildDmitry Vyukov2017-06-275-6/+29
|
* Restore TCGETS2 (#256)Zach Riggle2017-06-271-4/+2
|
* vm/vmimple: fix build and reformatDmitry Vyukov2017-06-262-10/+11
|
* Port console to Darwin (#253)Zach Riggle2017-06-263-3/+36
| | | | | | | | | | | | * Port console to Darwin * Get syz-executor to build correctly * Do not export unix and syscall constants * Add presubmit test * Add myself to contributors
* vm/gce: fix image archive creationDmitry Vyukov2017-06-171-4/+8
| | | | See the added comment.