Segmentation Fault in Jetson Nano while using Python3

Is there a simple explanation for the “Segmentation Fault (core dumped)” (SFCD) error in the Jetson Nano while using Python3?

I have tested a python simple script to consume the RAM and at the end it “killed” so I suppose this is different to a SFCD (I also did a benchmark to the cpu while testing this script, just to check if there is something else). I actually do not know if this was accurate to do, I just did it asap for testing.

I have gotten this SFCD errors during the execution of scripts in python of a project. If I test the same code in my laptop, raise normal python error, like a NoneType, VariableNotFound (simple/normal errors). But in the nano it goes for the SFCD.

Note: The project involves Neural Network (yolov5) using tensorRT, and the Hikvision API to get live-images from cameras and infere in real time.

Any thoughs?

I did some research for this, and it may be caused from the external libraries (hikvision) but not completly sure about this.


Usually, killed is caused by the out-of-memory, and segmentation fault is from invalid memory access.
Maybe you can try to run the script with cuda-memcheck to see if any error is reported first.

$ sudo /usr/local/cuda-10.2/bin/cuda-memcheck python3 [my].py 


I got this when using cuda-memcheck

========= Error: process didn’t terminate successfully
========= No CUDA-MEMCHECK results found

I do not know if this hepls, but I use a .sh to execute the file

python3 $SCRIPTS_DIR/

and get this:

bash shell/
shells/ line 26: 26325 Segmentation fault      (core dumped) python3 $SCRIPTS_DIR/

I try to reproduce the error with a shorter code, but have been difficult. Also I can say that I am importing some heavy libraries, like numpy tensorrt torch matplotlib, etc. Maybe this is a problem and the hardware should be tested with more swap?


Segmentation fault might be caused by lots of reasons.
It’s challenging to find the real issue.
Maybe you can try to run the app with cuda-gdb to get some extra information.

For the swap, you can add some but please note that it can only be accessed via CPU.
Does the same source code work on other platforms, like x86 machines?


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.