Commit Graph

23 Commits

Author SHA1 Message Date
Dmitry Vyukov
85d28281fb syz-manager: factor out rpc serving part
Update #605
2018-12-26 10:58:23 +01:00
Dmitry Vyukov
e726bdf922 syz-manager: make rpc communication finer grained
RPC package does excessive caching per connection,
so if a larger object is ever sent in any direction,
rpc connection consumes large amount of memory persistently.
This makes manager consume gigs of memory with large
number of VMs and larger corpus/coverage.

Make all communication done in very limited batches.
2018-06-26 13:59:47 +02:00
Dmitry Vyukov
9fe5658a1b gometalinter: check dot imports
Update #538
2018-05-03 14:41:34 +02:00
Dmitry Vyukov
36d1c4540a all: fix gometalinter warnings
Fix typos, non-canonical code, remove dead code, etc.
2018-03-08 18:48:26 +01:00
Dmitry Vyukov
aef0b7921b syz-hub: fix auth logic
Fix a bug and add a test.
2018-03-05 14:07:02 +01:00
Dmitry Vyukov
228e3d951c syz-hub: don't send all repros to new managers
We how have thousands of repros, running all of them
on new managers will take ethernity.
2018-01-22 13:55:29 +01:00
Dmitry Vyukov
a8561e92f3 syz-manager: don't save/send to dashboard repros from hub 2017-08-07 16:40:18 +02:00
Dmitry Vyukov
8af91f61b4 syz-manager, syz-hub: share repros between managers via hub
Currently hub allows managers to exchange programs from corpus.
But reproducers are not exchanged and we don't know if a crash
happens on other managers as well or not.

Allow hub to exchange reproducers.

Reproducers are stored in a separate db file with own sequence numbers.
This allows to throttle distribution of reproducers to managers,
so that they are not overloaded with reproducers and don't lose them on restarts.

Based on patch by Andrey Konovalov:
https://github.com/google/syzkaller/pull/325

Fixes #282
2017-08-07 15:28:59 +02:00
Dmitry Vyukov
a7b199253f all: use consistent file permissions
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.
2017-07-03 14:00:47 +02:00
Dmitry Vyukov
c5b6fcddca syz-hub: split client name and manager name
This allows to reduce number of hub clients by grouping managers
and creating one client per such group.
2017-06-29 17:50:44 +02:00
Dmitry Vyukov
949ccff832 pkg/rpctype: from from rpctype 2017-06-17 14:41:15 +02:00
Alexander Popov
7ebca77f72 syz-hub: fix copy-paste error in httpSummary()
Also mention Alexander Popov in AUTHORS and CONTRIBUTORS.
2017-06-14 15:59:45 +03:00
Dmitry Vyukov
ea2295f3e2 pkg/db: move from db 2017-06-03 10:41:09 +02:00
Dmitry Vyukov
23b94422d3 pkg/log: move from log 2017-06-03 10:41:09 +02:00
Dmitry Vyukov
d1032c21a0 pkg/hash: move from hash 2017-06-03 10:41:09 +02:00
Dmitry Vyukov
7e458d6416 syz-hub: send new inputs in smaller parts
Currently hub sends all inputs on first manager connect.
This can be 100K+ inputs and can take long time
and consume tons of memory. Send inputs in 1K parts.

Also increase rpc timeouts as hub still has global mutex.
2017-05-23 16:33:28 +02:00
Dmitry Vyukov
1f0546f0da manager, fuzzer, hub: move common rpc code into rpctype
If hub hangs, it causes all managers to hang as well as they call
hub under the global mutex. So move common rpc code into rpctype
and make it more careful about timeouts (tcp keepalives, call timeouts).
Also don't call hub under the mutex, the call can be slow.
2017-01-30 15:15:37 +01:00
Dmitry Vyukov
8b2c1cb5bb syz-hub: don't flush global corpus after every addition
We already flush in addInputs, no need to flush in addInput.
Also add some logging on start as it can be slow.
2017-01-30 11:02:17 +01:00
Dmitry Vyukov
c1bda19ca7 syz-hub: use db package
Hub accumulates tremendous of programs.
Storing all them in separate files can be very slow.
Use the new db package to store corpus in a single file.
2017-01-16 20:44:56 +01:00
Dmitry Vyukov
a5761fa21b syz-hub: fix log format string 2016-11-22 15:50:31 +01:00
Dmitry Vyukov
dbc7ff3805 manager: unbreak build 2016-11-18 19:18:09 +01:00
Dmitry Vyukov
e8de4be407 manager: enable keepalives on rcp connections
VMs die frequently and it causes orphan tcp rpc connections on manager.
2016-11-18 19:06:04 +01:00
Dmitry Vyukov
cd74cc9cf4 syz-hub: add program
syz-hub is used to exchange programs between syz-managers.
2016-11-17 18:38:10 +01:00