| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Enable external abortion of the instance creation process. This is
especially useful for the qemu case where we retry the creation/boot up
to 1000 times, which can take significant time (e.g. it timeouts
syz-cluster pods on unstable kernels).
The context can be further propagated to WaitForSSH, but that requires
another quite significant vm/ refactoring.
|
| |
|
|
| |
Signed-off-by: Andrei Vagin <avagin@google.com>
|
| |
|
|
| |
It allows to use context as a single termination signal source.
|
| |
|
|
|
|
|
| |
Move the VM count restriction logic info vm package.
This avoids lots of duplication, makes it supported
for VM types that failed to do this, and allows
to unify more VM count logic in future.
|
| |
|
|
|
|
|
|
|
| |
Pass Type struct directly during registration.
This allows to add additional optional parameters to VM types
without changing all VM implementations.
We we will need to add SupportsSnapshots flag and one flag to resolve #5028.
With this change it will be possible to add "SupportsSnapshots: true"
to just one VM type implemenetation.
|
| |
|
|
| |
It's better to follow standard interfaces.
|
| |
|
|
| |
Make it also "host:port" form ("stdin:0").
|
| |
|
|
|
|
|
| |
Move all syz-fuzzer logic into syz-executor and remove syz-fuzzer.
Also restore syz-runtest functionality in the manager.
Update #4917 (sets most signal handlers to SIG_IGN)
|
| |
|
|
|
| |
Lint started warning about duplicate "gvisor" const in pkg/cover.
Add gvisor/starnix consts to sys/targets package to avoid duplication.
|
| |
|
|
|
|
| |
Remove things that are only needed for target VM communication:
conditional compression, timeout scaling, traffic stats.
To minimize diffs when we switch target VM communication to flatrpc.
|
| |
|
|
|
|
|
|
| |
RPC compression take up to 10% of CPU time in profiles,
but it's unlikely to be beneficial for local VM runs
(we are mostly copying memory in this case).
Enable RPC compression based on the VM type
(local VM don't use it, remove machines use it).
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases (e.g. gVisor instances using host's network namespace)
attempts to bind() all syz-fuzzer processes to the same port result in
conflicts and fuzzing breakages.
Refactor the code to enable custom pprof configuration depending on the
vm type.
For now, just disable pprof endpoints for gVisor VMs. Once we actually
need the feature there, we can generate custom ports for every gVisor
VM.
|
| |
|
|
|
|
|
|
| |
By default, gVisor is set fs.nr_open to the maximum. In this case, large
allocations can be triggered in the Sentry and it can cause OOM-s on the
test node.
Signed-off-by: Andrei Vagin <avagin@google.com>
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
In this case, CPU time will be divided equally between vm-s.
Signed-off-by: Andrei Vagin <avagin@google.com>
|
| |
|
|
| |
This adds VM info for runsc (gVisor) instances, showing the flags passed
to runsc.
|
| |
|
|
|
|
|
| |
Let's stop instances with "runsc kill" instead of killing sandbox
processes. This will guarantee that ongoing rpc calls will not fail with
unexpected errors.
Reported-by: syzbot+084fca334720887441e7@syzkaller.appspotmail.com
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
The -alsologtostderr flag is a noop if -panic-log is also set. So before
this change, debug logs were not included in the syzkaller output logs.
By setting -debug-log=/dev/stderr, all debug logs are sent to stderr,
which syzkaller scrapes and includes in the output logs.
|
| |
|
|
|
|
|
| |
* use RunCmd instead of osutil.Run.
* remove unneeded type casting from string to []byte.
Signed-off-by: Andrei Vagin <avagin@google.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
GO's runtime calls the write system call twice to print "panic:"
and "the reason of this panic", so here is a race window when
other threads can print something to the log and we will see
something like this:
panic: log messages from another thread
The reason of the panic.
This confuses the syzkaller blacklist and dedup detection.
Signed-off-by: Andrei Vagin <avagin@google.com>
|
| |
|
|
| |
Fixes #1591
|
| |
|
| |
Signed-off-by: Andrei Vagin <avagin@google.com>
|
| |
|
|
|
|
|
|
|
|
| |
$ runsc -h
...
-alsologtostderr=false: send log messages to stderr
...
Now gvisor doesn't send log messages on stderr by default,
and if we want to see these messages, we need to specify the
alsologtostderr option.
|
| |
|
|
| |
Update #977
|
| |
|
|
|
| |
This feature has been around longer than -trace-signal. It returns the
stacks directly, which we then append to the kernel log.
|
| |
|
|
|
|
| |
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.
|
| |
|
| |
If net.Dial returns an error, conn is nil and closing it will panic.
|
| |
|
| |
vm/gvisor: support forwarding on IPv6
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Diagnose currently sends the panic signal to generate a traceback for
additional context.
However, Diagnose is also called in otherwise successful scenarios
(vm.Instance.MonitorExecution -> vm.monitor.extractError). Triggering a
panic will make this successful scenario look like a failure.
We could simply suppress this panic, but 1) that means we never shutdown
cleanly (not important, but ugly), and 2) we're less likely to detect
delayed crashes since we kill the sandbox immediately (that's what
MonitorExecution is checking for).
Instead, switch from -panic-signal to -trace-signal, which simply logs a
traceback without exiting. This option was added to runsc in
https://github.com/google/gvisor/commit/24c1158b9c21f7f8b7126e810d623a518422052e.
The other uses of Diagnose will always generate a report regardless of
an additional panic, so we're not losing any reports.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
As of commit 3f053259, gVisor sentry panics are no longer sent to the
stderr for "runsc run" by default, as that stderr belongs exclusively to
the application.
As a result, syzbot never sees the gVisor panic stack trace, and is only
reporting errors that occur when waiting for a dead sandbox.
Passing the "-debug" flag to runsc will make the sentry panics visible
to syzbot again.
|
| |
|
|
|
| |
8 is way too low. A modern beefy machine can host a hundred of VMs freely.
Make the limit consistent for all of qemu/kvm/gvisor/vmm and set it to 128.
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
| |
Presumably "debug -stacks" sometimes fails to actually dump stacks (some runtime hangs?).
Use new mechanism that just sends a signal.
|
| |
|
|
|
|
| |
os.Args[0] can be just binary name which was looked up using $PATH.
In such case copy will fail because the path does not exist.
Lookup binary name using $PATH.
|
| |
|
|
| |
We need it to crash to detect hangs.
|
| | |
|
| |
|
|
|
| |
runsc can crash on nil deref without any caps.
So give all of them all the time.
|
| | |
|
| |
|
|
| |
runsc likes to hang dead. Add timeouts to all invocations.
|
| |
|
|
|
|
|
|
|
|
| |
We have fallback coverage implmentation for freebsd.
1. It's broken after some recent changes.
2. We need it for fuchsia, windows, akaros, linux too.
3. It's painful to work with C code.
Move fallback coverage to ipc package,
fix it and provide for all OSes.
|
|
|
gvisor package provides support for gVisor, user-space kernel, testing.
See https://github.com/google/gvisor
|