This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: Segmentation fault error on BeagleBone AI-64 running Debian

Part Number: TDA4VM

Hello Support,

I am running demo Edge AI scripts on BeagleBone AI-64 following this [link]. I am not using camera and display, just running from SSH.

The package comes along with pre-bundled Debian with BB AI-64. However, it can also be downloaded from [here].

The config file is as follows:

title: "Image Classification Demo"
log_level: 2
inputs:
    input2:
        source: /opt/edge_ai_apps/data/images/%04d.jpg
        width: 1280
        height: 720
        index: 0
        framerate: 1
        loop: True
models:
    model0:
        model_path: /opt/model_zoo/TVM-CL-3410-gluoncv-mxnet-mobv2
        topN: 5
outputs:
    output2:
        sink: /opt/edge_ai_apps/data/output/images/output_image_%04d.jpg
        width: 1920
        height: 1080

flows:
    flow0:
        input: input2
        models: [model0]
        outputs: [output2]
        mosaic:
            mosaic0:
                width:  1280
                height: 720
                pos_x:  320
                pos_y:  180

Steps I am following (on a fresh install)

debian@BeagleBone:/opt/edge_ai_apps$ sudo ./setup_script.sh
debian@BeagleBone:/opt/edge_ai_apps$ cd apps_python
debian@BeagleBone:/opt/edge_ai_apps/apps_python$ sudo ./app_edgeai.py ../configs/image_classification.yaml 
2023-03-01 14:50:50,569 INFO Could not find libdlr.so in model artifact. Using dlr from /usr/dlr/libdlr.so
APP: Init ... !!!
MEM: Init ... !!!
MEM: Initialized DMA HEAP (fd=4) !!!
MEM: Init ... Done !!!
IPC: Init ... !!!
_rpmsg_char_find_rproc: 5c00000.r5f does not have any virtio devices!
_rpmsg_char_find_rproc: 5d00000.r5f does not have any virtio devices!
IPC: ERROR: Unable to create TX channels for CPU [mcu2_0] !!!
IPC: ERROR: Unable to create TX channels for CPU [mcu2_1] !!!
IPC: Init ... Done !!!
APP: ERROR: IPC init failed !!!
REMOTE_SERVICE: Init ... !!!
_rpmsg_char_find_rproc: 5c00000.r5f does not have any virtio devices!
_rpmsg_char_find_rproc: 5d00000.r5f does not have any virtio devices!
_rpmsg_char_find_ctrldev: could not find the matching rpmsg_ctrl device for virtio0.rpmsg_chrdev.-1.21
_rpmsg_char_find_ctrldev: could not find the matching rpmsg_ctrl device for virtio1.rpmsg_chrdev.-1.21
_rpmsg_char_find_ctrldev: could not find the matching rpmsg_ctrl device for virtio2.rpmsg_chrdev.-1.21
REMOTE_SERVICE: Init ... Done !!!
  4593.669247 s: GTC Frequency = 200 MHz
APP: Init ... Done !!!
  4593.669347 s:  VX_ZONE_INIT:Enabled
  4593.669357 s:  VX_ZONE_ERROR:Enabled
  4593.669363 s:  VX_ZONE_WARNING:Enabled
  4593.670159 s:  VX_ZONE_INIT:[tivxInitLocal:130] Initialization Done !!!
  4593.670350 s:  VX_ZONE_INIT:[tivxHostInitLocal:86] Initialization Done for HOST !!!
  4593.670716 s:  VX_ZONE_ERROR:[ownContextCreateCmdObj:161] context object descriptor [0] allocation failed
  4593.670744 s:  VX_ZONE_ERROR:[vxCreateContext:946] context objection creation failed
  4593.670813 s:  VX_ZONE_ERROR:[vxGetStatus:713] Reference is NULL
  4593.670833 s:  VX_ZONE_ERROR:[tivxAddKernelTIDL:233] Unable to allocate user kernel ID
  4593.670843 s:  VX_ZONE_ERROR:[vxGetStatus:713] Reference is NULL
  4593.670852 s:  VX_ZONE_ERROR:[vxGetStatus:713] Reference is NULL
  4593.670858 s:  VX_ZONE_ERROR:[vxGetStatus:713] Reference is NULL
  4593.670864 s:  VX_ZONE_ERROR:[vxGetStatus:713] Reference is NULL
  4593.670874 s:  VX_ZONE_ERROR:[vxSetReferenceName:659] Invalid reference
  4593.670888 s:  VX_ZONE_ERROR:[tivxMapTensorPatch:611] Invalid tensor reference
Segmentation fault

If, I run apps_cpp, I get the same errors:

debian@BeagleBone:/opt/edge_ai_apps/apps_cpp$ sudo ./bin/Release/app_edgeai ../configs/image_classification.yaml 
[sudo] password for debian: 
APP: Init ... !!!
MEM: Init ... !!!
MEM: Initialized DMA HEAP (fd=4) !!!
MEM: Init ... Done !!!
IPC: Init ... !!!
_rpmsg_char_find_rproc: 5c00000.r5f does not have any virtio devices!
_rpmsg_char_find_rproc: 5d00000.r5f does not have any virtio devices!
IPC: ERROR: Unable to create TX channels for CPU [mcu2_0] !!!
IPC: ERROR: Unable to create TX channels for CPU [mcu2_1] !!!
IPC: Init ... Done !!!
APP: ERROR: IPC init failed !!!
REMOTE_SERVICE: Init ... !!!
_rpmsg_char_find_rproc: 5c00000.r5f does not have any virtio devices!
_rpmsg_char_find_rproc: 5d00000.r5f does not have any virtio devices!
_rpmsg_char_find_ctrldev: could not find the matching rpmsg_ctrl device for virtio0.rpmsg_chrdev.-1.21
_rpmsg_char_find_ctrldev: could not find the matching rpmsg_ctrl device for virtio1.rpmsg_chrdev.-1.21
_rpmsg_char_find_ctrldev: could not find the matching rpmsg_ctrl device for virtio2.rpmsg_chrdev.-1.21
REMOTE_SERVICE: Init ... Done !!!
 10917.176095 s: GTC Frequency = 200 MHz
APP: Init ... Done !!!
 10917.176224 s:  VX_ZONE_INIT:Enabled
 10917.176237 s:  VX_ZONE_ERROR:Enabled
 10917.176247 s:  VX_ZONE_WARNING:Enabled
 10917.177110 s:  VX_ZONE_INIT:[tivxInitLocal:130] Initialization Done !!!
 10917.177327 s:  VX_ZONE_INIT:[tivxHostInitLocal:86] Initialization Done for HOST !!!
 10917.177676 s:  VX_ZONE_ERROR:[ownContextCreateCmdObj:161] context object descriptor [0] allocation failed
 10917.177707 s:  VX_ZONE_ERROR:[vxCreateContext:946] context objection creation failed
 10917.177745 s:  VX_ZONE_ERROR:[vxGetStatus:713] Reference is NULL
 10917.177769 s:  VX_ZONE_ERROR:[tivxAddKernelTIDL:233] Unable to allocate user kernel ID
 10917.177778 s:  VX_ZONE_ERROR:[vxGetStatus:713] Reference is NULL
 10917.177785 s:  VX_ZONE_ERROR:[vxGetStatus:713] Reference is NULL
 10917.177790 s:  VX_ZONE_ERROR:[vxGetStatus:713] Reference is NULL
 10917.177796 s:  VX_ZONE_ERROR:[vxGetStatus:713] Reference is NULL
 10917.177807 s:  VX_ZONE_ERROR:[vxSetReferenceName:659] Invalid reference
 10917.178419 s:  VX_ZONE_ERROR:[tivxMapTensorPatch:611] Invalid tensor reference
Segmentation fault

Please help, I am new to TDA4VM.

Thank you

Best

Shubham

  • Hi Shubham,

    Apologies for the delayed reply. In the shared logs, I did not see the following commands that are in the user guide documentation for BeagleBone:

    """

    # enable root (password: temppwd)
    
    debian@beaglebone:~$ sudo su
    
    [sudo] password for beaglebone:

    """

    Could you also run "sudo su" to make sure this is not the cause of the issue? As a disclaimer, BeagleBone's demo is based on a demo from TI, but there seems to be slight differences between BeagleBone and TI (for example, on TI's boards for the same processor, there is no need for sudo su before running the application). Support from TI will be limited in that sense, since we will be debugging using TI boards and TI software.

    Regards,

    Takuma