Giter VIP home page Giter VIP logo

mvfst's Introduction

alt text

Linux Build Status macOS Build Status Windows Build Status

Introduction

mvfst (Pronounced move fast) is a client and server implementation of IETF QUIC protocol in C++ by Facebook. QUIC is a UDP based reliable, multiplexed transport protocol that will become an internet standard. The goal of mvfst is to build a performant implementation of the QUIC transport protocol that applications could adapt for use cases on both the internet and the data-center. mvfst has been tested at scale on android, iOS apps, as well as servers and has several features to support large scale deployments.

Features

Server features:

  • Multi-threaded UDP socket server with a thread local architecture to be able to scale to multi-core servers
  • Customizable Connection-Id routing. The default Connection-Id routing implementation integrates seamlessly with katran
  • APIs to enable zero-downtime restarts of servers, so that applications do not have to drop connections when restarting.
  • APIs to expose transport and server statistics for debuggability
  • Zero-Rtt connection establishment and customizable zero rtt path validation
  • Support for UDP Generic segmentation offloading (GSO) for faster UDP writes.

Client features:

  • Native happy eyeballs support between ipv4 and ipv6 so that applications do not need to implement it themselves
  • Pluggable congestion control and support for turning off congestion control to plug in application specific control algorithms

Source Layout

  • quic/api: Defines API that applications can use to interact with the QUIC transport layer.
  • quic/client: Client transport implementation
  • quic/codec: Read and write codec implementation for the protocol
  • quic/common: Implementation of common utility functions
  • quic/congestion_control: Implementation of different congestion control algorithms such as Cubic and Copa
  • quic/flowcontrol: Implementations of flow control functions
  • quic/handshake: Implementations cryptographic handshake layer
  • quic/happyeyeballs: Implementation of mechanism to race IPV4 and IPV6 connection and pick a winner
  • quic/logging: Implementation of logging framework
  • quic/loss: Implementations of different loss recovery algorithms
  • quic/samples: Example client and server
  • quic/server: Server transport implementation
  • quic/state: Defines and implements both connection and stream level state artifacts and state machines

Dependencies

mvfst largely depends on two libraries: folly and fizz.

Building mvfst

Method 1 [Recommended]: Using Getdeps.py

This script is used by many of Meta's OSS tools. It will download and build all of the necessary dependencies first, and will then invoke cmake, etc. to build mvfst. This will help ensure that you build with relevant versions of all of the dependent libraries, taking into account what versions are installed locally on your system.

It's written in python so you'll need python3.6 or later on your PATH. It works on Linux, macOS and Windows.

The settings for mvfst's cmake build are held in its getdeps manifest build/fbcode_builder/manifests/mvfst, which you can edit locally if desired.

Dependencies

If on Linux or MacOS (with homebrew installed) you can install system dependencies to save building them:

# Clone the repo
git clone https://github.com/facebook/mvfst.git
# Install dependencies
cd mvfst
sudo ./build/fbcode_builder/getdeps.py install-system-deps --recursive --install-prefix=$(pwd)/_build mvfst

If you'd like to see the packages before installing them:

./build/fbcode_builder/getdeps.py install-system-deps --dry-run --recursive

On other platforms or if on Linux and without system dependencies getdeps.py will mostly download and build them for you during the build step.

Build

For a simplified build, you can use the getdeps.sh wrapper script. This will download and build all the required dependencies, then build mvfst. It will use the default scratch path for building and install the result in _build.

# Clone the repo
git clone https://github.com/facebook/mvfst.git
# Build using the wrapper script
cd mvfst
./getdeps.sh

At the end of the build, mvfst binaries will be installed at _build/mvfst. You can find the scratch path from the logs or by running python3 ./build/fbcode_builder/getdeps.py show-build-dir mvfst.

For more control over getdeps.py, you can run the tool directly.

# Show help
python3 ./build/fbcode_builder/getdeps.py build mvfst -h
# Build mvfst, using system packages for dependencies if available
python3 ./build/fbcode_builder/getdeps.py --allow-system-packages build mvfst --install-prefix=$(pwd)/_build

Run tests

By default getdeps.py will build the tests for mvfst. You can use it to run them too:

python3 ./build/fbcode_builder/getdeps.py test mvfst --install-prefix=$(pwd)/_build

Method 2 [Deprecated]: Using build.sh script

This method can be used on Ubuntu 18+ and macOS.

To begin, you should install the dependencies we need for build. This largely consists of dependencies from folly as well as fizz.

sudo apt-get install         \
    g++                      \
    cmake                    \
    libboost-all-dev         \
    libevent-dev             \
    libdouble-conversion-dev \
    libgoogle-glog-dev       \
    libgflags-dev            \
    libiberty-dev            \
    liblz4-dev               \
    liblzma-dev              \
    libsnappy-dev            \
    make                     \
    zlib1g-dev               \
    binutils-dev             \
    libjemalloc-dev          \
    libssl-dev               \
    pkg-config               \
    libsodium-dev

Then, build and install folly and fizz

Alternatively, run the helper script build_helper.sh in this subdirectory. It will install and link the required dependencies and also build folly and fizz. This may take several minutes the first time.

./build_helper.sh

After building, the directory _build/ will contain the dependencies (under _build/deps) whereas _build/build will contain all the built libraries and binaries for mvfst.

You can also install mvfst as well as its dependencies folly and fizz to a custom directory using the build script, by supplying an INSTALL_PREFIX env var.

./build_helper.sh -i /usr/local

See ./build_helper.sh --help for more options

You might need to run the script as root to install to certain directories.

By default the build script build_helper.sh enables the building of test target (i.e. runs with -DBUILD_TEST=ON option). Since some of tests in mvfst require some test artifacts of Fizz, it is necessary to supply the path of the Fizz src directory (via option DFIZZ_PROJECT) to correctly build all test targets in mvfst.

Run a sample client and server

Building the test targets of mvfst should automatically build the sample client and server binaries into the build directory.

For getdeps.py build, you can find the echo binary at:

cd $(python3 ./build/fbcode_builder/getdeps.py show-build-dir mvfst)/quic/samples/echo

For the deprecated build.sh script, it will be at the following location if you used the default build path.

cd ./_build/build/quic/samples/echo

The server will automatically bind to ::1 by default if no host is used, but you can then spin a simple echo server by running:

./echo -mode=server -host=<host> -port=<port>

and to run a client:

./echo -mode=client -host=<host> -port=<port>

For more options, see

./echo --help

HTTP/3

This repo implements the QUIC transport. For an HTTP/3 implementation that uses Mvfst, please check out Proxygen.

Contributing

We'd love to have your help in making mvfst better. If you're interested, please read our guide to guide to contributing

Please also join our slack to ask questions or start discussions.

License

mvfst is MIT licensed, as found in the LICENSE file.

API

The API should be considered in alpha. We can't predict all the use cases that people will have, so we're waiting some time before declaring a more stable API. We are open to have several different APIs for different constraints.

Reporting and Fixing Security Issues

Please do not open GitHub issues or pull requests - this makes the problem immediately visible to everyone, including malicious actors. Security issues in mvfst can be safely reported via Facebook's Whitehat Bug Bounty program:

https://www.facebook.com/whitehat

Facebook's security team will triage your report and determine whether or not is it eligible for a bounty under our program.

mvfst's People

Contributors

afrind avatar ahornby avatar avasylev avatar bigfootjon avatar bschlinker avatar chadaustin avatar deadalnix avatar dependabot[bot] avatar dmm-fb avatar fanzeyi avatar fcangialosi avatar hanidamlaj avatar jbeshay avatar junqiwang avatar kvtsoy avatar lhuang04 avatar lnicco avatar lukaspiatkowski avatar mjoras avatar sharma95 avatar shri-khare avatar simpkins avatar siyengar avatar vitaut avatar wez avatar xavierd avatar xttjsn avatar xubonnie avatar yangchi avatar yfeldblum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mvfst's Issues

Check failed: currentSeqNum >= currBlock. end + 2 (1 vs. 2)

Hi recently I bump into a problem using mvfst to transfer some files

[QuicWriteCodec.cpp:219] Check failed: currentSeqNum >= currBlock. end + 2 (1 vs. 2) ***Check failure stack trace: ***

I notice that structure of AckBlocks consists of IntervalSet, and this check failure occured because of the violation of its structure. I wonder what kind of reasons could results in this problem. Thanks!

How does GSO work in the project

Hi~I have looked up some blog about GSO, when I back to the project, I encount some problem

  1. what are the differences between BATCHING_MODE_GSO, BATCHING_MODE_SENDMMSG and BATCHING_MODE_SENDMMSG_GSO?
  2. I am trying to turn off/on gso using Mellanox and Inter NIC, testing download in server or uploading in client, the performance sometimes better but sometimes even worse. I use iftop to show real time traffic.

