You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/wgengine/bench
Josh Bleecher Snyder 8d2a90529e wgengine/bench: hold lock in TrafficGen.GotPacket while calling first packet callback
Without any synchronization here, the "first packet" callback can
be delayed indefinitely, while other work continues.
Since the callback starts the benchmark timer, this could skew results.
Worse, if the benchmark manages to complete before the benchmark timer begins,
it'll cause a data race with the benchmark shutdown performed by package testing.
That is what is reported in #1881.

This is a bit unfortunate, in that it means that users of TrafficGen have
to be careful to keep this callback speedy and lightweight and to avoid deadlocks.

Fixes #1881

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
3 years ago
..
bench.go wgengine/bench: close Engines on benchmark completion 3 years ago
bench_test.go wgengine/bench: close Engines on benchmark completion 3 years ago
trafficgen.go wgengine/bench: hold lock in TrafficGen.GotPacket while calling first packet callback 3 years ago
wg.go wgengine/bench: handle multiple Engine status callbacks 3 years ago