Closed knightjoel closed 6 years ago
Thanks for catching these bugs, you can enabled logging following steps in documentation here.
Please use DEBUG level:
log.setLevel(logging.DEBUG)
And also, the common causes for segfault would be:
To reproduce segfault caused by the first reason, you could modify CMakeList.txt, add customized tests here. And use lldb/gdb for debugging.
debug log attached.
I had a go at running the unit tests but got stuck. The C++ instructions say to "cd ydk-gen/sdk/cpp/ydk" but that directory does not exist.
~/git% ll ydk-gen/sdk/cpp/
total 36
-rw-r--r-- 1 jknight staff 8 2 Sep 10:59 .gitignore
-rw-r--r-- 1 jknight staff 7314 2 Sep 10:59 CHANGES.md
-rw-r--r-- 1 jknight staff 713 2 Sep 10:59 Copyright
-rw-r--r-- 1 jknight staff 11357 2 Sep 10:59 LICENSE
-rw-r--r-- 1 jknight staff 4960 2 Sep 10:59 README.md
drwxr-xr-x 15 jknight staff 510 2 Sep 11:11 core/
drwxr-xr-x 6 jknight staff 204 2 Sep 10:59 install/
drwxr-xr-x 10 jknight staff 340 2 Sep 10:59 packages/
drwxr-xr-x 21 jknight staff 714 2 Sep 10:59 samples/
drwxr-xr-x 31 jknight staff 1054 2 Sep 11:07 tests/
Thanks for the log, but it seems like it is not helpful for this segfault issue, not sure the reason for segfault. The last log entry comes from path/root_data_node.cpp
Sorry, that C++ instructions seems outdated. Sharing my workflow:
# first install bundle you want to debug(xe)
$ cd sdk/cpp/core
$ mkdir build
$ cd build
$ cmake .. && sudo make install # install in libydk in debugging mode
$ cd ../../tests
# edit test files and CMakeLists.txt
$ mkdir build
$ cd build && cmake .. && make
$ lldb ./ydk_bundle_test <new-test-case-name>
Unable to reproduce on ydk 0.7.0
Hi. I'm seeing a segmentation fault in CRUDService.read() if I call this method multiple times in the same script:
The above script seg faults:
However, if I reverse the order of operations and call crud.read() against the IF_MIB first, the script runs fine:
I appologize, but I don't know how or where to start debugging this.
YDK-Py 0.6.0 libydk 0.6.0 Python 2.7.10 macOS 10.11.6
Python modules: ncclient (0.5.3) pip (9.0.1) pybind11 (2.1.1) setuptools (36.3.0) six (1.10.0) wheel (0.29.0) ydk (0.6.0) ydk-models-cisco-ios-xe (16.6.1) ydk-models-cisco-ios-xr (6.2.2) ydk-models-ietf (0.1.3) ydk-models-openconfig (0.1.3)