aboutsummaryrefslogtreecommitdiffstats
path: root/vm/gce
Commit message (Collapse)AuthorAgeFilesLines
* vm/gce: enable display device configurationAleksandr Nogikh2022-03-221-8/+10
| | | | Now we always enable it, make this configurable for GCE instances.
* vm/gce: allow ssh-rsa from Run()Aleksandr Nogikh2021-09-301-0/+2
| | | | Allow ssh-rsa not only from getSerialPortOutput(), but also from Run().
* vm/gce: avoid ssh-rsa for user, for now allow it as host-keyGreg Steuck2021-09-301-1/+4
| | | | | | | | | | | | | | | | | OpenSSH 8.8 release disables RSA signatures using the SHA-1 hash algorithm by default. Sadly, the ssh-serialport.googleapis.com:9600 uses the deprecated algorithm for host-key. The end-point identifies itself as: debug1: Remote protocol version 2.0, remote software version Go debug1: no match: Go ... debug1: kex: algorithm: curve25519-sha256@libssh.org debug1: kex: host key algorithm: ssh-rsa This should be fixed on the server side, but for now I added a workaround of enabling this deprecated algorithm.
* vm/gce: adjust log level for timeout errorsAleksandr Nogikh2021-09-291-2/+2
| | | | | | These messages are of relevance to debugging problems on syz-ci's side, but due to log level 1 they are not saved to logs by default. Set their log level to 0.
* pkg: update generated files to go 1.17Alexey Kardashevskiy2021-07-072-0/+2
| | | | | | | | | | | "make generate" produces this diff when go 1.17 (go1.17-c95464f0ea3f==upstream) is used. Seems compatible with >=1.16. https://github.com/golang/go/commit/4d2d89ff42ca documents the syntax. https://github.com/golang/go/commit/eeadce2d8713 enforces "ignore" for unsatisfiable tags hence the pkg/csource/gen.go change. Signed-off-by: Alexey Kardashevskiy <aik@linux.ibm.com>
* vm/gce: change how GCE ssh magic is enabledDmitry Vyukov2021-01-291-1/+1
| | | | | | We used to use empty ssh key as indication to use the GCE magic, but this conflicts with using no ssh key at all (empty password). Use string "GCE" instead to enable GCE magic.
* vm/qemu, vm/gce: dump LOCKDEP state in DiagnoseDmitry Vyukov2020-11-211-10/+20
| | | | | For context see the discussion at: https://groups.google.com/g/syzkaller/c/ruwaYUvwHTw/m/E9Cg9OfvAgAJ
* vm: pass Report to DiagnoseDmitry Vyukov2020-11-211-1/+2
| | | | | | | | | The way to diagnose generally depends on the issue. E.g. do we need register dump to debug this issue? Do we need host dmesg dump? Some diagnosis may be directly specific to a particular problem (e.g. dumping a particular debugfs/procfs file). Pass Report to Diagnose to make this possible.
* sys/targets: add OS/Arch name constsDmitry Vyukov2020-10-261-4/+5
| | | | | | | | | | | | We use strings to identify OS/Arch. These strings are duplicated throughout the code base massively. golangci-lint points to possiblity of typos and duplication. We already had to define these names in pkg/csource and disable checking for prog package. A future change triggers such warnings in another package. Add OS/Arch name consts to sys/targets so that they can be used to refer to OS/Arch. Use the consts everywhere.
* .golangci.yml: enable whitespace checkerDmitry Vyukov2020-06-051-1/+0
| | | | Points to bad empty lines very precisely.
* vm/vmimpl: refactor DiagnoseFree/OpenBSDDmitry Vyukov2020-03-211-2/+2
| | | | | Make signatures of these functions match vm.Diagnose. Both more flexible, less code, more reasonable.
* vm: Get debug information when FreeBSD on panics (#1470)Andrew Turner2019-10-211-0/+3
| | | | The FreeBSD kernel debugger can provide more information when the kernel panics. Add support to bhybe and gce to print this information.
* vm/gce: allow non-preemptible VMsDmitry Vyukov2019-03-281-3/+6
| | | | | | | | | We are seeing some flakes during bisection and image testing. Hard to tell what's the root cause because they are episodic. But using non-preemptible VMs for bisection and image testing looks good on all fronts. Update #501
* vm/qemu: detect boot errors fasterDmitry Vyukov2019-03-171-1/+1
| | | | | | | | | Currently we try to ssh into the machine for 10 minutes even if it crashed right away. Make qemu exit on kernel panic and stop ssh'ing when qemu exits. Handling bad kernels fast is actually important for bisection. Update #501
* vm/vmimpl: produce better error in WaitForSSHDmitry Vyukov2019-01-241-1/+1
| | | | | Currently we squash VerboseError which leads to too lengthy build error titles. Handle verbose error more carefully.
* vm: allow Diagnose to directly return diagnosisMichael Pratt2018-12-211-3/+3
| | | | | | Rather than writing the diagnosis to the kernel console, Diagnose can now directly return the extra debugging info, which will be appended ot the kernel console log.
* vm/gce: close old consolew in RunDmitry Vyukov2018-12-021-0/+3
| | | | Run can be executed several times on a VM.
* vm/gce: use openbsd console diagnostic code for both vmm and gceGreg Steuck2018-12-021-11/+20
| | | | | | | | * openbsd: use console diagnostic code for both vmm and gce. * gometalinter wants less indentation and more stuff in scope * Comment no longer applies
* vm/qemu: improve debug outputMichael Tüxen2018-11-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | * vm/qemu: Improve debug output. When running in debug mode, the number of VMs is reduced to 1. State this in the debug output. * vm/qemu: Don't start debug output with a capital letter. As requested by Dimitry. * vm: Provide debug message when reduing number of VMs. Apply this change to all affected platforms for consistency. Suggested by Dmitry. * Add myself to AUTHORS/CONTRIBUTORS files. * vm: Fix compilation issues missed in earlier commit. * vm: Use logging to write debug message.
* openbsd: run on gceGreg Steuck2018-11-273-9/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * build/openbsd: minor cleanup (use tuples instead of maps) * Grammar nits in comments. * Simplify openbsd.Create, will defer when there's more than one error exit. * pkg/build: Support copying kernel into GCE image * Simple test for openbsd image copy build. * Cleanup in case something failed before. * Support multi-processor VMs on GCE. * More debug * Reformat * OpenBSD gce image needs to be raw. * GC * Force format to GNU directly on Go 1.10 or newer. * Use vmType passed as a parameter inside openbsd.go * gofmt * more fmt * Can't use GENERIC.mp just yet. * capitalize * Copyright
* syz-ci: de-hardcode list of VMs that support overcommitDmitry Vyukov2018-09-111-1/+1
| | | | | | | | We currently have this list in multiple places (somewhat diverged). Specify this "overcommit" property in VM implementations. In particular, we also want to allow overcommit for "vmm" type. Update #712
* vm/gce: move console check into separate functionDmitry Vyukov2018-08-021-38/+39
| | | | Update #538
* vm/gce: fix buildDmitry Vyukov2018-07-291-1/+0
| | | | fail
* vm: fix "kill fuzzer on first kernel bug"Dmitry Vyukov2018-07-291-28/+21
| | | | | | The problem with that commit is that for GCE implementation we immidiately kill console connection too when receive diagnose signal. This leads to truncated output.
* vm/qemu, vm/gce: kill fuzzer on first kernel bugDmitry Vyukov2018-07-241-20/+28
| | | | | | | | Some kernel bugs don't stop kernel. For such bugs whiel vm.MonitorExecution waits for kernel output for 10 secs, fuzzer continues running programs and produces tons of output after the kernel bug message. Kill fuzzer once MonitorExecution detects a kernel bug.
* vm/vmimpl: factor out common code for ssh args and waiting for sshDmitry Vyukov2018-07-061-44/+11
| | | | Move common code from 4 vm implementations to vmimpl.
* vm/vmimpl: add vm.Diagnose methodDmitry Vyukov2018-06-221-0/+4
| | | | | | Diagnose is called on machine hang to try to get some additional diagnostic information from it. For now it's all stubs.
* all: get rid of underscores in identifiersDmitry Vyukov2018-05-071-15/+15
| | | | | | Underscores are against Go coding style. Update #538
* all: fix too long linesDmitry Vyukov2018-05-051-1/+2
| | | | | Not sure why I have not seen warnings about these lines on another machine...
* gometalinter: some fixes for unparamDmitry Vyukov2018-05-031-4/+4
| | | | | | But we still can't enable it as there are more [uninteresting] warnings. Update #538
* gometalinter: check dot importsDmitry Vyukov2018-05-031-11/+11
| | | | Update #538
* gometalinter: check unkeyed composite literalsDmitry Vyukov2018-05-031-1/+1
| | | | Update #538
* all: fix gometalinter warningsDmitry Vyukov2018-03-081-9/+7
| | | | Fix typos, non-canonical code, remove dead code, etc.
* pkg/gce: use current instance networkDmitry Vyukov2018-02-271-2/+2
| | | | The current instance is not necessary in the default network.
* 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/gce: always ignore serial relay errorsDmitry Vyukov2017-12-051-0/+5
| | | | | | | 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.
* syz-ci: test images before using themDmitry Vyukov2017-11-301-1/+1
| | | | | | | 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.
* 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/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-161-4/+3
| | | | | | When manager is stopped there are sometimes runaway qemu processes still running. Set PDEATHSIG for all subprocesses. We never need child processes outliving parents.
* 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
* pkg/kd: add KD protocol decoderDmitry Vyukov2017-09-281-1/+6
| | | | | | | | | | | | | | | | | | 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-271-31/+43
| | | | | | | Support custom pre-created images. Support non-root user. Use dir instead of pwd on windows. Don't use sudo on windows.
* 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/gce: support debug modeDmitry Vyukov2017-06-301-25/+32
| | | | Print ssh/console output to stdout in debug mode.
* vm/gce: fix image archive creationDmitry Vyukov2017-06-171-4/+8
| | | | See the added comment.