Nvarguscamerasrc pipeline

Hi,

I’m new to use nvidia chipset and jetson sdk.
I would appreciate it if anyone check this problem.

  1. Symptoms
    a. Memory leakage has detected when six-gstreamer pipeline using nvarguscamerasrc open/close repeatedly.
    b. The memory leakage caused by “gstreamer application” and “nvargus-daemon” when I run below operations.
    1. Create six gstreamer pipelines sequentialy as below.
    1) create and set to PAUSED
    nvarguscamerasrc sensor-id=(camera number) aelock=1 wbmode=0 awblock=1 ee-mode=0 tnr-mode=0 aeantibanding=0
    ! ‘video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)10/1’
    ! nvvidconv
    ! ‘video/x-raw(memory:NVMM), width=1920, height=1080, format=(string)I420’
    ! nvjpegenc quality=90
    ! appsink
    2. Set to RUNNIING
    3. Destory the pipelines
    4. Repeat 1-3.
    c. The memory is released when I shutdown the gstreamer application by “Ctrl+C”.

  2. Memory usage of gstreamer app and nvargus-daemon
    image
    image

Thank you.

Could you remove the nvjpegenc and nvvidconv to break down the problem?

Thanks

I changed the pipeline as below and I got a same result.

nvarguscamerasrc sensor-id=(camera number) aelock=1 wbmode=0 awblock=1 ee-mode=0 tnr-mode=0 aeantibanding=0 ! appsink

Additional Information : NVMM usage(NvMapMemUsed) increases a lot and infinitely.

  • A pipeline uses 100 ~ 150MBs of “NvMapMemUsed”
  • “NvMapMemUsed” seems not to be released perfectly when the pipelines are destroyed.
  • If the application process is terminated by “Ctrl+C”, “NvMapMemUsed” is released.

</proc/meminfo>
MemTotal: 3926500 kB
MemFree: 1490500 kB
MemAvailable: 1705872 kB
Buffers: 9320 kB
Cached: 363812 kB
SwapCached: 0 kB
Active: 715064 kB
Inactive: 284920 kB
Active(anon): 695020 kB
Inactive(anon): 136284 kB
Active(file): 20044 kB
Inactive(file): 148636 kB
Unevictable: 12152 kB
Mlocked: 0 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 52 kB
Writeback: 0 kB
AnonPages: 637148 kB
Mapped: 75812 kB
Shmem: 192300 kB
Slab: 117168 kB
SReclaimable: 44788 kB
SUnreclaim: 72380 kB
KernelStack: 7856 kB
PageTables: 5712 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 1963248 kB
Committed_AS: 2821012 kB
VmallocTotal: 263061440 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
AnonHugePages: 67584 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
NvMapMemFree: 155432 kB
NvMapMemUsed: 998088 kB
CmaTotal: 65536 kB
CmaFree: 49048 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB

Are you able to check nvgstcaptrue-1.0?

As I mentioned before, the memory usage is recoverd(released) when the application process was shutdown.
I know that Nvgstcaptrue-1.0 could not open and close pipelines repeatedly while the process is running.
But I’ll try to check Nvgstcaptrue-1.0 and its source codes.

Apart from that, I would like to know the following.

  1. A pipeline uses 100 ~ 150MBs of “NvMapMemUsed". Is it normal?

Suppose it’s normally.