cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
590
Views
0
Helpful
3
Replies

Python crashing as a result of NSO Python API?

previousqna
Level 5
Level 5

Hi all,

 

 

I’ve been encountering the following problem for the past few months, but have been unable to pinpoint the cause to this day. Was wondering if anyone familiar with the NSO Python API could help me out.

 

 

On my development machine running OS X Yosemite, sometimes when I start NSO with packages written in Python, or run scripts that make use of the NSO Python API, I am greeted with an error where Python “quits unexpectedly” (see attached text file containing problem details and system configuration). Once in a while this is accompanied by something like “Bus error: 10” being printed out to the terminal.

 

 

I initially thought the root cause was purely due to some bug in one of our Python packages. But recently when I tried running Håkan Niska’s nice IPython script (https://wwwin-github.cisco.com/nsopl/ncs_pycli), the same error showed up again, causing the IPython instance to not load. Running the script again worked though, so this error doesn’t show up on a consistent basis.

 

 

Has anyone else encountered something like this? The other developers I work with have reported seeing the same issue, but I haven’t heard anyone outside of our team complain about this, which is why I initially thought it was a bug in our own code. Any comments/suggestions on how to go about resolving this would be greatly appreciated.

3 Replies 3

previousqna
Level 5
Level 5

Can you try reproduce this issue with Python 3 and/or in Linux rather than OSX?

On OS X there is a problem with Python that can manifest itself as a crash when reloading packages.

 

 

It is possible to disable the feature that causes the crash in ncs.conf:

 

 

<ncs-config xmlns="http://tail-f.com/yang/tailf-ncs-config">

 

...

 

<enable-shared-memory-schema>false</enable-shared-memory-schema>

I disabled the shared memory schema as suggested and ran a series of tests repeatedly to verify. The error did not show up even once (even after 30 repetitions), so I think that did the trick

 

Thanks so much for the help!