compile error: undefined reference to `folly::InlineExecutor::cache'

toolchain info:
gcc 7.4.0
ubuntu 16.04
cmake version 3.10.0

symbol info:
nm -C libfolly.a|grep folly::InlineExecutor::instance_slow
0000000000000008 b guard variable for folly::InlineExecutor::instance_slow()::instance
0000000000000000 T folly::InlineExecutor::instance_slow()
0000000000000010 b folly::InlineExecutor::instance_slow()::instance
U folly::InlineExecutor::instance_slow()
U folly::InlineExecutor::instance_slow()
U folly::InlineExecutor::instance_slow()
U folly::InlineExecutor::instance_slow()
The symbol of "folly::InlineExecutor::instance_slow()" is visible.

compile info:
c++ -O2 -g -DNDEBUG CMakeFiles/QuicTransportBaseTest.dir/QuicTransportBaseTest.cpp.o CMakeFiles/QuicTransportBaseTest.dir///common/test/TestMain.cpp.o -o QuicTransportBaseTest -Wl,-rpath,/usr/local/lib ../../../../deps/lib/libfolly.a ../libmvfst_transport.a ../../codec/libmvfst_codec_types.a ../../common/test/libmvfst_test_utils.a ../../state/libmvfst_state_stream_functions.a ../../server/libmvfst_server.a ../../../googletest/src/googletest-build/./googlemock/libgmock.a ../../../googletest/src/googletest-build/./googlemock/libgmock_main.a ../../../googletest/src/googletest-build/./googlemock/gtest/libgtest.a ../../../googletest/src/googletest-build/./googlemock/gtest/libgtest_main.a ../../client/libmvfst_client.a ../libmvfst_transport.a ../../congestion_control/libmvfst_cc_algo.a ../../codec/libmvfst_codec_pktrebuilder.a ../../common/libmvfst_looper.a ../../happyeyeballs/libmvfst_happyeyeballs.a ../../state/libmvfst_state_pacing_functions.a ../../state/libmvfst_state_ack_handler.a ../../loss/libmvfst_loss.a ../../state/libmvfst_state_simple_frame_functions.a ../../state/libmvfst_state_qpr_functions.a ../../state/libmvfst_state_functions.a ../../codec/libmvfst_codec_pktbuilder.a ../../state/libmvfst_state_stream.a ../../state/libmvfst_state_stream_functions.a ../../flowcontrol/libmvfst_flowcontrol.a ../../state/libmvfst_state_machine.a ../../codec/libmvfst_codec.a ../../handshake/libmvfst_handshake.a ../../codec/libmvfst_codec_packet_number_cipher.a ../../codec/libmvfst_codec_decode.a ../../codec/libmvfst_codec_types.a ../../libmvfst_constants.a /usr/local/lib/libboost_iostreams.so ../../libmvfst_exception.a ../../../../deps/lib/libfolly.a /usr/local/lib/libboost_filesystem.so /usr/local/lib/libboost_context.so /usr/local/lib/libboost_chrono.so /usr/local/lib/libboost_date_time.so -lpthread /usr/local/lib/libboost_program_options.so /usr/local/lib/libboost_system.so /usr/local/lib/libboost_thread.so /usr/local/lib/libboost_regex.so /usr/local/lib/libboost_atomic.so /usr/lib/x86_64-linux-gnu/libdouble-conversion.so /usr/lib/x86_64-linux-gnu/libgflags.so /usr/lib/x86_64-linux-gnu/libglog.so /usr/lib/x86_64-linux-gnu/libevent.so /usr/lib/x86_64-linux-gnu/libssl.so /usr/lib/x86_64-linux-gnu/libcrypto.so /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/x86_64-linux-gnu/libbz2.so /usr/lib/x86_64-linux-gnu/liblzma.so /usr/lib/x86_64-linux-gnu/liblz4.so /usr/lib/x86_64-linux-gnu/libsnappy.so /usr/lib/x86_64-linux-gnu/libiberty.a /usr/lib/x86_64-linux-gnu/libsodium.so -ldl ../../../fizz_project/src/fizz_project-build/./lib/libfizz.a

error info:
Folly is installed
[ 36%] Built target gmock_main
[ 63%] Built target gmock
[ 81%] Built target gtest
[100%] Built target gtest_main
[ 2%] No install step for 'googletest'
[ 3%] Completed 'googletest'
.............................
[ 6%] Completed 'fizz_project'
[ 7%] Built target fizz_project
[ 8%] Built target mvfst_constants
[ 8%] Built target mvfst_exception
[ 11%] Built target mvfst_codec_types
[ 12%] Built target mvfst_codec_decode
[ 13%] Built target mvfst_codec_packet_number_cipher
[ 15%] Built target mvfst_handshake
[ 16%] Built target mvfst_codec_pktbuilder
[ 18%] Built target mvfst_codec
[ 19%] Built target mvfst_state_machine
[ 20%] Built target mvfst_flowcontrol
[ 21%] Built target mvfst_state_stream_functions
[ 22%] Built target mvfst_state_stream
[ 23%] Built target mvfst_state_qpr_functions
[ 24%] Built target mvfst_state_functions
[ 25%] Built target mvfst_state_simple_frame_functions
[ 26%] Built target mvfst_codec_pktrebuilder
[ 27%] Built target mvfst_looper
[ 30%] Built target mvfst_cc_algo
[ 31%] Built target mvfst_happyeyeballs
[ 32%] Built target mvfst_loss
[ 33%] Built target mvfst_state_pacing_functions
[ 36%] Built target mvfst_transport
[ 37%] Built target mvfst_state_ack_handler
[ 38%] Built target mvfst_client
[ 43%] Built target mvfst_server
[ 45%] Built target mvfst_test_utils
[ 47%] Built target QuicPacketSchedulerTest
[ 47%] Linking CXX executable QuicTransportBaseTest

/home/gcc/gcc-exe/include/c++/7.4.0/bits/atomic_base.h:713: undefined reference to folly::InlineExecutor::cache' ../../../fizz_project/src/fizz_project-build/./lib/libfizz.a(ServerProtocol.cpp.o): In function folly::InlineExecutor::instance()':
/home/mvfst/_build/deps/include/folly/executors/InlineExecutor.h:35: undefined reference to folly::InlineExecutor::instance_slow()' ../../../fizz_project/src/fizz_project-build/./lib/libfizz.a(ServerProtocol.cpp.o): In function std::__atomic_basefolly::InlineExecutor*::load(std::memory_order) const':
/home/gcc/gcc-exe/include/c++/7.4.0/bits/atomic_base.h:713: undefined reference to folly::InlineExecutor::cache' ../../../fizz_project/src/fizz_project-build/./lib/libfizz.a(ServerProtocol.cpp.o): In function folly::InlineExecutor::instance()':
/home/mvfst/_build/deps/include/folly/executors/InlineExecutor.h:35: undefined reference to `folly::InlineExecutor::instance_slow()'

who could give me some suggest about this question?Tks very much!

Performance drops when delay is introduced

I have benchmarked the tperf performance of mvfst in mininet (and compared against tcp performance in iperf3). The results are shown in the images below. The duration was set to 60s.

I am wondering why the performance of mvfst drops significantly when a 10ms delay is present on the channel? Especially the quic_bbr performance is way superior to the tcp_bbr performance. It seems like a general bug since the throughput is bad for all congestion controls at 10ms delay even without losses.

The curves of quic_copa and quic_bbr stop at a loss of 3%, because then a "lossTimeoutExpired()"-error terminates the transmission. Would i need to manually cancel that timeout to prevent this error from occuring?

bw100_delay0ms
bw100_delay1ms
bw100_delay10ms

problems running echo server

I am getting the following output on the server when I try to run the midst client-server

GMOCK WARNING:
Uninteresting mock function call - returning default value.
Function call: getCurrentTime()
Returns: 8-byte object <00-00 00-00 00-00 00-00>
NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md#knowing-when-to-expect for details.

GMOCK WARNING:
Uninteresting mock function call - returning default value.
Function call: getCurrentTime()
Returns: 8-byte object <00-00 00-00 00-00 00-00>
NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md#knowing-when-to-expect for details.

How do I fix this?

compile error: undefined reference to `folly::InlineExecutor::cache'

toolchain info:
gcc 7.4.0
ubuntu 16.04
cmake version 3.10.0

symbol info:
nm -C libfolly.a|grep folly::InlineExecutor::instance_slow
0000000000000008 b guard variable for folly::InlineExecutor::instance_slow()::instance
0000000000000000 T folly::InlineExecutor::instance_slow()
0000000000000010 b folly::InlineExecutor::instance_slow()::instance
U folly::InlineExecutor::instance_slow()
U folly::InlineExecutor::instance_slow()
U folly::InlineExecutor::instance_slow()
U folly::InlineExecutor::instance_slow()
The symbol of "folly::InlineExecutor::instance_slow()" is visible.

compile info:
c++ -O2 -g -DNDEBUG CMakeFiles/QuicTransportBaseTest.dir/QuicTransportBaseTest.cpp.o CMakeFiles/QuicTransportBaseTest.dir///common/test/TestMain.cpp.o -o QuicTransportBaseTest -Wl,-rpath,/usr/local/lib ../../../../deps/lib/libfolly.a ../libmvfst_transport.a ../../codec/libmvfst_codec_types.a ../../common/test/libmvfst_test_utils.a ../../state/libmvfst_state_stream_functions.a ../../server/libmvfst_server.a ../../../googletest/src/googletest-build/./googlemock/libgmock.a ../../../googletest/src/googletest-build/./googlemock/libgmock_main.a ../../../googletest/src/googletest-build/./googlemock/gtest/libgtest.a ../../../googletest/src/googletest-build/./googlemock/gtest/libgtest_main.a ../../client/libmvfst_client.a ../libmvfst_transport.a ../../congestion_control/libmvfst_cc_algo.a ../../codec/libmvfst_codec_pktrebuilder.a ../../common/libmvfst_looper.a ../../happyeyeballs/libmvfst_happyeyeballs.a ../../state/libmvfst_state_pacing_functions.a ../../state/libmvfst_state_ack_handler.a ../../loss/libmvfst_loss.a ../../state/libmvfst_state_simple_frame_functions.a ../../state/libmvfst_state_qpr_functions.a ../../state/libmvfst_state_functions.a ../../codec/libmvfst_codec_pktbuilder.a ../../state/libmvfst_state_stream.a ../../state/libmvfst_state_stream_functions.a ../../flowcontrol/libmvfst_flowcontrol.a ../../state/libmvfst_state_machine.a ../../codec/libmvfst_codec.a ../../handshake/libmvfst_handshake.a ../../codec/libmvfst_codec_packet_number_cipher.a ../../codec/libmvfst_codec_decode.a ../../codec/libmvfst_codec_types.a ../../libmvfst_constants.a /usr/local/lib/libboost_iostreams.so ../../libmvfst_exception.a ../../../../deps/lib/libfolly.a /usr/local/lib/libboost_filesystem.so /usr/local/lib/libboost_context.so /usr/local/lib/libboost_chrono.so /usr/local/lib/libboost_date_time.so -lpthread /usr/local/lib/libboost_program_options.so /usr/local/lib/libboost_system.so /usr/local/lib/libboost_thread.so /usr/local/lib/libboost_regex.so /usr/local/lib/libboost_atomic.so /usr/lib/x86_64-linux-gnu/libdouble-conversion.so /usr/lib/x86_64-linux-gnu/libgflags.so /usr/lib/x86_64-linux-gnu/libglog.so /usr/lib/x86_64-linux-gnu/libevent.so /usr/lib/x86_64-linux-gnu/libssl.so /usr/lib/x86_64-linux-gnu/libcrypto.so /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/x86_64-linux-gnu/libbz2.so /usr/lib/x86_64-linux-gnu/liblzma.so /usr/lib/x86_64-linux-gnu/liblz4.so /usr/lib/x86_64-linux-gnu/libsnappy.so /usr/lib/x86_64-linux-gnu/libiberty.a /usr/lib/x86_64-linux-gnu/libsodium.so -ldl ../../../fizz_project/src/fizz_project-build/./lib/libfizz.a

error info:
Folly is installed
[ 36%] Built target gmock_main
[ 63%] Built target gmock
[ 81%] Built target gtest
[100%] Built target gtest_main
[ 2%] No install step for 'googletest'
[ 3%] Completed 'googletest'
.............................
[ 6%] Completed 'fizz_project'
[ 7%] Built target fizz_project
[ 8%] Built target mvfst_constants
[ 8%] Built target mvfst_exception
[ 11%] Built target mvfst_codec_types
[ 12%] Built target mvfst_codec_decode
[ 13%] Built target mvfst_codec_packet_number_cipher
[ 15%] Built target mvfst_handshake
[ 16%] Built target mvfst_codec_pktbuilder
[ 18%] Built target mvfst_codec
[ 19%] Built target mvfst_state_machine
[ 20%] Built target mvfst_flowcontrol
[ 21%] Built target mvfst_state_stream_functions
[ 22%] Built target mvfst_state_stream
[ 23%] Built target mvfst_state_qpr_functions
[ 24%] Built target mvfst_state_functions
[ 25%] Built target mvfst_state_simple_frame_functions
[ 26%] Built target mvfst_codec_pktrebuilder
[ 27%] Built target mvfst_looper
[ 30%] Built target mvfst_cc_algo
[ 31%] Built target mvfst_happyeyeballs
[ 32%] Built target mvfst_loss
[ 33%] Built target mvfst_state_pacing_functions
[ 36%] Built target mvfst_transport
[ 37%] Built target mvfst_state_ack_handler
[ 38%] Built target mvfst_client
[ 43%] Built target mvfst_server
[ 45%] Built target mvfst_test_utils
[ 47%] Built target QuicPacketSchedulerTest
[ 47%] Linking CXX executable QuicTransportBaseTest

/home/gcc/gcc-exe/include/c++/7.4.0/bits/atomic_base.h:713: undefined reference to folly::InlineExecutor::cache' ../../../fizz_project/src/fizz_project-build/./lib/libfizz.a(ServerProtocol.cpp.o): In function folly::InlineExecutor::instance()':
/home/mvfst/_build/deps/include/folly/executors/InlineExecutor.h:35: undefined reference to folly::InlineExecutor::instance_slow()' ../../../fizz_project/src/fizz_project-build/./lib/libfizz.a(ServerProtocol.cpp.o): In function std::__atomic_basefolly::InlineExecutor*::load(std::memory_order) const':
/home/gcc/gcc-exe/include/c++/7.4.0/bits/atomic_base.h:713: undefined reference to folly::InlineExecutor::cache' ../../../fizz_project/src/fizz_project-build/./lib/libfizz.a(ServerProtocol.cpp.o): In function folly::InlineExecutor::instance()':
/home/mvfst/_build/deps/include/folly/executors/InlineExecutor.h:35: undefined reference to `folly::InlineExecutor::instance_slow()'

who could give me some suggest about this question?Tks very much!

PTO timeout due to tail packet loss, and the probe packet cannot receive the ack

I have found a strange problem that when there exists some delays in network resulting in some unacked tail packets because ack-eliciting packets are not acknowledged within the expected period of PTO time, and PTO timer expiration triggers sending extra probe ack-eliciting packet, however, I found after receiver gets these probe packets, there seems exist some troubles parsing probe packets in QuicReadCodec::parsePacket , which leads to consecutive PTO expiration. Do you have any ideas why this could happened? Thanks

Executing QuicServerTest after build leads to Segmentation Fault

OS :- Ubuntu 18.04 (Running on virtual Box)
This is what the stack trace looks like :-

I0420 23:22:44.745774   659 EchoHandler.h:32] Got bidirectional stream id=3
I0420 23:22:44.745867   659 EchoHandler.h:57] read available for stream id=3
I0420 23:22:44.745906   659 EchoHandler.h:70] Got len=11 eof=1 total=11 data=hello world
I0420 23:22:44.745931   659 EchoHandler.h:107] socket did not accept all data, buffering len=0
I0420 23:22:44.745970   659 EchoHandler.h:164] socket is write ready with maxToSend=100
*** Aborted at 1587417764 (unix time) try "date -d @1587417764" if you are using GNU date ***
PC: @     0x5619beeea142 folly::IOBuf::prependChain()
*** SIGSEGV (@0x8) received by PID 659 (TID 0x7fc21841dd00) from PID 8; stack trace: ***
    @     0x7fc218fe2641 (unknown)
    @     0x7fc219010540 (unknown)
    @     0x5619beeea142 folly::IOBuf::prependChain()
    @     0x5619bee8a619 quic::samples::EchoHandler::echo()
    @     0x5619bee8a985 quic::samples::EchoHandler::onStreamWriteReady()
    @     0x5619bee625ac QuicSocketTest_blocked_write_Test::TestBody()
    @     0x5619bf054361 testing::internal::HandleExceptionsInMethodIfSupported<>()
    @     0x5619bf049919 testing::Test::Run()
    @     0x5619bf049d7d testing::TestInfo::Run()
    @     0x5619bf049f69 testing::TestCase::Run()
    @     0x5619bf04aece testing::internal::UnitTestImpl::RunAllTests()
    @     0x5619bf04b198 testing::UnitTest::Run()
    @     0x5619bedadbda main
    @     0x7fc21848a1e3 __libc_start_main
    @     0x5619bedaf4be _start
Segmentation fault (core dumped)

Is this error occurring because of virtual box or could there be some other reason ? Thanks :)

Build error in ubuntu 18.04

when I run "./build_helper.sh", the following problem occurred:

QuicStreamAsyncTransportTest.cpp:(.text._ZZN4quic4test28QuicStreamAsyncTransportTest12createClientEvENKUlvE3_clEv[_ZZN4quic4test28QuicStreamAsyncTransportTest12createClientEvENKUlvE3_clEv]+0x93): undefined reference to quic::test::createTestCertificateVerifier()' QuicStreamAsyncTransportTest.cpp:(.text._ZZN4quic4test28QuicStreamAsyncTransportTest12createClientEvENKUlvE3_clEv[_ZZN4quic4test28QuicStreamAsyncTransportTest12createClientEvENKUlvE3_clEv]+0xd1): undefined reference to quic::FizzClientQuicHandshakeContext::Builder::build()'
../../fizz/handshake/libmvfst_fizz_handshake.a(FizzCryptoFactory.cpp.o): In function quic::PacketNumberCipher::PacketNumberCipher()': FizzCryptoFactory.cpp:(.text._ZN4quic18PacketNumberCipherC2Ev[_ZN4quic18PacketNumberCipherC5Ev]+0xb): undefined reference to vtable for quic::PacketNumberCipher'
../../fizz/handshake/libmvfst_fizz_handshake.a(FizzPacketNumberCipher.cpp.o):(.data.rel.ro._ZTVN4quic24Aes256PacketNumberCipherE[_ZTVN4quic24Aes256PacketNumberCipherE]+0x30): undefined reference to quic::PacketNumberCipher::decryptLongHeader(folly::Range<unsigned char const*>, folly::Range<unsigned char*>, folly::Range<unsigned char*>) const' ../../fizz/handshake/libmvfst_fizz_handshake.a(FizzPacketNumberCipher.cpp.o):(.data.rel.ro._ZTVN4quic24Aes256PacketNumberCipherE[_ZTVN4quic24Aes256PacketNumberCipherE]+0x38): undefined reference to quic::PacketNumberCipher::decryptShortHeader(folly::Range<unsigned char const*>, folly::Range<unsigned char*>, folly::Range<unsigned char*>) const'
../../fizz/handshake/libmvfst_fizz_handshake.a(FizzPacketNumberCipher.cpp.o):(.data.rel.ro._ZTVN4quic24Aes256PacketNumberCipherE[_ZTVN4quic24Aes256PacketNumberCipherE]+0x40): undefined reference to quic::PacketNumberCipher::encryptLongHeader(folly::Range<unsigned char const*>, folly::Range<unsigned char*>, folly::Range<unsigned char*>) const' ../../fizz/handshake/libmvfst_fizz_handshake.a(FizzPacketNumberCipher.cpp.o):(.data.rel.ro._ZTVN4quic24Aes256PacketNumberCipherE[_ZTVN4quic24Aes256PacketNumberCipherE]+0x48): undefined reference to quic::PacketNumberCipher::encryptShortHeader(folly::Range<unsigned char const*>, folly::Range<unsigned char*>, folly::Range<unsigned char*>) const'
../../fizz/handshake/libmvfst_fizz_handshake.a(FizzPacketNumberCipher.cpp.o):(.data.rel.ro._ZTVN4quic24Aes256PacketNumberCipherE[_ZTVN4quic24Aes256PacketNumberCipherE]+0x58): undefined reference to quic::PacketNumberCipher::cipherHeader(folly::Range<unsigned char const*>, folly::Range<unsigned char*>, folly::Range<unsigned char*>, unsigned char, unsigned char) const' ../../fizz/handshake/libmvfst_fizz_handshake.a(FizzPacketNumberCipher.cpp.o):(.data.rel.ro._ZTVN4quic24Aes256PacketNumberCipherE[_ZTVN4quic24Aes256PacketNumberCipherE]+0x60): undefined reference to quic::PacketNumberCipher::decipherHeader(folly::Range<unsigned char const*>, folly::Range<unsigned char*>, folly::Range<unsigned char*>, unsigned char, unsigned char) const'
../../fizz/handshake/libmvfst_fizz_handshake.a(FizzPacketNumberCipher.cpp.o): In function quic::PacketNumberCipher::~PacketNumberCipher()': FizzPacketNumberCipher.cpp:(.text._ZN4quic18PacketNumberCipherD2Ev[_ZN4quic18PacketNumberCipherD5Ev]+0xb): undefined reference to vtable for quic::PacketNumberCipher'
../../fizz/handshake/libmvfst_fizz_handshake.a(FizzPacketNumberCipher.cpp.o):(.data.rel.ro._ZTVN4quic24Aes128PacketNumberCipherE[_ZTVN4quic24Aes128PacketNumberCipherE]+0x30): undefined reference to quic::PacketNumberCipher::decryptLongHeader(folly::Range<unsigned char const*>, folly::Range<unsigned char*>, folly::Range<unsigned char*>) const' ../../fizz/handshake/libmvfst_fizz_handshake.a(FizzPacketNumberCipher.cpp.o):(.data.rel.ro._ZTVN4quic24Aes128PacketNumberCipherE[_ZTVN4quic24Aes128PacketNumberCipherE]+0x38): undefined reference to quic::PacketNumberCipher::decryptShortHeader(folly::Range<unsigned char const*>, folly::Range<unsigned char*>, folly::Range<unsigned char*>) const'
../../fizz/handshake/libmvfst_fizz_handshake.a(FizzPacketNumberCipher.cpp.o):(.data.rel.ro._ZTVN4quic24Aes128PacketNumberCipherE[_ZTVN4quic24Aes128PacketNumberCipherE]+0x40): undefined reference to quic::PacketNumberCipher::encryptLongHeader(folly::Range<unsigned char const*>, folly::Range<unsigned char*>, folly::Range<unsigned char*>) const' ../../fizz/handshake/libmvfst_fizz_handshake.a(FizzPacketNumberCipher.cpp.o):(.data.rel.ro._ZTVN4quic24Aes128PacketNumberCipherE[_ZTVN4quic24Aes128PacketNumberCipherE]+0x48): undefined reference to quic::PacketNumberCipher::encryptShortHeader(folly::Range<unsigned char const*>, folly::Range<unsigned char*>, folly::Range<unsigned char*>) const'
../../fizz/handshake/libmvfst_fizz_handshake.a(FizzPacketNumberCipher.cpp.o):(.data.rel.ro._ZTVN4quic24Aes128PacketNumberCipherE[_ZTVN4quic24Aes128PacketNumberCipherE]+0x58): undefined reference to quic::PacketNumberCipher::cipherHeader(folly::Range<unsigned char const*>, folly::Range<unsigned char*>, folly::Range<unsigned char*>, unsigned char, unsigned char) const' ../../fizz/handshake/libmvfst_fizz_handshake.a(FizzPacketNumberCipher.cpp.o):(.data.rel.ro._ZTVN4quic24Aes128PacketNumberCipherE[_ZTVN4quic24Aes128PacketNumberCipherE]+0x60): undefined reference to quic::PacketNumberCipher::decipherHeader(folly::Range<unsigned char const*>, folly::Range<unsigned char*>, folly::Range<unsigned char*>, unsigned char, unsigned char) const'
../../fizz/handshake/libmvfst_fizz_handshake.a(FizzPacketNumberCipher.cpp.o):(.data.rel.ro._ZTIN4quic24Aes256PacketNumberCipherE[_ZTIN4quic24Aes256PacketNumberCipherE]+0x10): undefined reference to typeinfo for quic::PacketNumberCipher' ../../fizz/handshake/libmvfst_fizz_handshake.a(FizzPacketNumberCipher.cpp.o):(.data.rel.ro._ZTIN4quic24Aes128PacketNumberCipherE[_ZTIN4quic24Aes128PacketNumberCipherE]+0x10): undefined reference to typeinfo for quic::PacketNumberCipher'
collect2: error: ld returned 1 exit status
quic/api/test/CMakeFiles/QuicStreamAsyncTransportTest.dir/build.make:178: recipe for target 'quic/api/test/QuicStreamAsyncTransportTest' failed
make[2]: *** [quic/api/test/QuicStreamAsyncTransportTest] Error 1
make[2]: Leaving directory '/home/mvfst/_build'

what should I do to solve this problem? Thank you!

Build error in Macos Catalina

Hi there,
I'm trying to build the library on Catalina. I'm using the ./build_helper.sh file which apperantly also written to work on MacOS.
I'm getting the following error code :
./build_helper.sh: line 178: CMAKE_EXTRA_ARGS[@]: unbound variable

any clue how to solve this error?

Pakets get dropped because tperf client sends too large pakets

Using the default values for max_receive_packet_size all pakets from the tperf client get dropped because they are truncated on Linux and macOS using the loopback device.

Tested this inside a docker container, a Linux VM and native macOS.

The default for IPv6 is 1233 bytes but somehow the client sends initial pakets larger than that.
If I manually set max_receive_packet_size to 1235 bytes it works.

I collected a pcap trace of the packets from the client and can upload that in a couple of days if needed.

Perf tuning documents

There has been various reports in mvfst and proxygen repo regarding performance problem, for example: facebook/proxygen#294, and a few outsider blogs and other reports on it. A few of them is simply due to the default parameters come with the code. I think we need to either change them, or provide documentation to help people get some of the most basic things right, and raise the awareness of known problem (for example: we use a fixed and small MSS)

compile issue: pthread not found when build Fizz

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/home/Fierralin/git/mvfst/_build/deps/fizz/fizz/Boost_INCLUDE_DIR
used as include directory in directory /home/Fierralin/git/mvfst/_build/deps/fizz/fizz

-- Configuring incomplete, errors occurred!
See also "/home/Fierralin/git/mvfst/_build/deps/fizz/build/CMakeFiles/CMakeOutput.log".
See also "/home/Fierralin/git/mvfst/_build/deps/fizz/build/CMakeFiles/CMakeError.log".

I've already installed Folly, error occurs on building Fizz.

/home/Fierralin/git/mvfst/_build/deps/fizz/build/CMakeFiles/CMakeError.log says:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/home/Fierralin/git/mvfst/_build/deps/fizz/fizz/Boost_INCLUDE_DIR
   used as include directory in directory /home/Fierralin/git/mvfst/_build/deps/fizz/fizz

-- Configuring incomplete, errors occurred!
See also "/home/Fierralin/git/mvfst/_build/deps/fizz/build/CMakeFiles/CMakeOutput.log".
See also "/home/Fierralin/git/mvfst/_build/deps/fizz/build/CMakeFiles/CMakeError.log".

By the way, my env is openSUSE 15.1 with self built boost lib.

Doubts about quic client and server mode?

Hi everyone, I have some questions about mvfst quic implement.

question

  1. I have run the example "./_build/build/quic/samples/echo" and I found that there is no push method in server mode. In my opinion, quic is just a streaming protocol, you can send data on both sides.

  2. I also have a doubt that could quic server side push data to client by "Connection ID", because the client's ip address will change, then we can identify the client by "connection ID" and found the changed ip address.

Speed of tperf in 10Gbps network

I run tperf in 10Gbps network and the speed is about 2000Mbps or less. Have you tested tperf in such 10Gbps network and what params should be tuned according to such condition? Thanks!

EchoClient and EchoServer unable to establish connection

I can successfully compile the project on Ubuntu. 18.04,but when I run the sample client I get the following error:
vmtest@vmtest-virtual-machine:~/Documents/ietf_quic/mvfst/_build/build/quic/samples$ ./echo -mode=server -host=127.0.0.1 -port=6666 -colorlogtostderr=true -alsologtostderr=true
I0514 08:35:31.092536 28271 EchoServer.h:80] Echo server started at: [::]:6666

vmtest@vmtest-virtual-machine:~/Documents/ietf_quic/mvfst/_build/build/quic/samples$ ./echo -mode=client -host=127.0.0.1 -port=6666 -colorlogtostderr=true -log_dir="/home/vmtest/Documents/ietf_quic/mvfst/_build/build/quic/samples/" -alsologtostderr=true
I0514 08:36:33.769158 28283 EchoClient.h:127] EchoClient connecting to 127.0.0.1:6666
E0514 08:36:33.771145 28283 EchoClient.h:82] EchoClient error: Connect failed

It seems that the handshake method failed. (ClientHandshake::connect() )
What should I do to make the client and server connect successfully?

Why not use the tag to clone the repositories

questions

Because the code base already has thousands of commits, I want to clone only the latest commit by tag, which will save a lot of time to clone the repositories.
https://github.com/facebookincubator/mvfst/blob/20021f0396c3b44a45a936b9c3d8945b13bfbfca/build_helper.sh#L168

Also I noticed that the project will checkout the commit in "build/deps/github_hashes", why not use a tag???

suggestion

I want to pull the repositories as

git clone https://github.com/facebook/folly.git -b v2020.05.04.00 --depth=1 "$FOLLY_DIR"

build issues

using:
Ubuntu 16.04
cmake 3.10
gcc 5.4
boost 1.62

running build_helper.sh, it seems all of the dependencies have built correctly, but when it gets to the end and tries to build mvfst itself, I get the following compiler error:

make -j 4
[ 1%] Built target mvfst_bufutil
[ 1%] Performing update step for 'googletest'
[ 2%] Built target mvfst_exception
[ 2%] Built target mvfst_constants
[ 2%] Performing configure step for 'googletest'
[ 3%] Built target mvfst_looper
loading initial cache file /home/h3c/ywc/mvfst/_build/build/googletest/tmp/googletest-cache-RelWithDebInfo.cmake
-- Configuring done
-- Generating done
-- Build files have been written to: /home/h3c/ywc/mvfst/_build/build/googletest/src/googletest-build
[ 6%] Built target mvfst_codec_types
[ 6%] Performing build step for 'googletest'
[ 27%] Built target gmock
[ 7%] Built target mvfst_codec_decode
[ 45%] Built target gtest
[ 81%] Built target gmock_main
[100%] Built target gtest_main
[ 7%] No install step for 'googletest'
[ 7%] Built target mvfst_codec_packet_number_cipher
[ 8%] Completed 'googletest'
[ 10%] Built target googletest
[ 11%] Built target QuicConnectionIdTest
[ 12%] Built target PacketNumberTest
[ 12%] Linking CXX executable QuicIntegerTest
[ 15%] Built target mvfst_handshake
[ 16%] Built target mvfst_codec_pktbuilder
[ 16%] Linking CXX executable FizzPacketNumberCipherTest
[ 18%] Built target mvfst_codec
[ 18%] Building CXX object quic/state/CMakeFiles/mvfst_state_machine.dir/StateData.cpp.o
CMakeFiles/QuicIntegerTest.dir/QuicIntegerTest.cpp.o:在函数‘quic::test::QuicIntegerEncodeTest_Encode_Test::TestBody()’中:
/home/h3c/ywc/mvfst/quic/codec/test/QuicIntegerTest.cpp:77:对‘quic::BufAppender::BufAppender(folly::IOBuf*, unsigned long)’未定义的引用
../libmvfst_codec_types.a(QuicInteger.cpp.o):在函数‘void quic::BufAppender::writeBE(unsigned long)’中:
/home/h3c/ywc/mvfst/quic/common/BufUtil.h:74:对‘quic::BufAppender::push(unsigned char const*, unsigned long)’未定义的引用
../libmvfst_codec_types.a(QuicInteger.cpp.o):在函数‘void quic::BufAppender::writeBE(unsigned char)’中:
/home/h3c/ywc/mvfst/quic/common/BufUtil.h:74:对‘quic::BufAppender::push(unsigned char const*, unsigned long)’未定义的引用
../libmvfst_codec_types.a(QuicInteger.cpp.o):在函数‘void quic::BufAppender::writeBE(unsigned int)’中:
/home/h3c/ywc/mvfst/quic/common/BufUtil.h:74:对‘quic::BufAppender::push(unsigned char const*, unsigned long)’未定义的引用
../libmvfst_codec_types.a(QuicInteger.cpp.o):在函数‘void quic::BufAppender::writeBE(unsigned short)’中:
/home/h3c/ywc/mvfst/quic/common/BufUtil.h:74:对‘quic::BufAppender::push(unsigned char const*, unsigned long)’未定义的引用
collect2: error: ld returned 1 exit status
quic/codec/test/CMakeFiles/QuicIntegerTest.dir/build.make:157: recipe for target 'quic/codec/test/QuicIntegerTest' failed
make[2]: *** [quic/codec/test/QuicIntegerTest] Error 1
CMakeFiles/Makefile2:2603: recipe for target 'quic/codec/test/CMakeFiles/QuicIntegerTest.dir/all' failed
make[1]: *** [quic/codec/test/CMakeFiles/QuicIntegerTest.dir/all] Error 2
make[1]: *** 正在等待未完成的任务....
../../codec/libmvfst_codec_types.a(QuicInteger.cpp.o):在函数‘void quic::BufAppender::writeBE(unsigned long)’中:
/home/h3c/ywc/mvfst/quic/common/BufUtil.h:74:对‘quic::BufAppender::push(unsigned char const*, unsigned long)’未定义的引用
../../codec/libmvfst_codec_types.a(QuicInteger.cpp.o):在函数‘void quic::BufAppender::writeBE(unsigned char)’中:
/home/h3c/ywc/mvfst/quic/common/BufUtil.h:74:对‘quic::BufAppender::push(unsigned char const*, unsigned long)’未定义的引用
../../codec/libmvfst_codec_types.a(QuicInteger.cpp.o):在函数‘void quic::BufAppender::writeBE(unsigned int)’中:
/home/h3c/ywc/mvfst/quic/common/BufUtil.h:74:对‘quic::BufAppender::push(unsigned char const*, unsigned long)’未定义的引用
../../codec/libmvfst_codec_types.a(QuicInteger.cpp.o):在函数‘void quic::BufAppender::writeBE(unsigned short)’中:
/home/h3c/ywc/mvfst/quic/common/BufUtil.h:74:对‘quic::BufAppender::push(unsigned char const*, unsigned long)’未定义的引用
collect2: error: ld returned 1 exit status
quic/handshake/test/CMakeFiles/FizzPacketNumberCipherTest.dir/build.make:160: recipe for target 'quic/handshake/test/FizzPacketNumberCipherTest' failed
make[2]: *** [quic/handshake/test/FizzPacketNumberCipherTest] Error 1
CMakeFiles/Makefile2:3406: recipe for target 'quic/handshake/test/CMakeFiles/FizzPacketNumberCipherTest.dir/all' failed
make[1]: *** [quic/handshake/test/CMakeFiles/FizzPacketNumberCipherTest.dir/all] Error 2
/home/h3c/ywc/mvfst/quic/state/StateData.cpp: In member function ‘bool quic::QuicConnectionStateBase::retireAndSwitchPeerConnectionIds()’:
/home/h3c/ywc/mvfst/quic/state/StateData.cpp:161:22: error: could not convert ‘((quic::QuicConnectionStateBase*)this)->quic::QuicConnectionStateBase::nodeType’ from ‘quic::QuicNodeType’ to ‘bool’
auto& mainPeerId = nodeType == QuicNodeType::Client ? serverConnectionId
^
quic/state/CMakeFiles/mvfst_state_machine.dir/build.make:110: recipe for target 'quic/state/CMakeFiles/mvfst_state_machine.dir/StateData.cpp.o' failed
make[2]: *** [quic/state/CMakeFiles/mvfst_state_machine.dir/StateData.cpp.o] Error 1
CMakeFiles/Makefile2:4467: recipe for target 'quic/state/CMakeFiles/mvfst_state_machine.dir/all' failed
make[1]: *** [quic/state/CMakeFiles/mvfst_state_machine.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

Duplicate code in client/QuicClientTransport.cpp

question

The catch branch has the same processing logic, which can be combined.
https://github.com/facebookincubator/mvfst/blob/98a0aa44e0ec8ad767eb7b472527f441e682e906/quic/client/QuicClientTransport.cpp#L1397-L1409

suggestion

  } catch (const std::runtime_error& ex) {
    runOnEvbAsync([ex](auto self) {
      auto clientPtr = static_cast<QuicClientTransport*>(self.get());
      clientPtr->closeImpl(std::make_pair(
          QuicErrorCode(ex.errorCode()), std::string(ex.what())));
    });
  } catch (const std::exception& ex) {
    LOG(ERROR) << "Connect failed " << ex.what();
    runOnEvbAsync([ex](auto self) {
      auto clientPtr = static_cast<QuicClientTransport*>(self.get());
      clientPtr->closeImpl(std::make_pair(
          QuicErrorCode(TransportErrorCode::INTERNAL_ERROR),
          std::string(ex.what())));
    });
  }

Modify tperf.cpp to send data from client to server

Hi I tried to modify tperf.cpp to enable client to send data to server (POST) rather than the original direction (GET) by imitating the sending logic of class ServerStreamHandler and TPerfServer. As a result, my own TPerfClient derives from several callback classes such as QuicSocket::ReadCallback and override some callback function. However I found that this kind of modification mode caused some problems. I don't show source code here considering its length. I just want to konw that:

  1. If this kind of imitation be a good choice for achieve the goal POST?Because obviously in original tperf.cpp the structure of TPerfServer is a bit more complex than TPerfClient.
  2. Do you have any practical advice to realize the POST function in tperf?
    Thanks!

Errors while running CTest

I've got error while using command "make test" under the directory mvfst/_build/build/ . Part of tests get passed, but some not . And Finally, I get an error :
Errors while running CTest
make: *** [test] 错误 8
============My environments like this:=======
Centos7.5, gcc7.3.0, cmake3.10.0
============Detail information for test results===
Running tests...
Test project /home/h3c/zhao/mvfst/_build/build
Start 1: QuicTransportTest.WriteDataWithProbing
1/1129 Test #1: QuicTransportTest.WriteDataWithProbing ......................................***Failed 0.03 sec
Start 2: QuicTransportTest.NotAppLimitedWithLoss
2/1129 Test #2: QuicTransportTest.NotAppLimitedWithLoss .....................................***Failed 0.01 sec
Start 3: QuicTransportTest.NotAppLimitedWithNoWritableBytes
3/1129 Test #3: QuicTransportTest.NotAppLimitedWithNoWritableBytes ..........................***Failed 0.01 sec
...
1127 - StreamStateFunctionsTests.ResetOffsetGreaterThanStreamFlowControl (Failed)
1128 - StreamStateFunctionsTests.ResetOffsetGreaterThanConnFlowControl (Failed)
1129 - StreamStateFunctionsTests.ResetAfterReadingAllBytesTillFin (Failed)
Errors while running CTest
make: *** [test] 错误 8

