10-24-2017 10:47 AM
Hi,
I am geting segfault when doing a read query for interfaces using ydk_openconfig 1.4.1. IOS-XRv is 6.1.2 version.
[root@nclinux ydk]# rpm -qa | grep ydk
libydk-0.6.1-1.x86_64
libydk-ietf-0.1.3-1.x86_64
libydk-openconfig-0.1.4-1.x86_64
[root@nclinux ydk]# ./a.out ssh://packet:packet@10.66.4.203:830 -v
[2017-10-24 13:35:24.253] [ydk] [info] Path where models are to be downloaded: /root/.ydk/10.66.4.203:830
[2017-10-24 13:35:24.262] [ydk] [info] Connected to 10.66.4.203 on port 830 using ssh with timeout of -1
[2017-10-24 13:35:24.262] [ydk] [info] Connected to 10.66.4.203 on port 830 using ssh with timeout of -1
[2017-10-24 13:35:24.262] [ydk] [info] Executing CRUD config read operation
[2017-10-24 13:35:24.269] [ydk] [info] =============Generating payload to send to device=============
[2017-10-24 13:35:24.269] [ydk] [info] <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><get-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<source>
<running/>
</source>
<filter><interfaces xmlns="http://openconfig.net/yang/interfaces"/></filter>
</get-config>
</rpc>
[2017-10-24 13:35:24.269] [ydk] [info]
[2017-10-24 13:35:24.554] [ydk] [info] =============Reply payload received from device=============
[2017-10-24 13:35:24.554] [ydk] [info] <?xml version="1.0"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
<data>
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>Loopback0</name>
<config>
<name>Loopback0</name>
<type xmlns:idx="urn:ietf:params:xml:ns:yang:iana-if-type">idx:softwareLoopback</type>
<enabled>true</enabled>
</config>
<subinterfaces>
<subinterface>
<index>0</index>
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip">
<address>
<ip>10.66.4.203</ip>
<config>
<ip>10.66.4.203</ip>
<prefix-length>32</prefix-length>
</config>
</address>
</ipv4>
</subinterface>
</subinterfaces>
</interface>
<interface>
<name>tunnel-ip1</name>
<config>
<name>tunnel-ip1</name>
<type xmlns:idx="urn:ietf:params:xml:ns:yang:iana-if-type">idx:tunnel</type>
<enabled>true</enabled>
</config>
<subinterfaces>
<subinterface>
<index>0</index>
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip">
<address>
<ip>10.203.27.1</ip>
<config>
<ip>10.203.27.1</ip>
<prefix-length>30</prefix-length>
</config>
</address>
</ipv4>
</subinterface>
</subinterfaces>
</interface>
<interface>
<name>MgmtEth0/0/CPU0/0</name>
<config>
<name>MgmtEth0/0/CPU0/0</name>
<type xmlns:idx="urn:ietf:params:xml:ns:yang:iana-if-type">idx:ethernetCsmacd</type>
<enabled>true</enabled>
</config>
<ethernet xmlns="http://openconfig.net/yang/interfaces/ethernet">
<config>
<auto-negotiate>false</auto-negotiate>
</config>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip">
<address>
<ip>10.64.21.203</ip>
<config>
<ip>10.64.21.203</ip>
<prefix-length>24</prefix-length>
</config>
</address>
</ipv4>
</subinterface>
</subinterfaces>
</interface>
<interface>
<name>GigabitEthernet0/0/0/0</name>
<config>
<name>GigabitEthernet0/0/0/0</name>
<type xmlns:idx="urn:ietf:params:xml:ns:yang:iana-if-type">idx:ethernetCsmacd</type>
<enabled>true</enabled>
</config>
<ethernet xmlns="http://openconfig.net/yang/interfaces/ethernet">
<config>
<auto-negotiate>false</auto-negotiate>
</config>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip">
<address>
<ip>10.1.10.203</ip>
<config>
<ip>10.1.10.203</ip>
<prefix-length>24</prefix-length>
</config>
</address>
</ipv4>
</subinterface>
</subinterfaces>
</interface>
<interface>
<name>GigabitEthernet0/0/0/1</name>
<config>
<name>GigabitEthernet0/0/0/1</name>
<type xmlns:idx="urn:ietf:params:xml:ns:yang:iana-if-type">idx:ethernetCsmacd</type>
<enabled>true</enabled>
</config>
<ethernet xmlns="http://openconfig.net/yang/interfaces/ethernet">
<config>
<auto-negotiate>false</auto-negotiate>
</config>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip">
<address>
<ip>10.2.12.203</ip>
<config>
<ip>10.2.12.203</ip>
<prefix-length>24</prefix-length>
</config>
</address>
</ipv4>
</subinterface>
</subinterfaces>
</interface>
<interface>
<name>GigabitEthernet0/0/0/2</name>
<config>
<name>GigabitEthernet0/0/0/2</name>
<type xmlns:idx="urn:ietf:params:xml:ns:yang:iana-if-type">idx:ethernetCsmacd</type>
<enabled>true</enabled>
</config>
<ethernet xmlns="http://openconfig.net/yang/interfaces/ethernet">
<config>
<auto-negotiate>false</auto-negotiate>
</config>
</ethernet>
<subinterfaces>
<subinterface>
<index>0</index>
<ipv4 xmlns="http://openconfig.net/yang/interfaces/ip">
<address>
<ip>10.2.14.203</ip>
<config>
<ip>10.2.14.203</ip>
<prefix-length>24</prefix-length>
</config>
</address>
</ipv4>
</subinterface>
</subinterfaces>
</interface>
</interfaces>
</data>
</rpc-reply>
[2017-10-24 13:35:24.554] [ydk] [info]
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Schema node "interface-mode" not found (interface-mode).
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Resolving when condition "interface-mode = 'TRUNK'" failed. Path: '/interfaces/interface/ethernet/vlan/config/native-vlan'
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Schema node "interface-mode" not found (interface-mode).
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Resolving when condition "interface-mode = 'ACCESS'" failed. Path: '/interfaces/interface/ethernet/vlan/config/access-vlan'
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Schema node "interface-mode" not found (interface-mode).
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Resolving when condition "interface-mode = 'TRUNK'" failed. Path: '/interfaces/interface/ethernet/vlan/config/trunk-vlans'
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Schema node "interface-mode" not found (interface-mode).
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Resolving when condition "interface-mode = 'TRUNK'" failed. Path: '/interfaces/interface/ethernet/vlan/state/native-vlan'
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Schema node "interface-mode" not found (interface-mode).
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Resolving when condition "interface-mode = 'ACCESS'" failed. Path: '/interfaces/interface/ethernet/vlan/state/access-vlan'
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Schema node "interface-mode" not found (interface-mode).
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Resolving when condition "interface-mode = 'TRUNK'" failed. Path: '/interfaces/interface/ethernet/vlan/state/trunk-vlans'
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Schema node "interface-mode" not found (interface-mode).
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Resolving when condition "interface-mode = 'TRUNK'" failed. Path: '/interfaces/interface/aggregation/vlan/config/native-vlan'
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Schema node "interface-mode" not found (interface-mode).
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Resolving when condition "interface-mode = 'ACCESS'" failed. Path: '/interfaces/interface/aggregation/vlan/config/access-vlan'
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Schema node "interface-mode" not found (interface-mode).
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Resolving when condition "interface-mode = 'TRUNK'" failed. Path: '/interfaces/interface/aggregation/vlan/config/trunk-vlans'
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Schema node "interface-mode" not found (interface-mode).
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Resolving when condition "interface-mode = 'TRUNK'" failed. Path: '/interfaces/interface/aggregation/vlan/state/native-vlan'
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Schema node "interface-mode" not found (interface-mode).
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Resolving when condition "interface-mode = 'ACCESS'" failed. Path: '/interfaces/interface/aggregation/vlan/state/access-vlan'
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Schema node "interface-mode" not found (interface-mode).
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Resolving when condition "interface-mode = 'TRUNK'" failed. Path: '/interfaces/interface/aggregation/vlan/state/trunk-vlans'
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Module "openconfig-vlan" parsing failed.
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Importing "openconfig-vlan" module into "openconfig-if-ip" failed.
[2017-10-24 13:35:24.644] [ydk] [error] Libyang ERROR: Module "openconfig-if-ip" parsing failed.
[2017-10-24 13:35:24.644] [ydk] [warning] Unable to parse module: 'openconfig-if-ip'. This model cannot be used with YDK
Segmentation fault
[root@nclinux ydk]#
Solved! Go to Solution.
10-24-2017 03:22 PM
Thanks. I'm able to reproduce the segfault with the latest ydk-gen code. created issue:
segfault with openconfig-interfaces decode · Issue #608 · CiscoDevNet/ydk-gen · GitHub
10-24-2017 03:22 PM
Thanks. I'm able to reproduce the segfault with the latest ydk-gen code. created issue:
segfault with openconfig-interfaces decode · Issue #608 · CiscoDevNet/ydk-gen · GitHub
10-24-2017 03:31 PM
Thanks. Appreciate it.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide