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

SEG FAULT when executing a 'get' request #1215

Closed
igortern opened this issue Sep 29, 2020 · 3 comments
Closed

SEG FAULT when executing a 'get' request #1215

igortern opened this issue Sep 29, 2020 · 3 comments

Comments

@igortern
Copy link
Contributor

igortern commented Sep 29, 2020

Hi,

I encountered the following issue:

  • netopeer2, libnetconf, sysrepo, libyang from devel, snapshot taken on Sep 29
  • sysrepo repository is attached
  • the following get request caused crash

Regards,
Igor

sysrepo.tar.gz

[INF]: LN: Session 1: received message:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
<get>
<filter>
<manageEvent:netconf xmlns:manageEvent="urn:ietf:params:xml:ns:netmod:notification"/>
</filter>
</get>
</rpc>


[INF]: LY: Resolving unresolved data nodes and their constraints...
[INF]: LY: All data nodes and constraints resolved.
[INF]: LY: Resolving unresolved data nodes and their constraints...
[INF]: LY: All data nodes and constraints resolved.
[INF]: SR: Successful processing of "operational" event with ID 1.
[INF]: SR: Event "operational" with ID 1 succeeded.
[INF]: SR: Published event "operational" "/ietf-interfaces:interfaces-state/interface" with ID 1.
[INF]: SR: Event "operational" with ID 1 succeeded.
[INF]: SR: Published event "operational" "/ietf-hardware:hardware-state/component" with ID 1.
[INF]: SR: Published event "operational" "/ietf-netconf-acm:nacm/denied-operations" with ID 2.
[INF]: SR: Processing "ietf-netconf-acm" "operational" event with ID 2.
[INF]: SR: Successful processing of "operational" event with ID 2.
[INF]: SR: Event "operational" with ID 1 succeeded.
[INF]: SR: Event "operational" with ID 2 succeeded.
[INF]: SR: Published event "operational" "/ietf-netconf-acm:nacm/denied-data-writes" with ID 2.
[INF]: SR: Processing "ietf-netconf-acm" "operational" event with ID 2.
[INF]: SR: Successful processing of "operational" event with ID 2.
[INF]: SR: Event "operational" with ID 2 succeeded.
[INF]: SR: Published event "operational" "/ietf-netconf-acm:nacm/denied-notifications" with ID 2.
[INF]: SR: Processing "ietf-netconf-acm" "operational" event with ID 2.
[INF]: SR: Successful processing of "operational" event with ID 2.
[INF]: SR: Event "operational" with ID 2 succeeded.
[INF]: SR: Published event "operational" "/ietf-netconf-monitoring:netconf-state" with ID 2.
[INF]: SR: Processing "ietf-netconf-monitoring" "operational" event with ID 2.
[INF]: SR: Successful processing of "operational" event with ID 2.
[INF]: SR: Event "operational" with ID 2 succeeded.