======================================
And I have output the whole logs in the make_test.log
make_test.log
===========Anyone can help ? Thanks so much .=====

The competition between quic-bbr and cubic

As we all know, when tcp-bbr flows coexist with a large number of tcp-cubic flows, there will be a catastrophic speed problem. So,I'd like to ask, have you tried the competition between quic-bbr and cubic? Is quic-bbr better than tcp-bbr in term of competition with cubic? In other words, what are the differences between quic-bbr and tcp-bbr, and whether they will be upgraded to bbr-v2?

ConnectionError of tperf.cpp

I modified tperf.cpp and after that client can send data to server successfully
However when it implied connection end after sending all data the client threw an error:“[EventHandler.cpp:89] EventBase:failed to register event for fd 8:Resources temporarily unavailable”. Then server also threw an error:“[tperf.cpp] Socket error=Internal error” which triggered onConnectionError

So I wonder the possible reasons leading to such error? Because data is sent successfully, can I just ignore the error?
Thanks!

build issues

using:

  • Ubuntu 16.04
  • cmake 3.14
  • make 4.1
  • gcc 5.4
  • boost 1.58

running build_helper.sh, it seems all of the dependencies have built correctly, but when it gets to the end and tries to build mvfst itself, I get the following compiler error:

+ make -j 4
[  0%] Built target mvfst_state_stats_callback
[  1%] Built target mvfst_exception
[  3%] Built target mvfst_looper
[  4%] Built target mvfst_constants
[  5%] Built target quic_mock_handshake
[  5%] Built target mvfst_mock_state
[  5%] Built target mvfst_state_transport_settings
[  8%] Built target mvfst_codec_types
[  9%] Built target QuicIntegerTest
[ 10%] Built target PacketNumberTest
[ 10%] Built target mvfst_state_ack_states
[ 11%] Built target mvfst_codec_decode
[ 12%] Built target QuicConnectionIdTest
[ 13%] Built target mvfst_codec_packet_number_cipher
[ 15%] Built target PacketNumberCipherTest
[ 17%] Built target mvfst_handshake
[ 18%] Built target mvfst_codec_pktbuilder
[ 19%] Building CXX object quic/codec/CMakeFiles/mvfst_codec.dir/QuicReadCodec.cpp.o
In file included from /usr/include/boost/variant.hpp:17:0,
                 from /home/ubuntu/fb/mvfst/quic/codec/Types.h:12,
                 from /home/ubuntu/fb/mvfst/quic/codec/PacketNumber.h:13,
                 from /home/ubuntu/fb/mvfst/quic/codec/Decode.h:13,
                 from /home/ubuntu/fb/mvfst/quic/codec/QuicReadCodec.h:13,
                 from /home/ubuntu/fb/mvfst/quic/codec/QuicReadCodec.cpp:11:
/usr/include/boost/variant/variant.hpp: In instantiation of ‘void boost::variant<T0, TN>::convert_construct(T&, int, mpl_::false_) [with T = const folly::None; T0_ = boost::variant<quic::RegularQuicPacket, quic::VersionNegotiationPacket>; TN = {folly::Optional<quic::CipherUnavailable>, quic::StatelessReset}; mpl_::false_ = mpl_::bool_<false>]’:
/usr/include/boost/variant/variant.hpp:1683:26:   required from ‘boost::variant<T0, TN>::variant(const T&) [with T = folly::None; T0_ = boost::variant<quic::RegularQuicPacket, quic::VersionNegotiationPacket>; TN = {folly::Optional<quic::CipherUnavailable>, quic::StatelessReset}]’
/home/ubuntu/fb/mvfst/quic/codec/QuicReadCodec.cpp:39:19:   required from here
/usr/include/boost/variant/variant.hpp:1534:38: error: call of overloaded ‘initialize(void*, const folly::None&)’ is ambiguous
               initializer::initialize(
                                      ^
In file included from /usr/include/boost/variant/variant.hpp:30:0,
                 from /usr/include/boost/variant.hpp:17,
                 from /home/ubuntu/fb/mvfst/quic/codec/Types.h:12,
                 from /home/ubuntu/fb/mvfst/quic/codec/PacketNumber.h:13,
                 from /home/ubuntu/fb/mvfst/quic/codec/Decode.h:13,
                 from /home/ubuntu/fb/mvfst/quic/codec/QuicReadCodec.h:13,
                 from /home/ubuntu/fb/mvfst/quic/codec/QuicReadCodec.cpp:11:
/usr/include/boost/variant/detail/initializer.hpp:104:24: note: candidate: static int boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::initialize(void*, boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param_T) [with BaseIndexPair = boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >; Iterator = boost::mpl::l_iter<boost::mpl::list3<boost::variant<quic::RegularQuicPacket, quic::VersionNegotiationPacket>, folly::Optional<quic::CipherUnavailable>, quic::StatelessReset> >; boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param_T = const boost::variant<quic::RegularQuicPacket, quic::VersionNegotiationPacket>&]
             static int initialize(void* dest, param_T operand)
                        ^
/usr/include/boost/variant/detail/initializer.hpp:115:24: note: candidate: static int boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::initialize(void*, boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param2_T) [with BaseIndexPair = boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >; Iterator = boost::mpl::l_iter<boost::mpl::list3<boost::variant<quic::RegularQuicPacket, quic::VersionNegotiationPacket>, folly::Optional<quic::CipherUnavailable>, quic::StatelessReset> >; boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param2_T = boost::variant<quic::RegularQuicPacket, quic::VersionNegotiationPacket>&&]
             static int initialize(void* dest, param2_T operand)
                        ^
/usr/include/boost/variant/detail/initializer.hpp:115:24: note: candidate: static int boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::initialize(void*, boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param2_T) [with BaseIndexPair = boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list3<boost::variant<quic::RegularQuicPacket, quic::VersionNegotiationPacket>, folly::Optional<quic::CipherUnavailable>, quic::StatelessReset> > >::initializer_node, mpl_::int_<1> >; Iterator = boost::mpl::l_iter<boost::mpl::list2<folly::Optional<quic::CipherUnavailable>, quic::StatelessReset> >; boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param2_T = folly::Optional<quic::CipherUnavailable>&&]
/usr/include/boost/variant/detail/initializer.hpp:104:24: note: candidate: static int boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::initialize(void*, boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param_T) [with BaseIndexPair = boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list3<boost::variant<quic::RegularQuicPacket, quic::VersionNegotiationPacket>, folly::Optional<quic::CipherUnavailable>, quic::StatelessReset> > >::initializer_node, mpl_::int_<1> >; Iterator = boost::mpl::l_iter<boost::mpl::list2<folly::Optional<quic::CipherUnavailable>, quic::StatelessReset> >; boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param_T = const folly::Optional<quic::CipherUnavailable>&]
             static int initialize(void* dest, param_T operand)
                        ^
In file included from /usr/include/boost/variant.hpp:17:0,
                 from /home/ubuntu/fb/mvfst/quic/codec/Types.h:12,
                 from /home/ubuntu/fb/mvfst/quic/codec/PacketNumber.h:13,
                 from /home/ubuntu/fb/mvfst/quic/codec/Decode.h:13,
                 from /home/ubuntu/fb/mvfst/quic/codec/QuicReadCodec.h:13,
                 from /home/ubuntu/fb/mvfst/quic/codec/QuicReadCodec.cpp:11:
/usr/include/boost/variant/variant.hpp: In instantiation of ‘typename boost::enable_if<boost::is_rvalue_reference<T&&> >::type boost::variant<T0, TN>::convert_construct(T&&, int, mpl_::false_) [with T = quic::CipherUnavailable; T0_ = boost::variant<quic::RegularQuicPacket, quic::VersionNegotiationPacket>; TN = {folly::Optional<quic::CipherUnavailable>, quic::StatelessReset}; typename boost::enable_if<boost::is_rvalue_reference<T&&> >::type = void; mpl_::false_ = mpl_::bool_<false>]’:
/usr/include/boost/variant/variant.hpp:1732:26:   required from ‘boost::variant<T0, TN>::variant(T&&, typename boost::enable_if<boost::is_rvalue_reference<T&&> >::type*, typename boost::disable_if<boost::is_const<T> >::type*) [with T = quic::CipherUnavailable; T0_ = boost::variant<quic::RegularQuicPacket, quic::VersionNegotiationPacket>; TN = {folly::Optional<quic::CipherUnavailable>, quic::StatelessReset}; typename boost::enable_if<boost::is_rvalue_reference<T&&> >::type = void; typename boost::disable_if<boost::is_const<T> >::type = void]’
/home/ubuntu/fb/mvfst/quic/codec/QuicReadCodec.cpp:149:75:   required from here
/usr/include/boost/variant/variant.hpp:1555:38: error: call of overloaded ‘initialize(void*, boost::move_detail::remove_reference<quic::CipherUnavailable&>::type)’ is ambiguous
               initializer::initialize(
                                      ^
In file included from /usr/include/boost/variant/variant.hpp:30:0,
                 from /usr/include/boost/variant.hpp:17,
                 from /home/ubuntu/fb/mvfst/quic/codec/Types.h:12,
                 from /home/ubuntu/fb/mvfst/quic/codec/PacketNumber.h:13,
                 from /home/ubuntu/fb/mvfst/quic/codec/Decode.h:13,
                 from /home/ubuntu/fb/mvfst/quic/codec/QuicReadCodec.h:13,
                 from /home/ubuntu/fb/mvfst/quic/codec/QuicReadCodec.cpp:11:
/usr/include/boost/variant/detail/initializer.hpp:104:24: note: candidate: static int boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::initialize(void*, boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param_T) [with BaseIndexPair = boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >; Iterator = boost::mpl::l_iter<boost::mpl::list3<boost::variant<quic::RegularQuicPacket, quic::VersionNegotiationPacket>, folly::Optional<quic::CipherUnavailable>, quic::StatelessReset> >; boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param_T = const boost::variant<quic::RegularQuicPacket, quic::VersionNegotiationPacket>&]
             static int initialize(void* dest, param_T operand)
                        ^
/usr/include/boost/variant/detail/initializer.hpp:115:24: note: candidate: static int boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::initialize(void*, boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param2_T) [with BaseIndexPair = boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >; Iterator = boost::mpl::l_iter<boost::mpl::list3<boost::variant<quic::RegularQuicPacket, quic::VersionNegotiationPacket>, folly::Optional<quic::CipherUnavailable>, quic::StatelessReset> >; boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param2_T = boost::variant<quic::RegularQuicPacket, quic::VersionNegotiationPacket>&&]
             static int initialize(void* dest, param2_T operand)
                        ^
/usr/include/boost/variant/detail/initializer.hpp:115:24: note: candidate: static int boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::initialize(void*, boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param2_T) [with BaseIndexPair = boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list3<boost::variant<quic::RegularQuicPacket, quic::VersionNegotiationPacket>, folly::Optional<quic::CipherUnavailable>, quic::StatelessReset> > >::initializer_node, mpl_::int_<1> >; Iterator = boost::mpl::l_iter<boost::mpl::list2<folly::Optional<quic::CipherUnavailable>, quic::StatelessReset> >; boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param2_T = folly::Optional<quic::CipherUnavailable>&&]
/usr/include/boost/variant/detail/initializer.hpp:104:24: note: candidate: static int boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::initialize(void*, boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param_T) [with BaseIndexPair = boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list3<boost::variant<quic::RegularQuicPacket, quic::VersionNegotiationPacket>, folly::Optional<quic::CipherUnavailable>, quic::StatelessReset> > >::initializer_node, mpl_::int_<1> >; Iterator = boost::mpl::l_iter<boost::mpl::list2<folly::Optional<quic::CipherUnavailable>, quic::StatelessReset> >; boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param_T = const folly::Optional<quic::CipherUnavailable>&]
             static int initialize(void* dest, param_T operand)
                        ^
quic/codec/CMakeFiles/mvfst_codec.dir/build.make:75: recipe for target 'quic/codec/CMakeFiles/mvfst_codec.dir/QuicReadCodec.cpp.o' failed
make[2]: *** [quic/codec/CMakeFiles/mvfst_codec.dir/QuicReadCodec.cpp.o] Error 1
CMakeFiles/Makefile2:2053: recipe for target 'quic/codec/CMakeFiles/mvfst_codec.dir/all' failed
make[1]: *** [quic/codec/CMakeFiles/mvfst_codec.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

Support for Windows

Are there any plans to support Windows?
If not, what steps should be taken to try and compile mvfst for Windows?

Errors about building mvfst on windows7

Hello @yangchi , thanks for your patient replies on problem #85 . And I tried to rebuild the project on win7 with latest fizz by vcpkg. And I got failures with mvfst_server , mvfst_client and mvfst_transport . And I found that mvfst_transport 's failure caused the failures of others . Should I update the version of folly ? More information follows:

version of dependencles :
fizz:x64-windows : 2020.01.20.00
folly:x64-windows : 2019.10.21.00
cmake-gui
vcpkg
visual studio 2019

logs for ALL_BUILD
ALL_BUILD.txt

logs for mvfst_transport:
mvfst_transport.txt

folly::IOBuf : Segmentation Fault

(OS :- Ubuntu 18.04 on VirtualBox)
I'm curious about what the probable cause for such an error might be. Is it something that might occur because of the machine I'm running it on or something in the library ?
(I'm executing the example-echo server and sending packets to it through a custom client)

Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000056370934a731 in folly::IOBuf::cloneOne (this=this@entry=0x0)
at /mvfst/build/deps/folly/folly/io/IOBuf.h:1559
1559 return reinterpret_cast<SharedInfo*>(flagsAndSharedInfo
& ~kFlagMask);

PC: @ 0x56370934a731 folly::IOBuf::cloneOne()
*** SIGSEGV (@0x30) received by PID 29406 (TID 0x7f9996fee700) from PID 48; stack trace: ***
@ 0x7f999894a641 (unknown)
@ 0x7f999898e540 (unknown)
@ 0x56370934a731 folly::IOBuf::cloneOne()
@ 0x56370934b6cb folly::IOBuf::clone()
@ 0x563709140089 quic::samples::EchoHandler::readAvailable()
@ 0x56370922227e quic::QuicTransportBase::invokeReadDataAndCallbacks()
@ 0x563709250a05 quic::FunctionLooper::commonLoopBody()
@ 0x563709250bb3 quic::FunctionLooper::runLoopCallback()
@ 0x563709355ac2 folly::EventBase::runLoopCallbacks()
@ 0x563709356d72 folly::EventBase::loopBody()
@ 0x563709357885 folly::EventBase::loop()
@ 0x5637093598b8 folly::EventBase::loopForever()
@ 0x563709373943 folly::run()
@ 0x7f9998451f74 (unknown)
@ 0x7f9998982669 start_thread
@ 0x7f999815b323 clone
Segmentation fault (core dumped)

lossTimeOut Expired problem

Hi, when I run tperf with certain conditions that delay=40ms and loss=1%/3%/5%/10% using linux tc command, server breaks down after seconds of transferring with message "error=LocalError, no error, lossTimeOut Expired() error". However when there's no such limitation in delay and loss or just set delay time, the whole program runs well. So have you tested tperf in shuch network conditions with different composition of delay and loss? Thanks!

Errors about building mvfst-server

D: \ foly \ foly / container / detail / f14table. H (890,1): error c2247: "quic:: quicserverworker:: sourceidentityhash" is not accessible because "foly:: F14:: detail:: objectholder < 72, quic:: quicserverworker:: sourceidentityhash, true >" inherits from "quic:: quicserverworker:: sourceidentityhash" using "private"

Internal Error with small_vector in folly

Hi guys when I run tperf with command ./tperf -mode=server -host=10.99.211.104 -port=6666 -pacing=true -gso=true -congestion=bbr -max_cwnd_mss=860000 -window=65536000 in server side and ./tperf -mode=client -host=10.99.211.104 -port=6666 -pacing=true -gso=true -congestion=bbr -max_cwnd_mss=860000 -window=65536000 -duration=30 in client side under 60ms delay and 20% loss.
I met a problem that client broke out with Internal Error, and finally I found that this was caused by the function named makeSizeInternal in small_vector.h and it threw exception: max_size exceeded in small_vector. I replace excption code with LOG(INFO) << newSize << " " << max_size() << " " << capacity(); and the result is "32768 32767 32767" every time I run tperf, and I found that the value 32768 and 32767 has something to do with function updateLargestReceivedPacketNum in QuicStateFunction.h because after ackState.acks.insert(packetNum), the size of acks increases monotonically until it reaches 32767 and then changes to 0 again in some cases.
So I want to know what reason may cause this problem. Thanks!

Ubuntu1604 build issues

Thanks for your reply. Some questions no longer appear, but there are still the following questions:

make -j 4
[ 1%] Performing update step for 'googletest'
[ 2%] Built target mvfst_bufutil
[ 3%] Built target mvfst_constants
[ 3%] Performing configure step for 'googletest'
[ 4%] Built target mvfst_exception
loading initial cache file /home/h3c/ywc/mvfst/_build/build/googletest/tmp/googletest-cache-RelWithDebInfo.cmake
[ 5%] Built target mvfst_looper
-- Configuring done
[ 7%] Built target mvfst_codec_types
-- Generating done
-- Build files have been written to: /home/h3c/ywc/mvfst/_build/build/googletest/src/googletest-build
[ 8%] Performing build step for 'googletest'
[ 9%] Built target mvfst_codec_decode
[ 36%] Built target gmock_main
[ 63%] Built target gmock
[ 81%] Built target gtest
[100%] Built target gtest_main
[ 10%] Built target mvfst_codec_packet_number_cipher
[ 10%] No install step for 'googletest'
[ 10%] Completed 'googletest'
[ 11%] Built target googletest
Scanning dependencies of target PacketNumberTest
Scanning dependencies of target QuicConnectionIdTest
Scanning dependencies of target QuicIntegerTest
[ 14%] Built target mvfst_handshake
[ 14%] Building CXX object quic/codec/test/CMakeFiles/QuicConnectionIdTest.dir/QuicConnectionIdTest.cpp.o
[ 15%] Built target mvfst_codec_pktbuilder
Scanning dependencies of target FizzPacketNumberCipherTest
[ 16%] Building CXX object quic/codec/test/CMakeFiles/QuicIntegerTest.dir/QuicIntegerTest.cpp.o
[ 16%] Building CXX object quic/codec/test/CMakeFiles/PacketNumberTest.dir/PacketNumberTest.cpp.o
[ 16%] Building CXX object quic/handshake/test/CMakeFiles/FizzPacketNumberCipherTest.dir/FizzPacketNumberCipherTest.cpp.o
[ 16%] Building CXX object quic/codec/test/CMakeFiles/QuicConnectionIdTest.dir///common/test/TestMain.cpp.o
[ 17%] Linking CXX executable QuicConnectionIdTest
[ 17%] Building CXX object quic/codec/test/CMakeFiles/QuicIntegerTest.dir///common/test/TestMain.cpp.o
[ 17%] Built target QuicConnectionIdTest
[ 18%] Building CXX object quic/handshake/test/CMakeFiles/FizzPacketNumberCipherTest.dir///common/test/TestMain.cpp.o
[ 19%] Building CXX object quic/codec/test/CMakeFiles/PacketNumberTest.dir///common/test/TestMain.cpp.o
[ 20%] Linking CXX executable QuicIntegerTest
[ 21%] Built target mvfst_codec
[ 21%] Building CXX object quic/state/CMakeFiles/mvfst_state_machine.dir/StateData.cpp.o
[ 21%] Linking CXX executable PacketNumberTest
[ 21%] Built target QuicIntegerTest
[ 22%] Building CXX object quic/state/CMakeFiles/mvfst_state_machine.dir/PendingPathRateLimiter.cpp.o
[ 22%] Linking CXX executable FizzPacketNumberCipherTest
[ 22%] Built target PacketNumberTest
[ 22%] Built target FizzPacketNumberCipherTest
/home/h3c/ywc/mvfst/quic/state/StateData.cpp: In member function ‘bool quic::QuicConnectionStateBase::retireAndSwitchPeerConnectionIds()’:
/home/h3c/ywc/mvfst/quic/state/StateData.cpp:161:22: error: could not convert ‘((quic::QuicConnectionStateBase*)this)->quic::QuicConnectionStateBase::nodeType’ from ‘quic::QuicNodeType’ to ‘bool’
auto& mainPeerId = nodeType == QuicNodeType::Client ? serverConnectionId
^
quic/state/CMakeFiles/mvfst_state_machine.dir/build.make:110: recipe for target 'quic/state/CMakeFiles/mvfst_state_machine.dir/StateData.cpp.o' failed
make[2]: *** [quic/state/CMakeFiles/mvfst_state_machine.dir/StateData.cpp.o] Error 1
CMakeFiles/Makefile2:4426: recipe for target 'quic/state/CMakeFiles/mvfst_state_machine.dir/all' failed
make[1]: *** [quic/state/CMakeFiles/mvfst_state_machine.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

EchoHandler destructor never called

Hello, I am encounting a problem when running mvfst/quic/samples/echo example, the EchoHandler destructor never called, when I go through EchoServerTransportFactory::make I found EchoHandler constructor was called here but destructor was called in ~EchoServerTransportFactory(), but EchoServerTransportFactory is constructed once and destructor never called, how can I solve this problem?

Segmentation fault in folly::IOBuf::prependChain at IOBuf.cpp:589

If the echo server provided in samples is run and a stream frame is provided as input such that the value for the OFF bit is set as false even when the frame does contain a offset value, it causes a segmentation fault to occur at

IOBuf* otherTail = other->prev_ (IOBuf.cpp:589)

Public Server build file

After building successfully, which binary in the build directory represents the public server running on fb.mvfst.net:443 ?
If not exactly, which one implements most of the functionality ?
Thanks :)

Build error!

question

branch: master
linux: Linux zero-ThinkPad-E450 5.3.0-51-generic #44~18.04.2-Ubuntu SMP Thu Apr 23 14:27:18 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
error msg:

[ 59%] Linking CXX executable QuicBatchWriterTest
[ 59%] Built target QPRFunctionsTest
CMakeFiles/QuicBatchWriterTest.dir/QuicBatchWriterTest.cpp.o: In function `std::_MakeUniq<quic::SimpleBufAccessor>::__single_object std::make_unique<quic::SimpleBufAccessor, unsigned long>(unsigned long&&) [clone .isra.278]':
/usr/include/c++/7/bits/unique_ptr.h:821: undefined reference to `quic::SimpleBufAccessor::SimpleBufAccessor(unsigned long)'
CMakeFiles/QuicBatchWriterTest.dir/QuicBatchWriterTest.cpp.o: In function `quic::QuicServerConnectionState::QuicServerConnectionState()':
/home/zero/01opencode/mvfst/quic/server/state/ServerStateMachine.h:130: undefined reference to `vtable for quic::QuicServerConnectionState'
/home/zero/01opencode/mvfst/quic/server/state/ServerStateMachine.h:141: undefined reference to `quic::ServerHandshake::ServerHandshake(quic::QuicConnectionStateBase*)'
CMakeFiles/QuicBatchWriterTest.dir/QuicBatchWriterTest.cpp.o: In function `quic::QuicServerConnectionState::~QuicServerConnectionState()':
/home/zero/01opencode/mvfst/quic/server/state/ServerStateMachine.h:84: undefined reference to `vtable for quic::QuicServerConnectionState'
collect2: error: ld returned 1 exit status
quic/api/test/CMakeFiles/QuicBatchWriterTest.dir/build.make:177: recipe for target 'quic/api/test/QuicBatchWriterTest' failed
make[2]: *** [quic/api/test/QuicBatchWriterTest] Error 1
CMakeFiles/Makefile2:1613: recipe for target 'quic/api/test/CMakeFiles/QuicBatchWriterTest.dir/all' failed
make[1]: *** [quic/api/test/CMakeFiles/QuicBatchWriterTest.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 59%] Linking CXX static library libmvfst_test_utils.a
[ 60%] Built target mvfst_test_utils
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

steps to reproduce the problem

  1. git clone [email protected]:facebookincubator/mvfst.git
  2. sudo apt-get update && apt install cmake
  3. run "./build_helper.sh"

advice?

any advices?
Could you pls provide the linux version and lib version needed about the mvfst or provide a docker?

Building project on Windows with error "mvfst_server.vcxproj" -- FAILED

I tried to compile the mvfst on windows with cmake and visual studio . And I used projects vcpkg ([URL to Vcpkg])(https://github.com/Microsoft/vcpkg#vcpkg) to install dependencies like folly, fizz and others .
I can get other components done except mvfst_server and mvfst_client with following information:

29>Generating Code...
29>Done building project "mvfst_server.vcxproj" -- FAILED.
30>------ Rebuild All started: Project: ALL_BUILD, Configuration: Debug x64 ------
30>Building Custom Rule D:/zhao/mvfst/CMakeLists.txt
========== Rebuild All: 28 succeeded, 2 failed, 0 skipped ==========

Detail logs:
Output-Build.txt

Environment for building:
system : win7
VC : Visual Studio 2019
cmake : 3.16.2
vcpkg : latest

Is there any advice for the errors ?Or for building mvfst on windows7 ?
Thanks so much .

Using QUIC for real time media

This is just a question, feel free to immediately close this. I figured I'd post it publicly in the instance that others have the same question.

I'm considering forking mvfst to better support real time video. There's a few reasons QUIC is not that well suited:

  • It doesn't provide an unreliable, unordered data stream. This is useful in two specific cases for video streaming. The first is that encoded video streams can still be decoded when some encoded data is lost. The frame won't look as good, but it's passable. The second is that if an application wants to get all the encoded data of a frame to the client, it could add FEC on top of the packets transmitted. Then, the receiver only needs a certain percentage of packets to fully recreate the data for the encoded frame.
  • It doesn't provide timing and packet loss feedback back to the application layer. This is useful for the video encoder to increase/decrease its bit rate.

Here's a recent paper that goes into more detail: https://csperkins.org/publications/2018/12/perkins2018rtp-quic.pdf

My impression is that a simple implementation of this might be doable. For the second problem, I could sub optimally just record how much data the application is receiving and use that as a proxy for a bandwidth estimate. Or, I could dig into the congestion control algorithm and pull out the bandwidth estimate from there.

For the first problem, someone said they modified quic-go with 200 lines of code: https://arxiv.org/pdf/1809.10270.pdf

Do you have any thoughts or guidance here?

Thanks!

Performance numbers?

Hi,

We'd like to develop a C# wrapper on top of mvfst. Before doing that, we'd like to better understand mvfst performance. Are there any performance figure available? How mvfst compare with TCP and in which scenarios?

Thanks!

function updateRtt confusion

void updateRtt(
QuicConnectionStateBase& conn,
std::chrono::microseconds rttSample,
std::chrono::microseconds ackDelay) {
std::chrono::microseconds minRtt = timeMin(conn.lossState.mrtt, rttSample);
conn.lossState.maxAckDelay = timeMax(conn.lossState.maxAckDelay, ackDelay);
bool shouldUseAckDelay = (rttSample > ackDelay) &&
(rttSample > minRtt + ackDelay || conn.lossState.mrtt == kDefaultMinRtt);
if (shouldUseAckDelay) {
rttSample -= ackDelay;
}
conn.lossState.mrtt = minRtt;
// We use the original minRtt without the ack delay included here
// explicitly. We might want to change this by including ackDelay
// as well.
conn.lossState.lrtt = rttSample;
...
}

Hello, the above code was from quic/state/QuicStateFuncion.cpp updateRtt(). It seems the minRtt always contains the ackdelay, while to the lrtt the ackdelay is not always contained. I'm confused about this settings .

According to your comments, should I change the code in following way?
std::chrono::microseconds minRtt = timeMin(conn.lossState.mrtt, rttSample);
==>std::chrono::microseconds minRtt = timeMin(conn.lossState.mrtt, rttSample - ackDelay);

Else if I want ackDelay always been contained, I should let "shouldUseAckDelay " always be false.

I don't know if I misunderstand this code,looking forward to your reply, thank you very much.

Echoserver does not use folly::EventBase

The example echo server in Echoserver does not require folly::EventBase.
You can hang the server with a simple
while(1) usleep(1000000);

Though one could do better of course.
I imagine folly::EventBase is left over from a very early implementation

MacOS Mojave 10.14 build: mvfst_mock_socket library not found

It looks like cac8669 removed the mvfst_mock_socket library. Attempting to build at the HEAD on MacOS Mojave 10.14 currently results in:

...
[ 78%] Built target HandshakeLayerTest
[ 80%] Built target MacroTest
[ 81%] Built target QuicLossFunctionsTest
[ 82%] Built target echo
[ 83%] Built target QuicServerTransportTest
[ 84%] Linking CXX executable QuicServerTest
ld: library not found for -lmvfst_mock_socket
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [quic/server/test/QuicServerTest] Error 1
make[1]: *** [quic/server/test/CMakeFiles/QuicServerTest.dir/all] Error 2
make: *** [all] Error 2

FWIW: If I build at 4ed2963 (i.e., the commit before cac8669), I get other MacOS linker errors (which is presumably what cac8669 was fixing).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.