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

Getting Segmentation Error #114

Open
sarthakgoel1997 opened this issue Jul 13, 2022 · 20 comments
Open

Getting Segmentation Error #114

sarthakgoel1997 opened this issue Jul 13, 2022 · 20 comments

Comments

@sarthakgoel1997
Copy link

sarthakgoel1997 commented Jul 13, 2022

I have successfully downloaded all the dependencies. But it gives segmentation error when I try to run ./id2t

image

image

@pepper-jk
Copy link
Collaborator

Could you provide output for ./build.sh --full?

@sarthakgoel1997
Copy link
Author

Sure. Please check -

Last login: Thu Jul 14 10:53:40 on console
(base) [email protected]@MacBook-Pro-37 ~ % cd desktop/id2t
(base) [email protected]@MacBook-Pro-37 id2t % ./build.sh --full
Updating submodules
Detected OS: macOS
Error: No such keg: /usr/local/Cellar/python@2
Packages: Checking...
Packages: Found.
Collecting pip
  Using cached pip-22.1.2-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.2.3
    Uninstalling pip-20.2.3:
      Successfully uninstalled pip-20.2.3
Successfully installed pip-22.1.2
Collecting cairocffi==0.8.1
  Downloading cairocffi-0.8.1.tar.gz (79 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.4/79.4 kB 14.2 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting cffi>=1.12.2
  Downloading cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl (178 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 178.9/178.9 kB 16.5 MB/s eta 0:00:00
Collecting coverage>=4.5.1
  Downloading coverage-6.4.2-cp38-cp38-macosx_10_9_x86_64.whl (184 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 184.3/184.3 kB 56.5 MB/s eta 0:00:00
Collecting cycler>=0.10.0
  Downloading cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting kiwisolver>=1.0.1
  Downloading kiwisolver-1.4.3-cp38-cp38-macosx_10_9_x86_64.whl (65 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.3/65.3 kB 143.2 MB/s eta 0:00:00
Collecting lea==2.3.5
  Downloading lea-2.3.5.tar.gz (64 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.5/64.5 kB 135.9 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting matplotlib>=2.2.3
  Downloading matplotlib-3.5.2-cp38-cp38-macosx_10_9_x86_64.whl (7.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.3/7.3 MB 6.0 MB/s eta 0:00:00
Collecting memory-profiler>=0.54.0
  Downloading memory_profiler-0.60.0.tar.gz (38 kB)
  Preparing metadata (setup.py) ... done
Collecting numpy>=1.15
  Downloading numpy-1.23.1-cp38-cp38-macosx_10_9_x86_64.whl (18.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.1/18.1 MB 6.4 MB/s eta 0:00:00
Collecting psutil>=5.4.5
  Downloading psutil-5.9.1-cp38-cp38-macosx_10_9_x86_64.whl (239 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 239.2/239.2 kB 5.9 MB/s eta 0:00:00
Collecting pycparser>=2.18
  Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 kB 5.6 MB/s eta 0:00:00
Collecting pyparsing>=2.2.0
  Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.3/98.3 kB 6.0 MB/s eta 0:00:00
Collecting python-dateutil>=2.7.2
  Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 kB 5.6 MB/s eta 0:00:00
Collecting pytz>=2018.4
  Downloading pytz-2022.1-py2.py3-none-any.whl (503 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 503.5/503.5 kB 6.4 MB/s eta 0:00:00
Collecting pyxdg>=0.26
  Downloading pyxdg-0.28-py2.py3-none-any.whl (49 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.5/49.5 kB 12.3 MB/s eta 0:00:00
Collecting scapy==2.4.2
  Downloading scapy-2.4.2.tar.gz (795 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 795.5/795.5 kB 6.6 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting scipy>=1.1.0
  Downloading scipy-1.8.1-cp38-cp38-macosx_12_0_universal2.macosx_10_9_x86_64.whl (55.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.3/55.3 MB 6.1 MB/s eta 0:00:00
Collecting six>=1.11.0
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting pillow>=6.2.0
  Downloading Pillow-9.2.0-cp38-cp38-macosx_10_10_x86_64.whl (3.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.1/3.1 MB 7.7 MB/s eta 0:00:00
Collecting fonttools>=4.22.0
  Downloading fonttools-4.34.4-py3-none-any.whl (944 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 944.1/944.1 kB 9.4 MB/s eta 0:00:00
Collecting packaging>=20.0
  Downloading packaging-21.3-py3-none-any.whl (40 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.8/40.8 kB 126.2 MB/s eta 0:00:00
Using legacy 'setup.py install' for cairocffi, since package 'wheel' is not installed.
Using legacy 'setup.py install' for lea, since package 'wheel' is not installed.
Using legacy 'setup.py install' for scapy, since package 'wheel' is not installed.
Using legacy 'setup.py install' for memory-profiler, since package 'wheel' is not installed.
Installing collected packages: scapy, pyxdg, pytz, lea, six, pyparsing, pycparser, psutil, pillow, numpy, kiwisolver, fonttools, cycler, coverage, scipy, python-dateutil, packaging, memory-profiler, cffi, matplotlib, cairocffi
  Running setup.py install for scapy ... done
  Running setup.py install for lea ... done
  Running setup.py install for memory-profiler ... done
  Running setup.py install for cairocffi ... done
Successfully installed cairocffi-0.8.1 cffi-1.15.1 coverage-6.4.2 cycler-0.11.0 fonttools-4.34.4 kiwisolver-1.4.3 lea-2.3.5 matplotlib-3.5.2 memory-profiler-0.60.0 numpy-1.23.1 packaging-21.3 pillow-9.2.0 psutil-5.9.1 pycparser-2.21 pyparsing-3.0.9 python-dateutil-2.8.2 pytz-2022.1 pyxdg-0.28 scapy-2.4.2 scipy-1.8.1 six-1.16.0
-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Running Release configuration.
-- CMake version: 3.23.2
-- CMAKE_CXX_COMPILER '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++' 'Clang' '13.1.6.13160021'
-- CMAKE_CXX_FLAGS                ''
-- CMAKE_CXX_FLAGS_RELEASE        '-O3 -DNDEBUG -Wall'
-- SQLITECPP_RUN_CPPLINT OFF
-- Could NOT find cppcheck
-- SQLITECPP_RUN_DOXYGEN OFF
-- SQLITECPP_BUILD_EXAMPLES OFF
-- SQLITECPP_BUILD_TESTS OFF
-- Tins library found in /usr/local/lib/libtins.dylib
-- Found PythonLibs: /usr/local/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib (found suitable version "3.9.13", minimum required is "3.0") 
-- Python includes found in: /usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9
-- Python libs found in: /usr/local/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/[email protected]/desktop/ID2T/code_boost/src/build
[ 11%] Building CXX object SQLiteCpp/CMakeFiles/SQLiteCpp.dir/src/Backup.cpp.o
[ 11%] Building CXX object SQLiteCpp/CMakeFiles/SQLiteCpp.dir/src/Column.cpp.o
[ 16%] Building C object SQLiteCpp/sqlite3/CMakeFiles/sqlite3.dir/sqlite3.c.o
[ 33%] Building CXX object CMakeFiles/cpputils.dir/cxx/utilities.cpp.o
[ 33%] Building CXX object SQLiteCpp/CMakeFiles/SQLiteCpp.dir/src/Database.cpp.o
[ 33%] Building CXX object SQLiteCpp/CMakeFiles/SQLiteCpp.dir/src/Exception.cpp.o
[ 38%] Building CXX object SQLiteCpp/CMakeFiles/SQLiteCpp.dir/src/Statement.cpp.o
[ 44%] Building CXX object CMakeFiles/botnetcomm.dir/cxx/botnet_comm_processor.cpp.o
[ 50%] Building CXX object SQLiteCpp/CMakeFiles/SQLiteCpp.dir/src/Transaction.cpp.o
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/botnet_comm_processor.cpp:1:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/botnet_comm_processor.h:10:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
[ 55%] Linking CXX static library libSQLiteCpp.a
[ 55%] Built target SQLiteCpp
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/utilities.cpp:2:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/botnet_comm_processor.cpp:1:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/botnet_comm_processor.h:10:
/Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:1060:9: warning: expression result unused [-Wunused-value]
        PYBIND11_EXPAND_SIDE_EFFECTS(add_base<options>(record));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/common.h:651:47: note: expanded from macro 'PYBIND11_EXPAND_SIDE_EFFECTS'
#define PYBIND11_EXPAND_SIDE_EFFECTS(PATTERN) pybind11::detail::expand_side_effects{ ((PATTERN), void(), false)..., false }
                                              ^                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/[email protected]/desktop/ID2T/code_boost/src/cxx/botnet_comm_processor.cpp:556:5: note: in instantiation of function template specialization 'pybind11::class_<botnet_comm_processor>::class_<>' requested here
    py::class_<botnet_comm_processor>(m, "botnet_comm_processor")
    ^
1 warning generated.
[ 61%] Linking CXX shared library libcpputils.so
[ 61%] Built target cpputils
2 warnings generated.
[ 66%] Linking CXX shared library libbotnetcomm.so
[ 66%] Built target botnetcomm
[ 72%] Linking C static library libsqlite3.a
[ 72%] Built target sqlite3
[ 77%] Building CXX object CMakeFiles/pcapreader.dir/cxx/utilities.cpp.o
[ 94%] Building CXX object CMakeFiles/pcapreader.dir/cxx/statistics_db.cpp.o
[ 94%] Building CXX object CMakeFiles/pcapreader.dir/cxx/pcap_processor.cpp.o
[ 94%] Building CXX object CMakeFiles/pcapreader.dir/cxx/statistics.cpp.o
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/pcap_processor.cpp:1:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/pcap_processor.h:12:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/utilities.cpp:2:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/statistics.cpp:8:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/statistics_db.h:13:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/statistics_db.cpp:1:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/statistics_db.h:13:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
/Users/[email protected]/desktop/ID2T/code_boost/src/cxx/statistics_db.cpp:511:24: warning: relational comparison result unused [-Wunused-comparison]
                    i1 < e.pkts_timestamp.end(), i2 < e.tcp_types.end();
                    ~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/pcap_processor.cpp:1:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/pcap_processor.h:12:
/Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:1060:9: warning: expression result unused [-Wunused-value]
        PYBIND11_EXPAND_SIDE_EFFECTS(add_base<options>(record));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/common.h:651:47: note: expanded from macro 'PYBIND11_EXPAND_SIDE_EFFECTS'
#define PYBIND11_EXPAND_SIDE_EFFECTS(PATTERN) pybind11::detail::expand_side_effects{ ((PATTERN), void(), false)..., false }
                                              ^                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/[email protected]/desktop/ID2T/code_boost/src/cxx/pcap_processor.cpp:490:5: note: in instantiation of function template specialization 'pybind11::class_<pcap_processor>::class_<>' requested here
    py::class_<pcap_processor>(m, "pcap_processor")
    ^
1 warning generated.
2 warnings generated.
1 warning generated.
2 warnings generated.
[100%] Linking CXX shared library libpcapreader.so
[100%] Built target pcapreader


All is set. ID2T is ready.

Run efficiency tests with the command './test_efficiency'
Run unit tests with the command './run_tests'
Run ID2T with the command './id2t'

@pepper-jk
Copy link
Collaborator

pepper-jk commented Jul 14, 2022

Looks like the Dependency installation script gives you an error here:

Detected OS: macOS
Error: No such keg: /usr/local/Cellar/python@2

The error itself is not bad, you don't want or need python2 for ID2T.

However, it appears this error interrupts the install_pkg_darwin function, as it exits the bash script early.

Try removing this line:

brew unlink python@2

Or just checkout this new branch: https://github.com/tklab-tud/ID2T/tree/macOS_workaround

And run ./build.sh --full again, then it should install the brew packages needed by ID2T.

@sarthakgoel1997
Copy link
Author

Thanks for the response. But I am still facing the same issue -

(base) [email protected]@MacBook-Pro-37 id2t % ./build.sh --full
Updating submodules
Detected OS: macOS
Error: No such keg: /usr/local/Cellar/python@2
Packages: Checking...
Packages: Found.
Collecting pip
  Using cached pip-22.1.2-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.2.3
    Uninstalling pip-20.2.3:
      Successfully uninstalled pip-20.2.3
Successfully installed pip-22.1.2
Collecting cairocffi==0.8.1
  Downloading cairocffi-0.8.1.tar.gz (79 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.4/79.4 kB 5.8 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting cffi>=1.12.2
  Downloading cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl (178 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 178.9/178.9 kB 15.1 MB/s eta 0:00:00
Collecting coverage>=4.5.1
  Downloading coverage-6.4.2-cp38-cp38-macosx_10_9_x86_64.whl (184 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 184.3/184.3 kB 29.8 MB/s eta 0:00:00
Collecting cycler>=0.10.0
  Downloading cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting kiwisolver>=1.0.1
  Downloading kiwisolver-1.4.4-cp38-cp38-macosx_10_9_x86_64.whl (65 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.4/65.4 kB 115.0 MB/s eta 0:00:00
Collecting lea==2.3.5
  Downloading lea-2.3.5.tar.gz (64 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.5/64.5 kB 60.4 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting matplotlib>=2.2.3
  Downloading matplotlib-3.5.2-cp38-cp38-macosx_10_9_x86_64.whl (7.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.3/7.3 MB 5.6 MB/s eta 0:00:00
Collecting memory-profiler>=0.54.0
  Downloading memory_profiler-0.60.0.tar.gz (38 kB)
  Preparing metadata (setup.py) ... done
Collecting numpy>=1.15
  Downloading numpy-1.23.1-cp38-cp38-macosx_10_9_x86_64.whl (18.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.1/18.1 MB 6.2 MB/s eta 0:00:00
Collecting psutil>=5.4.5
  Downloading psutil-5.9.1-cp38-cp38-macosx_10_9_x86_64.whl (239 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 239.2/239.2 kB 3.7 MB/s eta 0:00:00
Collecting pycparser>=2.18
  Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 kB 4.0 MB/s eta 0:00:00
Collecting pyparsing>=2.2.0
  Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.3/98.3 kB 4.2 MB/s eta 0:00:00
Collecting python-dateutil>=2.7.2
  Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 kB 4.4 MB/s eta 0:00:00
Collecting pytz>=2018.4
  Downloading pytz-2022.1-py2.py3-none-any.whl (503 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 503.5/503.5 kB 5.1 MB/s eta 0:00:00
Collecting pyxdg>=0.26
  Downloading pyxdg-0.28-py2.py3-none-any.whl (49 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.5/49.5 kB 9.0 MB/s eta 0:00:00
Collecting scapy==2.4.2
  Downloading scapy-2.4.2.tar.gz (795 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 795.5/795.5 kB 6.1 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting scipy>=1.1.0
  Downloading scipy-1.8.1-cp38-cp38-macosx_12_0_universal2.macosx_10_9_x86_64.whl (55.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.3/55.3 MB 5.7 MB/s eta 0:00:00
Collecting six>=1.11.0
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting pillow>=6.2.0
  Downloading Pillow-9.2.0-cp38-cp38-macosx_10_10_x86_64.whl (3.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.1/3.1 MB 6.2 MB/s eta 0:00:00
Collecting packaging>=20.0
  Downloading packaging-21.3-py3-none-any.whl (40 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.8/40.8 kB 58.5 MB/s eta 0:00:00
Collecting fonttools>=4.22.0
  Downloading fonttools-4.34.4-py3-none-any.whl (944 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 944.1/944.1 kB 8.5 MB/s eta 0:00:00
Using legacy 'setup.py install' for cairocffi, since package 'wheel' is not installed.
Using legacy 'setup.py install' for lea, since package 'wheel' is not installed.
Using legacy 'setup.py install' for scapy, since package 'wheel' is not installed.
Using legacy 'setup.py install' for memory-profiler, since package 'wheel' is not installed.
Installing collected packages: scapy, pyxdg, pytz, lea, six, pyparsing, pycparser, psutil, pillow, numpy, kiwisolver, fonttools, cycler, coverage, scipy, python-dateutil, packaging, memory-profiler, cffi, matplotlib, cairocffi
  Running setup.py install for scapy ... done
  Running setup.py install for lea ... done
  Running setup.py install for memory-profiler ... done
  Running setup.py install for cairocffi ... done
Successfully installed cairocffi-0.8.1 cffi-1.15.1 coverage-6.4.2 cycler-0.11.0 fonttools-4.34.4 kiwisolver-1.4.4 lea-2.3.5 matplotlib-3.5.2 memory-profiler-0.60.0 numpy-1.23.1 packaging-21.3 pillow-9.2.0 psutil-5.9.1 pycparser-2.21 pyparsing-3.0.9 python-dateutil-2.8.2 pytz-2022.1 pyxdg-0.28 scapy-2.4.2 scipy-1.8.1 six-1.16.0
-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Running Release configuration.
-- CMake version: 3.23.2
-- CMAKE_CXX_COMPILER '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++' 'Clang' '13.1.6.13160021'
-- CMAKE_CXX_FLAGS                ''
-- CMAKE_CXX_FLAGS_RELEASE        '-O3 -DNDEBUG -Wall'
-- SQLITECPP_RUN_CPPLINT OFF
-- Could NOT find cppcheck
-- SQLITECPP_RUN_DOXYGEN OFF
-- SQLITECPP_BUILD_EXAMPLES OFF
-- SQLITECPP_BUILD_TESTS OFF
-- Tins library found in /usr/local/lib/libtins.dylib
-- Found PythonLibs: /usr/local/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib (found suitable version "3.9.13", minimum required is "3.0") 
-- Python includes found in: /usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9
-- Python libs found in: /usr/local/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/[email protected]/desktop/ID2T/code_boost/src/build
[ 11%] Building CXX object SQLiteCpp/CMakeFiles/SQLiteCpp.dir/src/Backup.cpp.o
[ 11%] Building C object SQLiteCpp/sqlite3/CMakeFiles/sqlite3.dir/sqlite3.c.o
[ 16%] Building CXX object CMakeFiles/cpputils.dir/cxx/utilities.cpp.o
[ 22%] Building CXX object SQLiteCpp/CMakeFiles/SQLiteCpp.dir/src/Column.cpp.o
[ 27%] Building CXX object SQLiteCpp/CMakeFiles/SQLiteCpp.dir/src/Database.cpp.o
[ 33%] Building CXX object CMakeFiles/botnetcomm.dir/cxx/botnet_comm_processor.cpp.o
[ 38%] Building CXX object SQLiteCpp/CMakeFiles/SQLiteCpp.dir/src/Exception.cpp.o
[ 44%] Building CXX object SQLiteCpp/CMakeFiles/SQLiteCpp.dir/src/Statement.cpp.o
[ 50%] Building CXX object SQLiteCpp/CMakeFiles/SQLiteCpp.dir/src/Transaction.cpp.o
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/botnet_comm_processor.cpp:1:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/botnet_comm_processor.h:10:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
[ 55%] Linking CXX static library libSQLiteCpp.a
[ 55%] Built target SQLiteCpp
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/utilities.cpp:2:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/botnet_comm_processor.cpp:1:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/botnet_comm_processor.h:10:
/Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:1060:9: warning: expression result unused [-Wunused-value]
        PYBIND11_EXPAND_SIDE_EFFECTS(add_base<options>(record));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/common.h:651:47: note: expanded from macro 'PYBIND11_EXPAND_SIDE_EFFECTS'
#define PYBIND11_EXPAND_SIDE_EFFECTS(PATTERN) pybind11::detail::expand_side_effects{ ((PATTERN), void(), false)..., false }
                                              ^                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/[email protected]/desktop/ID2T/code_boost/src/cxx/botnet_comm_processor.cpp:556:5: note: in instantiation of function template specialization 'pybind11::class_<botnet_comm_processor>::class_<>' requested here
    py::class_<botnet_comm_processor>(m, "botnet_comm_processor")
    ^
1 warning generated.
[ 61%] Linking CXX shared library libcpputils.so
[ 61%] Built target cpputils
2 warnings generated.
[ 66%] Linking CXX shared library libbotnetcomm.so
[ 66%] Built target botnetcomm
[ 72%] Linking C static library libsqlite3.a
[ 72%] Built target sqlite3
[ 77%] Building CXX object CMakeFiles/pcapreader.dir/cxx/pcap_processor.cpp.o
[ 83%] Building CXX object CMakeFiles/pcapreader.dir/cxx/statistics.cpp.o
[ 88%] Building CXX object CMakeFiles/pcapreader.dir/cxx/utilities.cpp.o
[ 94%] Building CXX object CMakeFiles/pcapreader.dir/cxx/statistics_db.cpp.o
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/pcap_processor.cpp:1:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/pcap_processor.h:12:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/utilities.cpp:2:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/statistics.cpp:8:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/statistics_db.h:13:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/statistics_db.cpp:1:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/statistics_db.h:13:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
/Users/[email protected]/desktop/ID2T/code_boost/src/cxx/statistics_db.cpp:511:24: warning: relational comparison result unused [-Wunused-comparison]
                    i1 < e.pkts_timestamp.end(), i2 < e.tcp_types.end();
                    ~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/pcap_processor.cpp:1:
In file included from /Users/[email protected]/desktop/ID2T/code_boost/src/cxx/pcap_processor.h:12:
/Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:1060:9: warning: expression result unused [-Wunused-value]
        PYBIND11_EXPAND_SIDE_EFFECTS(add_base<options>(record));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/[email protected]/desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/common.h:651:47: note: expanded from macro 'PYBIND11_EXPAND_SIDE_EFFECTS'
#define PYBIND11_EXPAND_SIDE_EFFECTS(PATTERN) pybind11::detail::expand_side_effects{ ((PATTERN), void(), false)..., false }
                                              ^                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/[email protected]/desktop/ID2T/code_boost/src/cxx/pcap_processor.cpp:490:5: note: in instantiation of function template specialization 'pybind11::class_<pcap_processor>::class_<>' requested here
    py::class_<pcap_processor>(m, "pcap_processor")
    ^
1 warning generated.
2 warnings generated.
1 warning generated.
2 warnings generated.
[100%] Linking CXX shared library libpcapreader.so
[100%] Built target pcapreader


All is set. ID2T is ready.

Run efficiency tests with the command './test_efficiency'
Run unit tests with the command './run_tests'
Run ID2T with the command './id2t'
(base) [email protected]@MacBook-Pro-37 id2t % ./id2t
zsh: segmentation fault  ./id2t
(base) [email protected]@MacBook-Pro-37 id2t % ./id2t -i /home/user/pcap_capture.pcap -a PortscanAttack ip.src=192.168.178.2 mac.src=32:08:24:DC:8D:27 inject.at-timestamp=1476301843
zsh: segmentation fault  ./id2t -i /home/user/pcap_capture.pcap -a PortscanAttack ip.src=192.168.178.2
(base) [email protected]@MacBook-Pro-37 id2t % ./id2t -i /Users/[email protected]/Downloads/27.pcap -a PortscanAttack ip.src=192.168.178.2 mac.src=32:08:24:DC:8D:27 inject.at-timestamp=1476301843
zsh: segmentation fault  ./id2t -i /Users/[email protected]/Downloads/27.pcap -a PortscanAttack 
(base) [email protected]@MacBook-Pro-37 id2t % 

@pepper-jk
Copy link
Collaborator

Even when you remove the line completely? (Maybe my workaround was not enough.)

@sarthakgoel1997
Copy link
Author

Yes correct. Tried doing it both ways. I thought the segmentation issue might be because it is not able to find a pcap file on the mentioned path. But, downloading a file and using it also didn't work.

@sarthakgoel1997
Copy link
Author

sarthakgoel1997 commented Jul 21, 2022

@pepper-jk Please help here. I tried using id2t in a Windows PC as well. It also gave an error - OS not supported

@pepper-jk
Copy link
Collaborator

pepper-jk commented Jul 21, 2022

ID2T only supports Linux and macOS. Maybe try the windows subsystem for linux (WSL) with Ubuntu.

@pepper-jk
Copy link
Collaborator

pepper-jk commented Jul 21, 2022

Yes correct. Tried doing it both ways. I thought the segmentation issue might be because it is not able to find a pcap file on the mentioned path. But, downloading a file and using it also didn't work.

That is strange. Try installing the dependencies manually:

brew install cmake python coreutils libdnet libtins sqlite cairo
brew upgrade cmake python coreutils libdnet libtins sqlite cairo

Sadly, I can not reproduce the segmentation fault on my end. Also I don't have a macOS VM right now. I might be able to set one up next week though - this week is pretty full.

@thrimbor @UndeadKernel Do you guys have another guess?

@sarthakgoel1997
Copy link
Author

@pepper-jk Tried this way as well. Still stuck :(
Please let me know if you find anything. Thanks!

@thrimbor
Copy link
Contributor

I tried ID2T on macOS 11.6.1, and I cannot reproduce this error. Is your input file valid? Can you run the tests?

@sarthakgoel1997
Copy link
Author

@thrimbor Running tests gives the same error -

(base) [email protected]@MacBook-Pro-37 ID2T % ./run_tests
./run_tests: line 12:  5732 Segmentation fault: 11  ./id2t -i resources/test/reference_1998.pcap -rd > /dev/null
./run_tests: line 22:  5836 Segmentation fault: 11  PYTHONWARNINGS="ignore" python3 -m coverage run --source=. -m unittest $testpath > /dev/null
(base) [email protected]@MacBook-Pro-37 ID2T % 

Can you please share the input file you are using. Will try with that as well

@pepper-jk
Copy link
Collaborator

pepper-jk commented Aug 3, 2022

The input pcap files used in the tests should not produce segmentation faults!
So providing another valid pcap would not solve the issue.¹
If you are still getting the segmentation fault during the tests, I'm very sure it is a problem with your system or environment.

You can try the --debug argument during ./build.sh. Maybe with this we get some more info then just segmentation fault on runtime.

You should also provide the following:

  • macOS verison
  • brew version
  • python version
  • libtins version installed by brew

Maybe this helps us understand or even reproduce it. (Best to have the most current macOS and brew!)

¹ However, you can try a MAWI pcap from here: http://www.fukuda-lab.org/mawilab/
Those should be valid as well. They have a ridiculous size though. If you can just take a sample from them.

@sarthakgoel1997
Copy link
Author

@pepper-jk Adding the response of ./build.sh with --debug command. It seems fine to me. Please have a look -

(base) [email protected]@MacBook-Pro-37 ID2T % ./build.sh --debug
Updating submodules
Detected OS: macOS
Error: No such keg: /usr/local/Cellar/python@2
Packages: Checking...
Packages: Found.
Requirement already satisfied: pip in ./.venv/lib/python3.8/site-packages (22.2.2)
Requirement already satisfied: cairocffi==0.8.1 in ./.venv/lib/python3.8/site-packages (from -r resources/requirements.txt (line 1)) (0.8.1)
Requirement already satisfied: cffi>=1.12.2 in ./.venv/lib/python3.8/site-packages (from -r resources/requirements.txt (line 2)) (1.15.1)
Requirement already satisfied: coverage>=4.5.1 in ./.venv/lib/python3.8/site-packages (from -r resources/requirements.txt (line 3)) (6.4.2)
Requirement already satisfied: cycler>=0.10.0 in ./.venv/lib/python3.8/site-packages (from -r resources/requirements.txt (line 4)) (0.11.0)
Requirement already satisfied: kiwisolver>=1.0.1 in ./.venv/lib/python3.8/site-packages (from -r resources/requirements.txt (line 5)) (1.4.4)
Requirement already satisfied: lea==2.3.5 in ./.venv/lib/python3.8/site-packages (from -r resources/requirements.txt (line 6)) (2.3.5)
Requirement already satisfied: matplotlib>=2.2.3 in ./.venv/lib/python3.8/site-packages (from -r resources/requirements.txt (line 7)) (3.5.2)
Requirement already satisfied: memory-profiler>=0.54.0 in ./.venv/lib/python3.8/site-packages (from -r resources/requirements.txt (line 8)) (0.60.0)
Requirement already satisfied: numpy>=1.15 in ./.venv/lib/python3.8/site-packages (from -r resources/requirements.txt (line 9)) (1.23.1)
Requirement already satisfied: psutil>=5.4.5 in ./.venv/lib/python3.8/site-packages (from -r resources/requirements.txt (line 10)) (5.9.1)
Requirement already satisfied: pycparser>=2.18 in ./.venv/lib/python3.8/site-packages (from -r resources/requirements.txt (line 11)) (2.21)
Requirement already satisfied: pyparsing>=2.2.0 in ./.venv/lib/python3.8/site-packages (from -r resources/requirements.txt (line 12)) (3.0.9)
Requirement already satisfied: python-dateutil>=2.7.2 in ./.venv/lib/python3.8/site-packages (from -r resources/requirements.txt (line 13)) (2.8.2)
Requirement already satisfied: pytz>=2018.4 in ./.venv/lib/python3.8/site-packages (from -r resources/requirements.txt (line 14)) (2022.1)
Requirement already satisfied: pyxdg>=0.26 in ./.venv/lib/python3.8/site-packages (from -r resources/requirements.txt (line 15)) (0.28)
Requirement already satisfied: scapy==2.4.2 in ./.venv/lib/python3.8/site-packages (from -r resources/requirements.txt (line 16)) (2.4.2)
Requirement already satisfied: scipy>=1.1.0 in ./.venv/lib/python3.8/site-packages (from -r resources/requirements.txt (line 17)) (1.8.1)
Requirement already satisfied: six>=1.11.0 in ./.venv/lib/python3.8/site-packages (from -r resources/requirements.txt (line 18)) (1.16.0)
Requirement already satisfied: packaging>=20.0 in ./.venv/lib/python3.8/site-packages (from matplotlib>=2.2.3->-r resources/requirements.txt (line 7)) (21.3)
Requirement already satisfied: fonttools>=4.22.0 in ./.venv/lib/python3.8/site-packages (from matplotlib>=2.2.3->-r resources/requirements.txt (line 7)) (4.34.4)
Requirement already satisfied: pillow>=6.2.0 in ./.venv/lib/python3.8/site-packages (from matplotlib>=2.2.3->-r resources/requirements.txt (line 7)) (9.2.0)
-- Running Debug configuration.
-- CMake version: 3.23.2
-- CMAKE_CXX_COMPILER '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++' 'Clang' '13.1.6.13160021'
-- CMAKE_CXX_FLAGS                ''
-- CMAKE_CXX_FLAGS_DEBUG          '-g -Wall'
-- SQLITECPP_RUN_CPPLINT OFF
-- Could NOT find cppcheck
-- SQLITECPP_RUN_DOXYGEN OFF
-- SQLITECPP_BUILD_EXAMPLES OFF
-- SQLITECPP_BUILD_TESTS OFF
-- Tins library found in /usr/local/lib/libtins.dylib
-- Python includes found in: /usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9
-- Python libs found in: /usr/local/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/[email protected]/Desktop/ID2T/code_boost/src/build
Consolidate compiler generated dependencies of target sqlite3
Consolidate compiler generated dependencies of target cpputils
Consolidate compiler generated dependencies of target SQLiteCpp
Consolidate compiler generated dependencies of target botnetcomm
[  4%] Building CXX object SQLiteCpp/CMakeFiles/SQLiteCpp.dir/src/Backup.cpp.o
[  8%] Building C object SQLiteCpp/sqlite3/CMakeFiles/sqlite3.dir/sqlite3.c.o
[ 12%] Building CXX object CMakeFiles/botnetcomm.dir/cxx/botnet_comm_processor.cpp.o
[ 16%] Building CXX object CMakeFiles/cpputils.dir/cxx/utilities.cpp.o
[ 20%] Building CXX object SQLiteCpp/CMakeFiles/SQLiteCpp.dir/src/Column.cpp.o
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/botnet_comm_processor.cpp:1:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/botnet_comm_processor.h:10:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
[ 25%] Building CXX object SQLiteCpp/CMakeFiles/SQLiteCpp.dir/src/Database.cpp.o
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/utilities.cpp:2:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
[ 29%] Building CXX object SQLiteCpp/CMakeFiles/SQLiteCpp.dir/src/Exception.cpp.o
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/botnet_comm_processor.cpp:1:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/botnet_comm_processor.h:10:
/Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:1060:9: warning: expression result unused [-Wunused-value]
        PYBIND11_EXPAND_SIDE_EFFECTS(add_base<options>(record));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/common.h:651:47: note: expanded from macro 'PYBIND11_EXPAND_SIDE_EFFECTS'
#define PYBIND11_EXPAND_SIDE_EFFECTS(PATTERN) pybind11::detail::expand_side_effects{ ((PATTERN), void(), false)..., false }
                                              ^                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/botnet_comm_processor.cpp:556:5: note: in instantiation of function template specialization 'pybind11::class_<botnet_comm_processor>::class_<>' requested here
    py::class_<botnet_comm_processor>(m, "botnet_comm_processor")
    ^
[ 33%] Building CXX object SQLiteCpp/CMakeFiles/SQLiteCpp.dir/src/Statement.cpp.o
[ 37%] Linking C static library libsqlite3.a
[ 37%] Built target sqlite3
[ 41%] Building CXX object SQLiteCpp/CMakeFiles/SQLiteCpp.dir/src/Transaction.cpp.o
[ 45%] Linking CXX static library libSQLiteCpp.a
1 warning generated.
[ 50%] Linking CXX shared library libcpputils.so
[ 50%] Built target SQLiteCpp
Consolidate compiler generated dependencies of target pcapreader
[ 54%] Building CXX object CMakeFiles/pcapreader.dir/cxx/pcap_processor.cpp.o
[ 58%] Building CXX object CMakeFiles/pcapreader.dir/cxx/statistics.cpp.o
[ 58%] Built target cpputils
[ 62%] Building CXX object CMakeFiles/pcapreader.dir/cxx/statistics_db.cpp.o
2 warnings generated.
[ 66%] Linking CXX shared library libbotnetcomm.so
[ 66%] Built target botnetcomm
[ 70%] Building CXX object CMakeFiles/pcapreader.dir/cxx/utilities.cpp.o
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/pcap_processor.cpp:1:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/pcap_processor.h:12:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/statistics.cpp:8:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/statistics_db.h:13:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/statistics_db.cpp:1:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/statistics_db.h:13:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/utilities.cpp:2:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
/Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/statistics_db.cpp:511:24: warning: relational comparison result unused [-Wunused-comparison]
                    i1 < e.pkts_timestamp.end(), i2 < e.tcp_types.end();
                    ~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/pcap_processor.cpp:1:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/pcap_processor.h:12:
/Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:1060:9: warning: expression result unused [-Wunused-value]
        PYBIND11_EXPAND_SIDE_EFFECTS(add_base<options>(record));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/common.h:651:47: note: expanded from macro 'PYBIND11_EXPAND_SIDE_EFFECTS'
#define PYBIND11_EXPAND_SIDE_EFFECTS(PATTERN) pybind11::detail::expand_side_effects{ ((PATTERN), void(), false)..., false }
                                              ^                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/pcap_processor.cpp:490:5: note: in instantiation of function template specialization 'pybind11::class_<pcap_processor>::class_<>' requested here
    py::class_<pcap_processor>(m, "pcap_processor")
    ^
1 warning generated.
2 warnings generated.
2 warnings generated.
1 warning generated.
[ 75%] Linking CXX shared library libpcapreader.so
[ 75%] Built target pcapreader
[ 79%] Building CXX object CMakeFiles/main.dir/cxx/main.cpp.o
[ 83%] Building CXX object CMakeFiles/main.dir/cxx/pcap_processor.cpp.o
[ 87%] Building CXX object CMakeFiles/main.dir/cxx/statistics.cpp.o
[ 91%] Building CXX object CMakeFiles/main.dir/cxx/statistics_db.cpp.o
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/main.cpp:1:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/pcap_processor.h:12:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/pcap_processor.cpp:1:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/pcap_processor.h:12:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/statistics_db.cpp:1:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/statistics_db.h:13:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/statistics.cpp:8:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/statistics_db.h:13:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
/Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/statistics_db.cpp:511:24: warning: relational comparison result unused [-Wunused-comparison]
                    i1 < e.pkts_timestamp.end(), i2 < e.tcp_types.end();
                    ~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/pcap_processor.cpp:1:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/pcap_processor.h:12:
/Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:1060:9: warning: expression result unused [-Wunused-value]
        PYBIND11_EXPAND_SIDE_EFFECTS(add_base<options>(record));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/common.h:651:47: note: expanded from macro 'PYBIND11_EXPAND_SIDE_EFFECTS'
#define PYBIND11_EXPAND_SIDE_EFFECTS(PATTERN) pybind11::detail::expand_side_effects{ ((PATTERN), void(), false)..., false }
                                              ^                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/pcap_processor.cpp:490:5: note: in instantiation of function template specialization 'pybind11::class_<pcap_processor>::class_<>' requested here
    py::class_<pcap_processor>(m, "pcap_processor")
    ^
1 warning generated.
[ 95%] Building CXX object CMakeFiles/main.dir/cxx/utilities.cpp.o
2 warnings generated.
2 warnings generated.
1 warning generated.
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/cxx/utilities.cpp:2:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/attr.h:13:
In file included from /Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/cast.h:16:
/Users/[email protected]/Desktop/ID2T/code_boost/src/pybind11/include/pybind11/detail/internals.h:194:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/usr/local/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
1 warning generated.
[100%] Linking CXX executable main
[100%] Built target main


All is set. ID2T is ready.

Run efficiency tests with the command './test_efficiency'
Run unit tests with the command './run_tests'
Run ID2T with the command './id2t'

Also adding the versions as you mentioned. Please check -

(base) [email protected]@MacBook-Pro-37 ID2T % brew --version
Homebrew 3.5.6
Homebrew/homebrew-core (git revision 009617c2b65; last commit 2022-07-21)
Homebrew/homebrew-cask (git revision 19fcfaa54f; last commit 2022-07-21)
(base) [email protected]@MacBook-Pro-37 ID2T % python --version
Python 3.8.8
(base) [email protected]@MacBook-Pro-37 ID2T % libtins --version
zsh: command not found: libtins
(base) [email protected]@MacBook-Pro-37 ID2T % brew install libtins
Running `brew update --auto-update`...
==> Auto-updated Homebrew!
Updated 3 taps (hashicorp/tap, homebrew/core and homebrew/cask).
==> New Formulae
berkeley-db@5                  enex2notion                    ksh93                          pkcs11-tools                   tere
c2rust                         felinks                        libeatmydata                   prql-compiler                  tlsx
cargo-depgraph                 gaze                           mesheryctl                     prr                            tuntox
chain-bench                    git-delete-merged-branches     onlykey-agent                  pymupdf                        x86_64-linux-gnu-binutils
cpp-httplib                    gum                            open62541                      sgr
create-api                     hyx                            page                           smap
dura                           jupp                           pint                           snapcast
==> New Casks
duckduckgo                     livebook                       qwerty-fr                      shop-different                 workman
iqmol                          polypad                        reverso                        v2ray-unofficial

You have 24 outdated formulae installed.
You can upgrade them with brew upgrade
or list them with brew outdated.

Warning: libtins 4.4 is already installed and up-to-date.
To reinstall 4.4, run:
  brew reinstall libtins

image

@pepper-jk
Copy link
Collaborator

Please execute the tests again, and try to run id2t again. Now that you have the debug build.

@sarthakgoel1997
Copy link
Author

It is still showing segmentation fault only -

(base) [email protected]@MacBook-Pro-37 ID2T % ./run_tests
./run_tests: line 12: 52843 Segmentation fault: 11  ./id2t -i resources/test/reference_1998.pcap -rd > /dev/null
./run_tests: line 22: 52846 Segmentation fault: 11  PYTHONWARNINGS="ignore" python3 -m coverage run --source=. -m unittest $testpath > /dev/null
(base) [email protected]@MacBook-Pro-37 ID2T % ./id2t
zsh: segmentation fault  ./id2t
(base) [email protected]@MacBook-Pro-37 ID2T % 

@pepper-jk
Copy link
Collaborator

pepper-jk commented Aug 6, 2022

I'm setting up a macOS Monterey VM right now. Maybe I can reproduce the segfault there.

Can't make any promises to whent I get around to try it though.

But when I do, I will document my setup process for ID2T thoroughly, so that you can follow it, if I can not reproduce the segfault.

@sarthakgoel1997
Copy link
Author

Definitely @pepper-jk. Thanks a lot for your time and effort man!
If it is okay, we can also get on a call to resolve this issue.

@pepper-jk
Copy link
Collaborator

Probably not getting around to it this week. Sorry.

I will let you know when I've tried though. Hopefully next week.

Sure, we can have a call. However, I'd suggest after I tried to reproduce the seg fault on macOS.

@sarthakgoel1997
Copy link
Author

Sure @pepper-jk. No problem

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

3 participants