dpss application segfault when datapath not configured on router

Document created by cdnadmin on Jan 25, 2014
Version 1Show Document
  • View in full screen mode
This document was generated from CDN thread

Created by: Viktor S. Wold Eide on 05-12-2013 04:20:35 AM
Hi,

When datapath is not enabled on the router, onep dpss applications crash by segfault (see below).

This can be fixed by configuring onep in the router router ala:
datapath transport gre sender-id 110 interface GigabitEthernet0/2

The documentation (e.g., tutorial) clearly describes that this configuration step is necessary. However, it is easy to forget during development and test. Then it might not be obvious what causes the segfault, unless executed in a debugger. Some error message would be appreciated.

Best regards
Viktor

 1echo $ONEP_SDK
 2/opt/cisco/onep/c64/sdk-c64-1.0.0.84
 3
 4gdb --args ./bin/DatapathTutorial -a 10.10.10.110 -u USER -p PASSWD -t tcp -i GigabitEthernet0/0
 5GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
 6Copyright (C) 2012 Free Software Foundation, Inc.
 7License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 8This is free software: you are free to change and redistribute it.
 9There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
10and "show warranty" for details.
11This GDB was configured as "x86_64-linux-gnu".
12For bug reporting instructions, please see:
13<http://bugs.launchpad.net/gdb-linaro/>...
14Reading symbols from /home/cisco/viktor/onep/c64-vswe/tutorials/DatapathTutorial/bin/DatapathTutorial...(no debugging symbols found)...done.
15(gdb) run
16Starting program: /home/cisco/viktor/onep/c64-vswe/tutorials/DatapathTutorial/bin/DatapathTutorial -a 10.10.10.110 -u USER-p PASSWD -t tcp -i GigabitEthernet0/0
17[Thread debugging using libthread_db enabled]
18Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
19[New Thread 0x7ffff6bd1700 (LWP 9644)]
20[New Thread 0x7ffff63d0700 (LWP 9645)]
21[New Thread 0x7ffff5bcf700 (LWP 9646)]
22[New Thread 0x7ffff53ce700 (LWP 9647)]
23[New Thread 0x7ffff4bcd700 (LWP 9648)]
24[New Thread 0x7ffff43cc700 (LWP 9649)]
25[New Thread 0x7ffff3bcb700 (LWP 9650)]
26[New Thread 0x7ffff33ca700 (LWP 9651)]
27[New Thread 0x7ffff2bc9700 (LWP 9652)]
28[New Thread 0x7ffff23c8700 (LWP 9653)]
29[New Thread 0x7ffff1bc7700 (LWP 9654)]
30
31 Network Element CONNECT SUCCESS
32Creating l2 ace ...
33Added l2 ace to acl
34Creating l2 ace OK
35[0] Interface [GigabitEthernet0/0]
36[1] Interface [GigabitEthernet0/1]
37[2] Interface [GigabitEthernet0/2]
38[3] Interface [GigabitEthernet0/3]
39[4] Interface [GigabitEthernet0/4]
40[5] Interface [GigabitEthernet0/5]
41[6] Interface [GigabitEthernet0/6]
42[7] Interface [GigabitEthernet0/7]
43[8] Interface [GigabitEthernet0/8]
44[9] Interface [GigabitEthernet0/9]
45
46 Name of interface expecting packets: GigabitEthernet0/0
47[New Thread 0x7ffff13c6700 (LWP 9655)]
48
49Program received signal SIGSEGV, Segmentation fault.
500x00007ffff7126d58 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
51(gdb) bt
52#0  0x00007ffff7126d58 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
53#1  0x00007ffff73dfda8 in onep_dpss_set_dpss_transport (network_caps=0x7fffffffe0b0, platform_caps=0x55555577f2f8)
54    at src/client/onep_dpss_rpc_client_support.c:43
55#2  0x00007ffff73dff25 in onep_dpss_translate_network_to_platform_caps (network_caps=0x7fffffffe0b0, platform_caps=0x55555577f2f8)
56    at src/client/onep_dpss_rpc_client_support.c:236
57#3  0x00007ffff73c3dac in onep_dpss_initialize (ne=0x55555575a3b0) at src/client/onep_dpss_packet_delivery.c:899
58#4  0x00007ffff73d8874 in onep_dpss_register_for_packets (target=0x55555577fa70, traffic_class=0x55555577e600, action_type=ONEP_DPSS_ACTION_COPY,
59    callback=0x55555555638a <dpss_display_pak_info_callback>, user_context=0x0, traffic_reg=0x7fffffffe280) at src/client/onep_dpss_callback_framework.c:1072
60#5  0x0000555555556f2e in main ()
61(gdb)


Subject: Re: New Message from Viktor S. Wold Eide in onePK Developer - Troubleshooti
Replied by: Einar Nilsen-Nygaard on 05-12-2013 07:41:29 AM
I thought we had addressed this issue a while ago; not in your SDK, obviously, but in newer ones. However, I just ran a test locally and it is still an issue. I will make sure we get this fixed, and thanks for re-raising the issue.

Cheers,

Einar

On Dec 5, 2013, at 1:27 PM, Cisco Developer Community Forums <cdicuser@developer.cisco.com<mailto:cdicuser@developer.cisco.com>> wrote:

Viktor S. Wold Eide has created a new message in the forum "Troubleshooting": -------------------------------------------------------------- Hi,

When datapath is not enabled on the router, onep dpss applications crash by segfault (see below).

This can be fixed by configuring onep in the router router ala:
datapath transport gre sender-id 110 interface GigabitEthernet0/2

The documentation (e.g., tutorial) clearly describes that this configuration step is necessary. However, it is easy to forget during development and test. Then it might not be obvious what causes the segfault, unless executed in a debugger. Some error message would be appreciated.

Best regards
Viktor

1echo $ONEP_SDK
2/opt/cisco/onep/c64/sdk-c64-1.0.0.84
3
4gdb --args ./bin/DatapathTutorial -a 10.10.10.110 -u USER -p PASSWD -t tcp -i GigabitEthernet0/0
5GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
6Copyright (C) 2012 Free Software Foundation, Inc.
7License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
8This is free software: you are free to change and redistribute it.
9There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
10and "show warranty" for details.
11This GDB was configured as "x86_64-linux-gnu".
12For bug reporting instructions, please see:
13<http://bugs.launchpad.net/gdb-linaro/>...
14Reading symbols from /home/cisco/viktor/onep/c64-vswe/tutorials/DatapathTutorial/bin/DatapathTutorial...(no debugging symbols found)...done.
15(gdb) run
16Starting program: /home/cisco/viktor/onep/c64-vswe/tutorials/DatapathTutorial/bin/DatapathTutorial -a 10.10.10.110 -u USER-p PASSWD -t tcp -i GigabitEthernet0/0
17[Thread debugging using libthread_db enabled]
18Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
19[New Thread 0x7ffff6bd1700 (LWP 9644)]
20[New Thread 0x7ffff63d0700 (LWP 9645)]
21[New Thread 0x7ffff5bcf700 (LWP 9646)]
22[New Thread 0x7ffff53ce700 (LWP 9647)]
23[New Thread 0x7ffff4bcd700 (LWP 9648)]
24[New Thread 0x7ffff43cc700 (LWP 9649)]
25[New Thread 0x7ffff3bcb700 (LWP 9650)]
26[New Thread 0x7ffff33ca700 (LWP 9651)]
27[New Thread 0x7ffff2bc9700 (LWP 9652)]
28[New Thread 0x7ffff23c8700 (LWP 9653)]
29[New Thread 0x7ffff1bc7700 (LWP 9654)]
30
31 Network Element CONNECT SUCCESS
32Creating l2 ace ...
33Added l2 ace to acl
34Creating l2 ace OK
35[0] Interface [GigabitEthernet0/0]
36[1] Interface [GigabitEthernet0/1]
37[2] Interface [GigabitEthernet0/2]
38[3] Interface [GigabitEthernet0/3]
39[4] Interface [GigabitEthernet0/4]
40[5] Interface [GigabitEthernet0/5]
41[6] Interface [GigabitEthernet0/6]
42[7] Interface [GigabitEthernet0/7]
43[8] Interface [GigabitEthernet0/8]
44[9] Interface [GigabitEthernet0/9]
45
46 Name of interface expecting packets: GigabitEthernet0/0
47[New Thread 0x7ffff13c6700 (LWP 9655)]
48
49Program received signal SIGSEGV, Segmentation fault.
500x00007ffff7126d58 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
51(gdb) bt
52#0  0x00007ffff7126d58 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
53#1  0x00007ffff73dfda8 in onep_dpss_set_dpss_transport (network_caps=0x7fffffffe0b0, platform_caps=0x55555577f2f8)
54    at src/client/onep_dpss_rpc_client_support.c:43
55#2  0x00007ffff73dff25 in onep_dpss_translate_network_to_platform_caps (network_caps=0x7fffffffe0b0, platform_caps=0x55555577f2f8)
56    at src/client/onep_dpss_rpc_client_support.c:236
57#3  0x00007ffff73c3dac in onep_dpss_initialize (ne=0x55555575a3b0) at src/client/onep_dpss_packet_delivery.c:899
58#4  0x00007ffff73d8874 in onep_dpss_register_for_packets (target=0x55555577fa70, traffic_class=0x55555577e600, action_type=ONEP_DPSS_ACTION_COPY,
59    callback=0x55555555638a <dpss_display_pak_info_callback>, user_context=0x0, traffic_reg=0x7fffffffe280) at src/client/onep_dpss_callback_framework.c:1072
60#5  0x0000555555556f2e in main ()
61(gdb)

--
To respond to this post, please click the following link: http://developer.cisco.com/web/onepk-developer/forum/-/message_boards/view_message/22010980 or simply reply to this email.

Attachments

    Outcomes