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.

Segmentation Fault

Hello Friends,

I ran my usecase for 1CH VIP LVDS capture + SGX MOSAIC + DISPLAY + STORE.I am trying to store my video data on hard disk.The display comes up for 30 seconds and after that I get the Segmentation Fault as follows:

****58] virtio_rpmsg_bus virtio1: msg received with no recipient

** Segmentation fault caught ....

Faulty address is (nil), calle from 0x593ef

Totally Obtained 0 stack frames. signal number =11

Signal number = 11, Signal errno = 0

SI code = 1 (Address not mapped to object)

Fault addr = (nil)

[bt] Execution path:

288.599580] virtio_rpmsg_bus virtio1: msg received with no recipient

[ 288.628707] virtio_rpmsg_bus virtio1: msg received with no recipient

[ 288.635196] virtio_rpmsg_bus virtio1: msg received with no recipient

orot@dra7xx-evm:/opt/vision_sdk# [ 291.166763] virtio_rpmsg_bus virtio1: msg received with no recipient

I request you to help me identifying the root cause for this error and also rectifying it.

My use case structure is as follows:

Capture -> Dup -> Display_Video

Dup -> Null (A15)

GrpxSrc -> Display_Grpx

Best Regards,

Vijay

  • Hi Vijay/Bharat,

    i see the error
    Faulty address is (nil), calle from 0x593ef

    Looks the address is NULL (0x00) .

    How are you doing external hard drive write. ?
    Please verify if the memory /file you are writing is accessible and valid.

    Regards
    Chetan.M
  • Please ignore. Testing a reply.
  • Hello Chetan,
    I am not able to post my code here.I will start a related post and post my code there.

    Best Regards,
    Vijay
  • Hi Vijay,

    can you click "Insert Code, Attach Files and more..." link below the box and check if you can post your code?
    You should be also able to attach files.

    Regards,
    Yordan
  • Hi Chetan,
    
    I have used appCb using Null(A15) parameters as follows:
    pPrm->appCb = chains_lvdsVipMultiCamSgxDisplay_Store_appCb;
    I suspect something wrong in the following code.Please correct me if I am wrong.
    
    static Void chains_lvdsVipMultiCamSgxDisplay_Store_appCb(System_LinkChInfo *pChInfo, Void *pBuf, Void *arg)
    {
    
    FILE *hndlFile;
    System_Buffer *pFrameBuf = (System_Buffer*)pBuf;
    System_BitstreamBuffer *bitstreamBuf = (System_BitstreamBuffer *)pFrameBuf->payload;
    
    hndlFile = fopen(SSD_STORE_FILE,"wb");
    
    fwrite(bitstreamBuf->bufAddr, bitstreamBuf->fillLength, 1, hndlFile);
    }
    
    Please not that SSD_STORE_FILE is defined as follows:
    
    #define SSD_STORE_FILE  “/mnt/usb_storage/STORE.BIN”
    
    Best Regards,
    Bharat

  • Hi Chetan,

    We were not able to respond with code. So I have included the entire response in "Segmentation Fault.txt" file in above response.
    Hope to get your reply with solution.

    Regards,
    Bharat
  • Hi Bharat,

    Please verify if the mounted device is accessible ,
    With the discussion it looks like mounted device is not hard drive but mmc sd , hence file is getting created there.

    And when you are writing the payload verify the address of the payload is virtual and not physical .

    Regards
    Chetan.M
  • Hi Chetan,

    Mount device is accessible. We changed the payload address to virtual address and got the following error:

    ***** Segmentation fault caught ....
    Faulty address is (nil), called from 0xb6a0d129
    Totally Obtained 0 stack frames. signal number =11
    Signal number = 11, Signal errno = 0
    SI code = 1 (Address not mapped to object)
    Fault addr = (nil)
    [bt] Execution path:
    ] pgd = c0003000
    [ 200.416032] [00000104] *pgd=80000080004003, *pmd=00000000
    [ 200.416038] Internal error: Oops: a07 [#2] PREEMPT SMP ARM

    [ 200.416117] Modules linked in: memcache(O) sd_mod bc_example(O) xfrm_user xfrm4_tunnel usb_storage ipcomp xfrm_ipcomp esp4 ah4 af_key xfrm_algo bluetooth rpmsg_proto virtio_rpmsg_bus pvrsrvkm(O) ecb sha512_generic sha512_arm sha256_generic hmac ahci_platform md5 libahci_platform libahci sha1_generic libata sha1_arm_neon sha1_arm scsi_mod dwc3_omap omap_aes_driver omap_sham c_can_platform c_can can_dev rtc_omap omap_des omap_rng rng_core omap_remoteproc remoteproc virtio virtio_ring sch_fq_codel
    rBoadcast message from systemd-journald@dra7xx-evm (Thu 2017-08-3 07:18:36 UTC):

    kernel[907]: [ 200.096620] Process apps.out (pid: 1303, stack limit = 0xc3614210)

    [ 200.416124] CPU: 1 PID: 1305 Comm: systemd-udevd Tainted: G D O 4.4.84 #1
    [ 200.416126] Hardware name: Generic DRA74X (Flattened Device Tree)
    [ 200.416130] task: c3673c00 ti: c35c2000 task.ti: c35c2000
    [ 200.416142] PC is at remove_wait_queue+0x30/0x48
    [ 200.416145] LR is at 0x100

    rBoadcast message from systemd-journald@dra7xx-evm (Thu 2017-8-31 07:18:36 UTC):

    kernel[907]: [ 200.102824] Stack: (0xc3615db0 to 0xc3616000)
    [ 200.416150] pc : [<c00706c4>] lr : [<00000100>] psr: 600d0093
    [ 200.416150] sp : c35c3e60 ip : 00000200 fp : c35c3e74
    [ 200.416154] r10: c3a67308 r9 : 00000100 r8 : 00000200
    [ 200.416157] r7 : c3c277a4 r6 : c09b4848 r5 : c3646980 r4 : ee444aac


    [ 200.416161] r3 : 00000200 r2 : 00000100 r1 : a00d0013 r0 : c3646980

    Regards,
    Bharat
  • Hi Bharat,

    Can you try writing on mmc sd instead of hdd
    So we can rule out if its access issue or write issue

    Regards
    Chetan.M
  • Hi Bharat,

    Any updates on this thread. ?

    Regards
    Chetan.M
  • Hello Chetan,
    We were able to write encoded format(mpeg/h264) on the SD card using Null Link.We were able to get good quality encoded video.We then extracted frames from the video and used for our Deep Learning exercises.Thank you for resolving the issue.

    Best Regards,
    Bharat