libnetconf2 icon indicating copy to clipboard operation
libnetconf2 copied to clipboard

iter->schema value null

Open rohitkathuria102 opened this issue 4 years ago • 3 comments

while connecting to the callhome,the controller is failing(segmentation fault)--core dumped, running in gdb i'm getting this trace back::

0x00007ffff532faa8 in build_schema_info_yl (session=0x7fffc801c890, result=0x7ffff33da6f0) at /root/rohit3/libnetconf2/src/session_client.c:740 740 if (iter->schema->module != mod) { Missing separate debuginfos, use: debuginfo-install glibc-2.17-323.el7_9.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.15.1-50.el7.x86_64 libcom_err-1.42.9-19.el7.x86_64 libselinux-2.5-15.el7.x86_64 lksctp-tools-1.0.17-2.el7.x86_64 nss-softokn-freebl-3.53.1-6.el7_9.x86_64 openssl-libs-1.0.2k-21.el7_9.x86_64 pcre-8.32-17.el7.x86_64 zlib-1.2.7-19.el7_9.x86_64 (gdb) bt #0 0x00007ffff532faa8 in build_schema_info_yl (session=0x7fffc801c890, result=0x7ffff33da6f0) at /root/rohit3/libnetconf2/src/session_client.c:740 #1 0x00007ffff5330e4b in nc_ctx_check_and_fill (session=0x7fffc801c890) at /root/rohit3/libnetconf2/src/session_client.c:1058

please respond as soon as possible.

rohitkathuria102 avatar Jun 08 '21 10:06 rohitkathuria102

It is definitely a bug but should be trivial to fix. What I would be more interested in is if you could provide some details and best print the data that are being read, you can do that in gdb with p lyd_print_file(stdout, iter, LYD_XML, 0). Also, what ietf-yang-library module revision are you using? Both on client and the server.

michalvasko avatar Jun 08 '21 10:06 michalvasko

Hi michalvasko,

gdb o/p:::::::::

(gdb) p iter->schema->module
Cannot access memory at address 0x8
(gdb) p iter->schema
$1 = (const struct lysc_node *) 0x0
(gdb) p iter
$2 = (struct lyd_node *) 0x7fffb008c520
(gdb) p mod
$3 = (struct lys_module *) 0x7fffb0056600
(gdb) p lyd_print_file(stdout, iter, LYD_XML, 0)
<namespace xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library">urn:ietf:params:xml:ns:yang:ietf-yang-metadata</namespace>
$4 = LY_SUCCESS
(gdb)

about the ietf-yang-library version:::::::::: 2019-01-04 taken from the branch itself.

rohitkathuria102 avatar Jun 08 '21 11:06 rohitkathuria102

Okay, so the crash should be fixed but I am still not sure there is not another underlying problem. Please update all the projects on the latest devel and continue using it, let me know if you encounter some other problems.

michalvasko avatar Jun 09 '21 12:06 michalvasko