Skip to content

Instantly share code, notes, and snippets.

View themarwhal's full-sized avatar
🐙
cambridge, ma

Marie themarwhal

🐙
cambridge, ma
  • cambridge, ma
View GitHub Profile
@themarwhal
themarwhal / gist:10dcc8a0d319d0d3301988fb21e2e655
Created March 15, 2021 15:01
sessiond_integ_test ASAN output
=================================================================
==62382==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 1712 byte(s) in 2 object(s) allocated from:
#0 0x7f4f6cc28947 in operator new(unsigned long) (/lib/x86_64-linux-gnu/libasan.so.5+0x10f947)
#1 0x55e298bc9a32 in magma::SessionProxyResponderAsyncService::init_call_data() /home/vagrant/magma/lte/gateway/c/session_manager/SessionManagerServer.cpp:87
#2 0x55e298bc8640 in magma::AsyncService::wait_for_requests() /home/vagrant/magma/lte/gateway/c/session_manager/SessionManagerServer.cpp:25
#3 0x55e298a8ba84 in magma::SessiondTest::SetUp()::{lambda()#6}::operator()() const (/home/vagrant/build/c/session_manager/test/sessiond_integ_test+0x998a84)
#4 0x55e298b94cae in void std::__invoke_impl<void, magma::SessiondTest::SetUp()::{lambda()#6}>(std::__invoke_other, magma::SessiondTest::SetUp()::{lambda()#6}&&) (/home/vagrant/build/c/session_manager/test/sessiond_integ_test+0xaa1cae)
#5 0x55e298b825e1 in std::__invoke
@themarwhal
themarwhal / gist:78db75fb63889067fa51dd0696d30db5
Created March 19, 2021 21:03
spgw conversion test error in codecov
-- Build files have been written to: /build/c/oai
[986/987] Linking CXX executable test/spgw_task/spgw_state_converter_test
FAILED: test/spgw_task/spgw_state_converter_test
: && /usr/bin/c++ -Wall -g -DDEBUG_IS_ON=1 -fsanitize=address -fsanitize=undefined -fprofile-arcs -ftest-coverage -rdynamic test/spgw_task/CMakeFiles/spgw_state_converter_test.dir/test_spgw_state_converter.cpp.o -o test/spgw_task/spgw_state_converter_test -L/usr/src/googletest/googlemock/lib -Wl,-rpath,/usr/src/googletest/googlemock/lib:/usr/local/lib test/spgw_task/libSPGW_TASK_TEST_LIB.a tasks/sgw/libTASK_SGW.a tasks/gtpv1-u/libTASK_GTPV1U.a lib/openflow/controller/libLIB_OPENFLOW_CONTROLLER.a tasks/nas/libTASK_NAS.a tasks/mme_app/libTASK_MME_APP.a tasks/sgw_s8/libTASK_SGW_S8.a tasks/s1ap/libTASK_S1AP.a tasks/sgw/libTASK_SGW.a tasks/gtpv1-u/libTASK_GTPV1U.a lib/openflow/controller/libLIB_OPENFLOW_CONTROLLER.a tasks/nas/libTASK_NAS.a tasks/mme_app/libTASK_MME_APP.a tasks/sgw_s8/libTASK_SGW_S8.a tasks/s1ap/libTASK_S1AP.
vagrant@magma-dev:~/magma/lte/gateway$ make build_session_manager BUILD_TYPE=RelWithDebInfo
OAI_FLAGS -DS6A_OVER_GRPC=True -DEMBEDDED_SGW=True -DENABLE_OPENFLOW=True -DSPGW_ENABLE_SESSIOND_AND_MOBILITYD=True
find /home/vagrant/magma/lte/gateway/c/session_manager \( -iname "*.c" -o -iname "*.cpp" -o -iname "*.h" \) -exec \
clang-format --style=file -i {} \;
find /home/vagrant/magma/orc8r/gateway/c/common \( -iname "*.c" -o -iname "*.cpp" -o -iname "*.h" \) -exec \
clang-format --style=file -i {} \;
mkdir -p /home/vagrant/build/c//magma_common
cd /home/vagrant/build/c//magma_common && cmake /home/vagrant/magma/orc8r/gateway/c/common -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_FLAGS="" -DCMAKE_CXX_FLAGS="" -GNinja
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
This file has been truncated, but you can view the full file.
OAI_FLAGS -DS6A_OVER_GRPC=True -DEMBEDDED_SGW=True -DENABLE_OPENFLOW=True -DSPGW_ENABLE_SESSIOND_AND_MOBILITYD=True
find /home/vagrant/magma/lte/gateway/c/oai \( -iname "*.c" -o -iname "*.cpp" -o -iname "*.h" \) -exec \
clang-format --style=file -i {} \;
find /home/vagrant/magma/orc8r/gateway/c/common \( -iname "*.c" -o -iname "*.cpp" -o -iname "*.h" \) -exec \
clang-format --style=file -i {} \;
mkdir -p /home/vagrant/build/c//magma_common
cd /home/vagrant/build/c//magma_common && cmake /home/vagrant/magma/orc8r/gateway/c/common -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_FLAGS="" -DCMAKE_CXX_FLAGS="" -GNinja
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.0.0")
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread;-lpthread (found version "3.0.0")
-- Configuring done
This file has been truncated, but you can view the full file.
OAI_FLAGS -DS6A_OVER_GRPC=True -DEMBEDDED_SGW=True -DENABLE_OPENFLOW=True -DSPGW_ENABLE_SESSIOND_AND_MOBILITYD=True
find /home/vagrant/magma/lte/gateway/c/oai \( -iname "*.c" -o -iname "*.cpp" -o -iname "*.h" \) -exec \
clang-format --style=file -i {} \;
find /home/vagrant/magma/orc8r/gateway/c/common \( -iname "*.c" -o -iname "*.cpp" -o -iname "*.h" \) -exec \
clang-format --style=file -i {} \;
mkdir -p /home/vagrant/build/c//magma_common
cd /home/vagrant/build/c//magma_common && cmake /home/vagrant/magma/orc8r/gateway/c/common -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Wall " -DCMAKE_CXX_FLAGS="-Wall " -GNinja
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.0.0")
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread;-lpthread (found version "3.0.0")
-- Configuring done
@themarwhal
themarwhal / gist:4e0e71cd49c360a76c9c8f23f0a23ea4
Created April 5, 2021 15:51
verbose OAI build RelWithDebInfo master
This file has been truncated, but you can view the full file.
OAI_FLAGS -DS6A_OVER_GRPC=True -DEMBEDDED_SGW=True -DENABLE_OPENFLOW=True -DSPGW_ENABLE_SESSIOND_AND_MOBILITYD=True
find /home/vagrant/magma/lte/gateway/c/oai \( -iname "*.c" -o -iname "*.cpp" -o -iname "*.h" \) -exec \
clang-format --style=file -i {} \;
find /home/vagrant/magma/orc8r/gateway/c/common \( -iname "*.c" -o -iname "*.cpp" -o -iname "*.h" \) -exec \
clang-format --style=file -i {} \;
mkdir -p /home/vagrant/build/c//magma_common
cd /home/vagrant/build/c//magma_common && cmake /home/vagrant/magma/orc8r/gateway/c/common -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_FLAGS="" -DCMAKE_CXX_FLAGS="" -GNinja
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/lib/ccache/cc
@themarwhal
themarwhal / gist:e8b14df1ff3aa50105971689c60d7503
Created April 9, 2021 15:00
Full build logs with gcc flags for session_manager
python) vagrant@magma-dev-focal:~/magma/lte/gateway$ make build_session_manager BUILD_TYPE=RelWithDebInfo
OAI_FLAGS -DS6A_OVER_GRPC=True -DEMBEDDED_SGW=True -DENABLE_OPENFLOW=True -DSPGW_ENABLE_SESSIOND_AND_MOBILITYD=True
find /home/vagrant/magma/lte/gateway/c/session_manager \( -iname "*.c" -o -iname "*.cpp" -o -iname "*.h" \) -exec \
clang-format --style=file -i {} \;
find /home/vagrant/magma/orc8r/gateway/c/common \( -iname "*.c" -o -iname "*.cpp" -o -iname "*.h" \) -exec \
clang-format --style=file -i {} \;
mkdir -p /home/vagrant/build/c//magma_common
cd /home/vagrant/build/c//magma_common && cmake /home/vagrant/magma/orc8r/gateway/c/common -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_FLAGS="-Wall " -DCMAKE_CXX_FLAGS="" -GNinja
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
#!/bin/bash
C_BUILD=/home/vagrant/build/c
EXECS="session_manager/sessiond oai/oai_mme/mme sctpd/sctpd connection_tracker/connectiond"
for EXEC in $EXECS
do
EXEC_PATH="${C_BUILD}/${EXEC}"
echo "Uploading debug artifacts for $EXEC_PATH"
# Strip artifacts
@themarwhal
themarwhal / gist:d5aa3f1a4783709b7657c2c4651dfc17
Created April 9, 2021 19:33
Flake8 outputs for lte/gateway/python
4 B001 Do not use bare `except:`, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer `except Exception:`. If you're sure what you're doing, be explicit and write `except BaseException:`.
1 B006 Do not use mutable data structures for argument defaults. They are created during function definition time. All calls to the function reuse this one instance of that data structure, persisting changes between them.
15 B007 Loop control variable 'i' not used within the loop body. If this is intended, start the name with an underscore.
4 B011 Do not call assert False since python -O removes these calls. Instead callers should raise AssertionError().
1 B014 Redundant exception types in `except (NotADirectoryError, ImportError, ModuleNotFoundError) as e:`. Write `except (NotADirectoryError, ImportError) as e:`, which catches exactly the same exceptions.
2 C402 Unnecessary generator - rewrite as a dict comprehension.
2 C416 Unnecessary list compreh
vagrant@magma-test:~/magma/lte/gateway/python/integ_tests$ sudo dmesg
[ 0.000000] Linux version 4.9.0-9-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP Debian 4.9.168-1 (2019-04-12)
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.9.0-9-amd64 root=UUID=09a33d74-8f44-4cc3-be33-891d17ea35e7 ro debian-installer=en_US net.ifnames=0 quiet
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable