Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build issues #1

Closed
fcangialosi opened this issue May 1, 2019 · 8 comments
Closed

build issues #1

fcangialosi opened this issue May 1, 2019 · 8 comments

Comments

@fcangialosi
Copy link
Contributor

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
@udippant
Copy link
Contributor

udippant commented May 1, 2019

What version of boost are you using?
Can you run: dpkg -s libboost-dev | grep 'Version' ?

@udippant
Copy link
Contributor

udippant commented May 1, 2019

I can't repro it yet (with boost 1.65). But can you locally apply this patch and try running it again:

diff --git a/quic/codec/QuicReadCodec.cpp b/quic/codec/QuicReadCodec.cpp
index b7bbb8e..1f380d0 100644
--- a/quic/codec/QuicReadCodec.cpp
+++ b/quic/codec/QuicReadCodec.cpp
@@ -36,7 +36,7 @@ CodecResult QuicReadCodec::parseLongHeaderPacket(
     // packet ends. Clear the queue since no other data in this packet is
     // parse-able.
     queue.clear();
-    return folly::none;
+    return CodecResult(folly::none);
   }
   if (longHeaderInvariant->invariant.version ==
       QuicVersion::VERSION_NEGOTIATION) {

@mingtaoy
Copy link
Contributor

mingtaoy commented May 1, 2019

@udippant I can repro on boost-1.58. Your patch doesn't work as well :( I'll do a bisect on boost.variant, we might need to adjust our minimum required boost version.

@mingtaoy
Copy link
Contributor

mingtaoy commented May 1, 2019

@udippant - This is fixed in boostorg/variant@b365068 which is in Boost 1.62.

facebook-github-bot pushed a commit that referenced this issue May 2, 2019
Summary: Fix for issue #1

Reviewed By: siyengar

Differential Revision: D15172405

fbshipit-source-id: 3e935ae42e445ae605b8e55e080ff7502bafaa83
facebook-github-bot pushed a commit that referenced this issue May 2, 2019
Summary:
Fix for #1
The issue is fixed in
boostorg/variant@b365068
(1.62)

Reviewed By: yangchi

Differential Revision: D15182758

fbshipit-source-id: d6886a74fbf817dafa22494361f7f00d5a25af26
@fcangialosi
Copy link
Contributor Author

So just to be clear, the fix is to upgrade to boost >= 1.62?

@udippant
Copy link
Contributor

udippant commented May 2, 2019

@fcangialosi yes, the boost lib should at least be at 1.62 (I have landed a change on cmake to require it now)

@fcangialosi
Copy link
Contributor Author

(for future reference: i had a bit of trouble updating boost on my machine so I just spun up a new machine with ubuntu 18.04, which gets boost 1.65 by default, and that worked well)

@weiyuxingchen
Copy link

I have the same question:
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

facebook-github-bot pushed a commit that referenced this issue Apr 26, 2021
Summary:
As per design, we are not supposed to honor duplicate byte event registrations. Duplicate is defined by a registration for the same <stream ID, stream offset, callback*> tuple twice.
Currently, there is a bug where-in we can register the same byte event a second time *if* there is another byte event for a higher offset that is registered in-between, for the same stream.
Example Sequence that triggers the bug:
1. Registration for Stream ID =10, offset = 50, callback = A. This will be successful.
2. Registration for Stream ID = 10, offset = 55, callback = <doesn't matter>. This will be successful.
3. Registration for Stream ID = 10, offset = 50, callback = A. This is a duplicate of #1. This *should not* be honored, but it was being honored (this was the bug).

This commit fixes the bug, #3 will return INVALID_OPERATION.

Reviewed By: bschlinker, lnicco

Differential Revision: D27946237

fbshipit-source-id: f9751ac90159284f86a285e5e0ebb23b83041d2a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants