aboutsummaryrefslogtreecommitdiffstats
path: root/vm/dispatcher/pool.go
Commit message (Collapse)AuthorAgeFilesLines
* vm: add context to Pool.Create()Aleksandr Nogikh2025-10-011-2/+2
| | | | | | | | | | 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.
* vm/dispatcher: simplify runInstance()Aleksandr Nogikh2025-08-061-12/+16
| | | | Move boot error reporting to a separate function.
* vm/dispatcher: don't block on the boot error chan on exitAleksandr Nogikh2025-08-061-2/+15
| | | | | | | React on the context cancellation even if the boot error channel is blocked. Add a test that verifies this behavior. Print a log message if the channel is full.
* vm/dispatcher: make pool.Run cancellableAleksandr Nogikh2025-04-231-7/+30
| | | | | | | | | | Make the pool.Run() function take a context.Context to be able to abort the callback passed to it or abort its scheduling if it's not yet running. Otherwise, if the callback is not yet started and the pool's Loop is aborted, we risk waiting for pool.Run() forever. It prevents the normal shutdown of repro.Run() and, consequently, the DiffFuzzer functionality.
* all: remove loop variables scopingTaras Madan2025-02-171-1/+0
|
* syz-manager: add pause functionDmitry Vyukov2024-11-081-4/+32
| | | | | | | | | The pause function is useful to make manager stop consuming CPU for some time, e.g. when it runs on a shared machine, and a user wants to use CPU for something else. Previously one would need to kill the manager process and restart later to achieve this, but the restart is costly, and aborts all bug reproductions.
* vm/dispatcher: support updating the default functionAleksandr Nogikh2024-08-131-1/+18
| | | | Stop all default VMs and restart them with the new handler.
* vm/dispatcher: fix data racesAleksandr Nogikh2024-08-021-11/+9
| | | | | | | | It was possible for poolInstance.reserve() and free() to race with instance restart in Pool.Loop(). Add more locking to poolInstance. Remove locks in one case where it was excessive.
* vm/dispatcher: move boot duration calculation to vmAleksandr Nogikh2024-07-261-0/+5
| | | | | This should be calculated in dispatcher.Pool that actually does boot VMs.
* vm/dispatcher: introduce a generic instance poolAleksandr Nogikh2024-07-111-0/+266
The pool operates on a low level and assumes that there's one default activity (=fuzzing) that is performed by the VMs and that there are also occasional non-default activities that must be performed by some VMs (=bug reproduction).