Thread 7 "netopeer2-serve" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff21b5700 (LWP 18405)]
lys_parent (node=node@entry=0x81ad90) at /home/igort/Perforce/OLT/aspen/main/build/host-sim/third_party/libyang/libyang-devel/src/tree_schema.c:4184
4184 if (parent->nodetype == LYS_AUGMENT) {
(gdb) bt
#0 lys_parent (node=node@entry=0x81ad90)
at /home/igort/Perforce/OLT/aspen/main/build/host-sim/third_party/libyang/libyang-devel/src/tree_schema.c:4184
#1 0x00007ffff743c81d in lyd_new (parent=0x0, module=0x81aea0, name=)
at /home/igort/Perforce/OLT/aspen/main/build/host-sim/third_party/libyang/libyang-devel/src/tree_data.c:1197
#2 0x00007ffff7161d84 in sr_lyd_create_np_cont_r (first=0x7ffff21b4bb8, parent=0x0, ly_mod=0x81ad90, config_f=0x2, diff=0x0)
at /home/igort/Perforce/OLT/aspen/main/build/host-sim/third_party/sysrepo/sysrepo-devel/src/common.c:3425
#3 0x00007ffff71622fd in sr_lyd_dup_module_np_cont (data=0x64cee0, ly_mod=0x81ad90, add_state_np_conts=0x1, new_data=0x7ffff21b4bb8)
at /home/igort/Perforce/OLT/aspen/main/build/host-sim/third_party/sysrepo/sysrepo-devel/src/common.c:3541
#4 0x00007ffff7168439 in sr_module_oper_data_dup_enabled (data=0x64cee0, ext_shm_addr=0x7ffff7fb8000 "8\017", mod=0x7fffdc021448, opts=0x0,
enabled_mod_data=0x7ffff21b4bb8) at /home/igort/Perforce/OLT/aspen/main/build/host-sim/third_party/sysrepo/sysrepo-devel/src/modinfo.c:685
#5 0x00007ffff716a33f in sr_modinfo_module_data_load (mod_info=0x7ffff21b4d70, mod=0x7fffdc021448, sid=0x7ffff21b4ce0, request_xpath=0x0,
timeout_ms=0x1388, opts=0x0, cb_error_info=0x7ffff21b4cb0)
at /home/igort/Perforce/OLT/aspen/main/build/host-sim/third_party/sysrepo/sysrepo-devel/src/modinfo.c:1323
#6 0x00007ffff716ad3b in sr_modinfo_data_load (mod_info=0x7ffff21b4d70, cache=0x4, sid=0x7ffff21b4ce0, request_xpath=0x0, timeout_ms=0x1388,
opts=0x0, cb_error_info=0x7ffff21b4cb0)
at /home/igort/Perforce/OLT/aspen/main/build/host-sim/third_party/sysrepo/sysrepo-devel/src/modinfo.c:1566
#7 0x00007ffff716b026 in sr_modinfo_add_modules (mod_info=0x7ffff21b4d70, mod_set=0x7ffff21b4d60, mod_deps=0x0, mod_lock=SR_LOCK_READ,
mi_opts=0x25, sid=..., request_xpath=0x0, timeout_ms=0x1388, get_opts=0x0)
at /home/igort/Perforce/OLT/aspen/main/build/host-sim/third_party/sysrepo/sysrepo-devel/src/modinfo.c:1649
#8 0x00007ffff715771e in sr_event_notif_send_tree (session=0x640130, notif=0x7fffdc01eec0)
at /home/igort/Perforce/OLT/aspen/main/build/host-sim/third_party/sysrepo/sysrepo-devel/src/sysrepo.c:4660
#9 0x00007ffff71571ad in sr_event_notif_send (session=0x640130, path=0x41a858 "/ietf-netconf-notifications:netconf-session-start",
values=0x7fffdc01ee50, values_cnt=0x3) at /home/igort/Perforce/OLT/aspen/main/build/host-sim/third_party/sysrepo/sysrepo-devel/src/sysrepo.c:4572
#10 0x000000000040afb7 in np2srv_new_session_cb (UNUSED_client_name=0x0, new_session=0x7fffdc000e30)
at /home/igort/Perforce/OLT/aspen/main/build/host-sim/third_party/netopeer2/netopeer2-devel/src/common.c:189
#11 0x00000000004099c9 in worker_thread (arg=0x6487b0)
at /home/igort/Perforce/OLT/aspen/main/build/host-sim/third_party/netopeer2/netopeer2-devel/src/main.c:997
#12 0x00007ffff76c76db in start_thread (arg=0x7ffff21b5700) at pthread_create.c:463
#13 0x00007ffff6e75a3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb)

@igortern
Copy link
Contributor Author

re-posting the NETCONF request that caused the crash
[INF]: LN: Session 1: received message:
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>urn:ietf:params:netconf:base:1.0</capability>
</capabilities>
</hello>

michalvasko added a commit to sysrepo/sysrepo that referenced this issue Sep 29, 2020
@michalvasko
Copy link
Member

Hi,
right, thanks for the exact files to reproduce, I think this is the bug I was not able to track down for some time now. Should be fixed in sysrepo devel now.

@igortern
Copy link
Contributor Author

Great, thanks Michal

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

2 participants