-
Notifications
You must be signed in to change notification settings - Fork 591
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
Fix badge url to travis #1
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xjtian has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Thanks @Lusitaniae. I've imported the PR to our internal repo and it should land in master soon. Just gonna tweak the url a tiny bit before landing:
|
Ah, I can't amend imported commits anymore now that the repo is public (we were working off a private repo before where this was allowed). Would you mind changing the README line to what I pasted above? Thanks! |
@Lusitaniae has updated the pull request. Re-import the pull request |
@xjtian its done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xjtian has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: ``` Direct leak of 143232 byte(s) in 22 object(s) allocated from: #0 0x7f69985e414e in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/liblsan.so.0+0xd14e) #1 0x55d5fe489d04 in itti_init /home/vagrant/magma/c/oai/common/itti/intertask_interface.c:821 #2 0x55d5fe3d4da5 in main /home/vagrant/magma/c/oai/oai_mme/oai_mme.c:62 #3 0x7f69946cb2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0) ``` Let's clean up the resources used by ITTI so LSAN doesn't complain about it. Reviewed By: ssanadhya Differential Revision: D13568198 fbshipit-source-id: fa596882c1813fca25a4efd2333e466b139b2dcc
Summary: Pull Request resolved: facebookexternal/magma-distribution#1 Pull Request resolved: #1633 Pull Request resolved: facebookexternal/fbc#2397 Reviewed By: rckclmbr Differential Revision: D21456981 fbshipit-source-id: 8023312063f87669d20d30416a1cadf81b019af0
Summary: Pull Request resolved: #1818 Running valgrind on sessiond and running `make integ_test TESTS=s1aptests/test_attach_detach_multi_ue.py` (Also the memory leak observed was scaling with the number of UEs so it was definitely an actual issue) Before the change ```==5861== ==5861== 14,912 (3,840 direct, 11,072 indirect) bytes in 32 blocks are definitely lost in loss record 1,727 of 1,729 ==5861== at 0x4C2C21F: operator new(unsigned long) (vg_replace_malloc.c:334) ==5861== by 0x6E6342: magma::SessionState::is_dynamic_rule_installed(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (SessionState.cpp:486) ==5861== by 0x745780: magma::lte::SessionStore::merge_into_session(std::unique_ptr<magma::SessionState, std::default_delete<magma::SessionState> >&, magma::SessionStateUpdateCriteria&) (SessionStore.cpp:213) ==5861== by 0x744201: magma::lte::SessionStore::update_sessions(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, magma::SessionStateUpdateCriteria, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, magma::SessionStateUpdateCriteria> > >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, magma::SessionStateUpdateCriteria, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, magma::SessionStateUpdateCriteria> > > > > > const&) (SessionStore.cpp:104) ==5861== by 0x693858: magma::LocalSessionManagerHandlerImpl::end_session(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::unique_ptr<magma::SessionState, std::default_delete<magma::SessionState> >, std::allocator<std::unique_ptr<magma::SessionState, std::default_delete<magma::SessionState> > > >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::unique_ptr<magma::SessionState, std::default_delete<magma::SessionState> >, std::allocator<std::unique_ptr<magma::SessionState, std::default_delete<magma::SessionState> > > > > > >&, magma::lte::LocalEndSessionRequest const&, std::function<void (grpc::Status, magma::lte::LocalEndSessionResponse)>) (LocalSessionManagerHandler.cpp:445) ==5861== by 0x6935AA: magma::LocalSessionManagerHandlerImpl::EndSession(grpc::ServerContext*, magma::lte::LocalEndSessionRequest const*, std::function<void (grpc::Status, magma::lte::LocalEndSessionResponse)>)::{lambda()#1}::operator()() const (LocalSessionManagerHandler.cpp:433) ==5861== by 0x695BD1: void folly::detail::function::FunctionTraits<void ()>::callBig<magma::LocalSessionManagerHandlerImpl::EndSession(grpc::ServerContext*, magma::lte::LocalEndSessionRequest const*, std::function<void (grpc::Status, magma::lte::LocalEndSessionResponse)>)::{lambda()#1}>(folly::detail::function::Data&) (Function.h:321) ==5861== by 0x54BDF8D: folly::NotificationQueue<folly::Function<void ()> >::Consumer::consumeMessages(bool, unsigned long*) (in /usr/local/lib/libfolly.so.57.0.0) ==5861== by 0x97AD59F: event_base_loop (in /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5.1.9) ==5861== by 0x54B8D2F: folly::EventBase::loopBody(int) (in /usr/local/lib/libfolly.so.57.0.0) ==5861== by 0x54BA375: folly::EventBase::loopForever() (in /usr/local/lib/libfolly.so.57.0.0) ==5861== by 0x6AC968: magma::LocalEnforcer::start() (LocalEnforcer.cpp:125) ==5861== ==5861== LEAK SUMMARY: ==5861== definitely lost: 7,680 bytes in 64 blocks ==5861== indirectly lost: 11,072 bytes in 224 blocks ==5861== possibly lost: 43,919 bytes in 100 blocks ==5861== still reachable: 528,915 bytes in 7,075 blocks ==5861== of which reachable via heuristic: ==5861== stdstring : 181 bytes in 2 blocks ==5861== multipleinheritance: 3,090 bytes in 10 blocks ==5861== suppressed: 0 bytes in 0 blocks ==5861== Reachable blocks (those to which a pointer was found) are not shown. ==5861== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==5861== ==5861== For counts of detected and suppressed errors, rerun with: -v ==5861== ERROR SUMMARY: 71 errors from 71 contexts (suppressed: 0 from 0) vagrant@magma-dev:~/magma/lte/gateway$ ``` After the change ```==10143== ==10143== LEAK SUMMARY: ==10143== definitely lost: 0 bytes in 0 blocks ==10143== indirectly lost: 0 bytes in 0 blocks ==10143== possibly lost: 39,878 bytes in 97 blocks ==10143== still reachable: 529,283 bytes in 7,078 blocks ==10143== of which reachable via heuristic: ==10143== stdstring : 181 bytes in 2 blocks ==10143== multipleinheritance: 3,090 bytes in 10 blocks ==10143== suppressed: 0 bytes in 0 blocks ==10143== Reachable blocks (those to which a pointer was found) are not shown. ==10143== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==10143== ==10143== For counts of detected and suppressed errors, rerun with: -v ==10143== ERROR SUMMARY: 67 errors from 67 contexts (suppressed: 0 from 0) ``` Reviewed By: karthiksubraveti Differential Revision: D22042230 fbshipit-source-id: 77e051149a54bbed2c8ec746405c5f75b6632489
Summary: ASAN error: ``` Jun 16 08:56:03 magma-dev sessiond[9856]: ================================================================= Jun 16 08:56:03 magma-dev sessiond[9856]: ==9856==ERROR: AddressSanitizer: new-delete-type-mismatch on 0x61800001fc80 in thread T14: Jun 16 08:56:03 magma-dev sessiond[9856]: object passed to delete has wrong type: Jun 16 08:56:03 magma-dev sessiond[9856]: size of the allocated type: 816 bytes; Jun 16 08:56:03 magma-dev sessiond[9856]: size of the deallocated type: 808 bytes. Jun 16 08:56:03 magma-dev sessiond[9856]: I0616 08:56:03.149473 9886 SessionEvents.cpp:53] Could not log session_created event {"session_id":"IMSI001010000000001-120251","imsi":"IMSI001010000000001"}, Error Message: Connect Failed Jun 16 08:56:03 magma-dev sessiond[9856]: #0 0x7ff448b0d7f0 in operator delete(void*, unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc37f0) Jun 16 08:56:03 magma-dev sessiond[9856]: #1 0x559f94cbc742 in magma::AsyncGRPCRequest<magma::lte::LocalSessionManager::WithAsyncMethod_ReportRuleStats<magma::lte::LocalSessionManager::WithAsyncMethod_CreateSession<magma::lte::LocalSessionManager::WithAsyncMethod_EndSession<magma::lte::LocalSessionManager::Service> > >, magma::lte::LocalCreateSessionRequest, magma::lte::LocalCreateSessionResponse>::proceed() /home/vagrant/magma/lte/gateway/c/session_manager/SessionManagerServer.cpp:98 Jun 16 08:56:03 magma-dev sessiond[9856]: #2 0x559f94ca8f54 in magma::AsyncService::wait_for_requests() /home/vagrant/magma/lte/gateway/c/session_manager/SessionManagerServer.cpp:39 Jun 16 08:56:03 magma-dev sessiond[9856]: #3 0x559f94c7cae9 in operator() /home/vagrant/magma/lte/gateway/c/session_manager/sessiond_main.cpp:259 Jun 16 08:56:03 magma-dev sessiond[9856]: #4 0x559f94c81c51 in _M_invoke<> /usr/include/c++/6/functional:1391 Jun 16 08:56:03 magma-dev sessiond[9856]: #5 0x559f94c81a70 in operator() /usr/include/c++/6/functional:1380 Jun 16 08:56:03 magma-dev sessiond[9856]: #6 0x559f94c8192b in _M_run /usr/include/c++/6/thread:197 Jun 16 08:56:03 magma-dev sessiond[9856]: #7 0x7ff446dbde6e (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xb9e6e) Jun 16 08:56:03 magma-dev sessiond[9856]: #8 0x7ff447d384a3 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x74a3) Jun 16 08:56:03 magma-dev sessiond[9856]: #9 0x7ff446532d0e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0xe8d0e) Jun 16 08:56:03 magma-dev sessiond[9856]: 0x61800001fc80 is located 0 bytes inside of 816-byte region [0x61800001fc80,0x61800001ffb0) Jun 16 08:56:03 magma-dev sessiond[9856]: allocated by thread T14 here: Jun 16 08:56:03 magma-dev sessiond[9856]: #0 0x7ff448b0cbf0 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc2bf0) Jun 16 08:56:03 magma-dev sessiond[9856]: #1 0x559f94ca91f0 in magma::LocalSessionManagerAsyncService::init_call_data() /home/vagrant/magma/lte/gateway/c/session_manager/SessionManagerServer.cpp:60 ``` According to the internet, "Polymorphic base classes should declare virtual destructors. If a class has any virtual functions, it should have a virtual destructor". Resource : https://stackoverflow.com/questions/41552966/getting-new-delete-type-mismatch-from-asan Reviewed By: uri200 Differential Revision: D22065108 fbshipit-source-id: ff146a9a92f71408ea25dc86943938ca5afe88a1
Summary: This is pull request was created automatically because we noticed your project was missing a Contributing file. CONTRIBUTING files explain how a developer can contribute to the project - which you should actively encourage. This PR was crafted with love by Facebook's Open Source Team. Pull Request resolved: magma/fbc-js-core#1 Reviewed By: dlvhdr Differential Revision: D22570995 Pulled By: a8m fbshipit-source-id: 71f12cb73da5d38cf7e045d41e3ba7e6e592f17e
Addresses one finding (more exist) of #11826. Zero-initialized all instances of `plmn_array[PLMN_BYTES]` (so that they will be null terminated) and enlarged the array by one char to accommodate the null termination. Fixes the finding: ``` [ RUN ] TestAMFStateConverter.TestUEm5gmmContextToProto ================================================================= ==15482==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffee811fc86 at pc 0x7f3038dada6d bp 0x7ffee811faa0 sp 0x7ffee811f248 READ of size 7 at 0x7ffee811fc86 thread T0 #0 0x7f3038dada6c (/lib/x86_64-linux-gnu/libasan.so.5+0x67a6c) #1 0x7f302e641e9b in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) (/lib/x86_64-linux-gnu/libstdc++.so.6+0x145e9b) #2 0x7f30383b85f6 in magma::lte::oai::Tai::set_mcc_mnc(char const*) bazel-out/k8-dbg/bin/lte/protos/oai/nas_state_cpp_proto_pb/lte/protos/oai/nas_state.pb.h:11239 ``` ## Test Plan Using prototype Bazel build with `--config=asan` validated ASAN finding is resolved. Signed-off-by: Scott Moeller <electrojoe@gmail.com>
Addresses one finding (more exist) of #11826. Zero-initialized all instances of `plmn_array[PLMN_BYTES]` (so that they will be null terminated) and enlarged the array by one char to accommodate the null termination. Fixes the finding: ``` [ RUN ] TestAMFStateConverter.TestUEm5gmmContextToProto ================================================================= ==15482==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffee811fc86 at pc 0x7f3038dada6d bp 0x7ffee811faa0 sp 0x7ffee811f248 READ of size 7 at 0x7ffee811fc86 thread T0 #0 0x7f3038dada6c (/lib/x86_64-linux-gnu/libasan.so.5+0x67a6c) #1 0x7f302e641e9b in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) (/lib/x86_64-linux-gnu/libstdc++.so.6+0x145e9b) #2 0x7f30383b85f6 in magma::lte::oai::Tai::set_mcc_mnc(char const*) bazel-out/k8-dbg/bin/lte/protos/oai/nas_state_cpp_proto_pb/lte/protos/oai/nas_state.pb.h:11239 ``` ## Test Plan Using prototype Bazel build with `--config=asan` validated ASAN finding is resolved. Signed-off-by: Scott Moeller <electrojoe@gmail.com>
Addresses one finding (more exist) of magma#11826. Zero-initialized all instances of `plmn_array[PLMN_BYTES]` (so that they will be null terminated) and enlarged the array by one char to accommodate the null termination. Fixes the finding: ``` [ RUN ] TestAMFStateConverter.TestUEm5gmmContextToProto ================================================================= ==15482==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffee811fc86 at pc 0x7f3038dada6d bp 0x7ffee811faa0 sp 0x7ffee811f248 READ of size 7 at 0x7ffee811fc86 thread T0 #0 0x7f3038dada6c (/lib/x86_64-linux-gnu/libasan.so.5+0x67a6c) magma#1 0x7f302e641e9b in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) (/lib/x86_64-linux-gnu/libstdc++.so.6+0x145e9b) magma#2 0x7f30383b85f6 in magma::lte::oai::Tai::set_mcc_mnc(char const*) bazel-out/k8-dbg/bin/lte/protos/oai/nas_state_cpp_proto_pb/lte/protos/oai/nas_state.pb.h:11239 ``` ## Test Plan Using prototype Bazel build with `--config=asan` validated ASAN finding is resolved. Signed-off-by: Scott Moeller <electrojoe@gmail.com>
No description provided.