NvMediaIEP FeedFrame issues

Please provide the following info (tick the boxes after creating this topic):
Software Version
DRIVE OS 6.0.8.1
DRIVE OS 6.0.6
DRIVE OS 6.0.5
DRIVE OS 6.0.4 (rev. 1)
DRIVE OS 6.0.4 SDK
other

Target Operating System
Linux
QNX
other

Hardware Platform
DRIVE AGX Orin Developer Kit (940-63710-0010-300)
DRIVE AGX Orin Developer Kit (940-63710-0010-200)
DRIVE AGX Orin Developer Kit (940-63710-0010-100)
DRIVE AGX Orin Developer Kit (940-63710-0010-D00)
DRIVE AGX Orin Developer Kit (940-63710-0010-C00)
DRIVE AGX Orin Developer Kit (not sure its number)
other

SDK Manager Version
1.9.3.10904
other

Host Machine Version
native Ubuntu Linux 20.04 Host installed with SDK Manager
native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
native Ubuntu Linux 18.04 Host installed with DRIVE OS Docker Containers
other

Hi, we’re seeing intermittent issues with calls to NvMediaIEPFeedFrame(). Abridged output from journalctl -b0 is attached below, but roughly the sequence of events appears to be as follows:

  1. A call to NvMediaIEPFeedFrame() fails
[23166552785] Module_id 42 Severity 2 : NvMediaIEPFeedFrame Failed to feed frame to NvVideoEncoder
  1. The kernel prints debugging information about NvSciSync?
  2. Multiple subsequent NvMediaIEPFeedFrame() calls fail with an error message about host1x job submission failed and the same “FeedFrame failed” message as the first failing call
Jul 23 09:45:34 tegra-ubuntu kernel: tegra-host1x 13e40000.host1x: cdma_timeout_handler: timeout: 284 (284-camera_driver_n), HW thresh 3715, done 3717
Jul 23 09:45:34 tegra-ubuntu kernel: tegra-host1x-virtual-engine 13e40000.host1x:nvenc@154c0000: camera_driver_n: job submission failed: host1x job submission failed: -1
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23166988967] Module_id 42 Severity 2 : NvMediaIEPFeedFrame Failed to feed frame to NvVideoEncoder
Jul 23 09:45:34 tegra-ubuntu kernel: tegra-host1x-virtual-engine 13e40000.host1x:nvenc@154c0000: camera_driver_n: job submission failed: host1x job submission failed: -1
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23167420768] Module_id 42 Severity 2 : NvMediaIEPFeedFrame Failed to feed frame to NvVideoEncoder
Jul 23 09:45:34 tegra-ubuntu kernel: tegra-host1x-virtual-engine 13e40000.host1x:nvenc@154c0000: camera_driver_n: job submission failed: host1x job submission failed: -1
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23167853362] Module_id 42 Severity 2 : NvMediaIEPFeedFrame Failed to feed frame to NvVideoEncoder
Jul 23 09:45:34 tegra-ubuntu kernel: tegra-host1x-virtual-engine 13e40000.host1x:nvenc@154c0000: camera_driver_n: job submission failed: host1x job submission failed: -1
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23168071461] Module_id 42 Severity 2 : NvMediaIEPFeedFrame Failed to feed frame to NvVideoEncoder
Jul 23 09:45:34 tegra-ubuntu kernel: tegra-host1x-virtual-engine 13e40000.host1x:nvenc@154c0000: camera_driver_n: job submission failed: host1x job submission failed: -1
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23168511473] Module_id 42 Severity 2 : NvMediaIEPFeedFrame Failed to feed frame to NvVideoEncoder
Jul 23 09:45:34 tegra-ubuntu kernel: tegra-host1x-virtual-engine 13e40000.host1x:nvenc@154c0000: camera_driver_n: job submission failed: host1x job submission failed: -1
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23168740817] Module_id 42 Severity 2 : NvMediaIEPFeedFrame Failed to feed frame to NvVideoEncoder
Jul 23 09:45:34 tegra-ubuntu kernel: tegra-host1x-virtual-engine 13e40000.host1x:nvenc@154c0000: camera_driver_n: job submission failed: host1x job submission failed: -1
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23169189356] Module_id 42 Severity 2 : NvMediaIEPFeedFrame Failed to feed frame to NvVideoEncoder
Jul 23 09:45:34 tegra-ubuntu kernel: tegra-host1x-virtual-engine 13e40000.host1x:nvenc@154c0000: camera_driver_n: job submission failed: host1x job submission failed: -1
  1. All subsequent NvMediaIEPFeedFrame() calls fail because the max number of pre-fences has been added to the NvMediaIEP instance
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23170396994] Module_id 81 Severity 2 : ValidateTaskStatusArray numInputTaskStatus should be less than NVVIDEO_IEP_MAX_IN_TASKSTATUS
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23170399123] Module_id 81 Severity 2 : NvVideoEncodeFeedFrameForTEGRAV1 ValidateTaskStatusArray failed in IEP FeedFrame
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23170399394] Module_id 42 Severity 2 : NvMediaIEPFeedFrame Failed to feed frame to NvVideoEncoder
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23173519119] Module_id 81 Severity 2 : ValidateTaskStatusArray numInputTaskStatus should be less than NVVIDEO_IEP_MAX_IN_TASKSTATUS
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23173521237] Module_id 81 Severity 2 : NvVideoEncodeFeedFrameForTEGRAV1 ValidateTaskStatusArray failed in IEP FeedFrame
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23173521548] Module_id 42 Severity 2 : NvMediaIEPFeedFrame Failed to feed frame to NvVideoEncoder
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23176643021] Module_id 81 Severity 2 : ValidateTaskStatusArray numInputTaskStatus should be less than NVVIDEO_IEP_MAX_IN_TASKSTATUS
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23176645410] Module_id 81 Severity 2 : NvVideoEncodeFeedFrameForTEGRAV1 ValidateTaskStatusArray failed in IEP FeedFrame
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23176645728] Module_id 42 Severity 2 : NvMediaIEPFeedFrame Failed to feed frame to NvVideoEncoder
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23179770518] Module_id 81 Severity 2 : ValidateTaskStatusArray numInputTaskStatus should be less than NVVIDEO_IEP_MAX_IN_TASKSTATUS
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23179773188] Module_id 81 Severity 2 : NvVideoEncodeFeedFrameForTEGRAV1 ValidateTaskStatusArray failed in IEP FeedFrame
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23179773495] Module_id 42 Severity 2 : NvMediaIEPFeedFrame Failed to feed frame to NvVideoEncoder
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23182893185] Module_id 81 Severity 2 : ValidateTaskStatusArray numInputTaskStatus should be less than NVVIDEO_IEP_MAX_IN_TASKSTATUS
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23182895596] Module_id 81 Severity 2 : NvVideoEncodeFeedFrameForTEGRAV1 ValidateTaskStatusArray failed in IEP FeedFrame
Jul 23 09:45:34 tegra-ubuntu camera_driver_node[9975]: [23182896019] Module_id 42 Severity 2 : NvMediaIEPFeedFrame Failed to feed frame to NvVideoEncoder
Jul 23 09:45:35 tegra-ubuntu camera_driver_node[9975]: [23186018192] Module_id 81 Severity 2 : ValidateTaskStatusArray numInputTaskStatus should be less than NVVIDEO_IEP_MAX_IN_TASKSTATUS
Jul 23 09:45:35 tegra-ubuntu camera_driver_node[9975]: [23186020986] Module_id 81 Severity 2 : NvVideoEncodeFeedFrameForTEGRAV1 ValidateTaskStatusArray failed in IEP FeedFrame
Jul 23 09:45:35 tegra-ubuntu camera_driver_node[9975]: [23186021303] Module_id 42 Severity 2 : NvMediaIEPFeedFrame Failed to feed frame to NvVideoEncoder
Jul 23 09:45:35 tegra-ubuntu camera_driver_node[9975]: [23189143198] Module_id 81 Severity 2 : ValidateTaskStatusArray numInputTaskStatus should be less than NVVIDEO_IEP_MAX_IN_TASKSTATUS
Jul 23 09:45:35 tegra-ubuntu camera_driver_node[9975]: [23189145445] Module_id 81 Severity 2 : NvVideoEncodeFeedFrameForTEGRAV1 ValidateTaskStatusArray failed in IEP FeedFrame
Jul 23 09:45:35 tegra-ubuntu camera_driver_node[9975]: [23189145768] Module_id 42 Severity 2 : NvMediaIEPFeedFrame Failed to feed frame to NvVideoEncoder
Jul 23 09:45:35 tegra-ubuntu camera_driver_node[9975]: [23192268069] Module_id 81 Severity 2 : ValidateTaskStatusArray numInputTaskStatus should be less than NVVIDEO_IEP_MAX_IN_TASKSTATUS
Jul 23 09:45:35 tegra-ubuntu camera_driver_node[9975]: [23192270278] Module_id 81 Severity 2 : NvVideoEncodeFeedFrameForTEGRAV1 ValidateTaskStatusArray failed in IEP FeedFrame
Jul 23 09:45:35 tegra-ubuntu camera_driver_node[9975]: [23192270590] Module_id 42 Severity 2 : NvMediaIEPFeedFrame Failed to feed frame to NvVideoEncoder
Jul 23 09:45:35 tegra-ubuntu camera_driver_node[9975]: [23195393517] Module_id 24 Severity 2 : sNvMSetNvSciSyncPreFenceWithTaskSlot Failed to set PreFence as the Max preFences are set already
Jul 23 09:45:35 tegra-ubuntu camera_driver_node[9975]: [23198518181] Module_id 24 Severity 2 : sNvMSetNvSciSyncPreFenceWithTaskSlot Failed to set PreFence as the Max preFences are set already
Jul 23 09:45:35 tegra-ubuntu camera_driver_node[9975]: [23201643323] Module_id 24 Severity 2 : sNvMSetNvSciSyncPreFenceWithTaskSlot Failed to set PreFence as the Max preFences are set already
Jul 23 09:45:35 tegra-ubuntu camera_driver_node[9975]: [23204771224] Module_id 24 Severity 2 : sNvMSetNvSciSyncPreFenceWithTaskSlot Failed to set PreFence as the Max preFences are set already

As best I can tell, the error messages about max prefences is because prefences are only cleared on a successful call to NvMediaIEPFeedFrame(). So because many of those calls have failed, we have been adding prefences that are not getting cleared. One question would be if there is some method to clear these prefences so that 16 failed calls to NvMediaIEPFeedFrame() don’t corrupt the state of the NvMediaIEP instance?

The more important question is, can Nvidia help determine any root cause for what those error messages about job submission might mean and if there are any ways we can determine how the encoder got into this state where all calls to NvMediaIEPFeedFrame() are failing?

Thank you.

2024-07-23.log (14.4 KB)

Dear @jmanning2,
what is the return status from the NvMediaIEPFeedFrame ? Is it NVMEDIA_STATUS_ERROR ?

could you some more details about the use case or application pipeline to understand the route cause of the issue?

I believe the initial error codes are NVMEDIA_STATUS_BAD_PARAMETER followed by NVMEDIA_STATUS_NOT_SUPPORTED once we’ve reached the max number of prefences.

As far as our application, we’re using NvSIPL to read images: ICP/ISP0 buffers are read on CPU, ISP1/ISP2 buffers are passed to NvMediaIEP for video encoding.

Here’s some additional debugging info from our application logs:

WARN notification_type=NOTIF_WARN_ICP_FRAME_DROP
WARN notification_type=NOTIF_WARN_ICP_FRAME_DROP
WARN notification_type=NOTIF_WARN_ICP_FRAME_DROP
WARN [ISP0] Failed to get image: NVSIPL_STATUS_TIMED_OUT, current queue count: 0
WARN [ICP] Failed to get image: NVSIPL_STATUS_TIMED_OUT, current queue count: 0
WARN notification_type=NOTIF_WARN_ICP_FRAME_DROP
WARN notification_type=NOTIF_WARN_ICP_FRAME_DROP
WARN notification_type=NOTIF_WARN_ICP_FRAME_DROP
WARN [ISP0] Failed to get image: NVSIPL_STATUS_TIMED_OUT, current queue count: 0
WARN [ICP] Failed to get image: NVSIPL_STATUS_TIMED_OUT, current queue count: 0
WARN notification_type=NOTIF_WARN_ICP_FRAME_DROP
WARN notification_type=NOTIF_WARN_ICP_FRAME_DROP
NvRmStream: Channel submission failed (err=196623)
NvRmStream: Flush failed (err=196623)
NVENC_H265: Stream flush failed
ERROR [ISP2] FeedFrame() failed with: NVMEDIA_STATUS_BAD_PARAMETER
NvRmStream: Channel submission failed (err=196623)
NvRmStream: Flush failed (err=196623)
NVENC_H265: Stream flush failed
ERROR [ISP2] FeedFrame() failed with: NVMEDIA_STATUS_BAD_PARAMETER
NvRmStream: Channel submission failed (err=196623)
NvRmStream: Flush failed (err=196623)
NVENC_H265: Stream flush failed
ERROR [ISP2] FeedFrame() failed with: NVMEDIA_STATUS_BAD_PARAMETER
NvRmStream: Channel submission failed (err=196623)
NvRmStream: Flush failed (err=196623)
NVENC_H265: Stream flush failed
ERROR [ISP2] FeedFrame() failed with: NVMEDIA_STATUS_BAD_PARAMETER
NvRmStream: Channel submission failed (err=196623)
NvRmStream: Flush failed (err=196623)
NVENC_H265: Stream flush failed
ERROR [ISP2] FeedFrame() failed with: NVMEDIA_STATUS_BAD_PARAMETER
NvRmStream: Channel submission failed (err=196623)
NvRmStream: Flush failed (err=196623)
NVENC_H265: Stream flush failed
ERROR [ISP2] FeedFrame() failed with: NVMEDIA_STATUS_BAD_PARAMETER
NvRmStream: Channel submission failed (err=196623)
NvRmStream: Flush failed (err=196623)
NVENC_H265: Stream flush failed
ERROR [ISP2] FeedFrame() failed with: NVMEDIA_STATUS_BAD_PARAMETER
NvRmStream: Channel submission failed (err=196623)
NvRmStream: Flush failed (err=196623)
NVENC_H265: Stream flush failed
ERROR [ISP2] FeedFrame() failed with: NVMEDIA_STATUS_BAD_PARAMETER
ERROR [ISP2] FeedFrame() failed with: NVMEDIA_STATUS_BAD_PARAMETER
ERROR [ISP2] FeedFrame() failed with: NVMEDIA_STATUS_BAD_PARAMETER
ERROR [ISP2] FeedFrame() failed with: NVMEDIA_STATUS_BAD_PARAMETER
ERROR [ISP2] FeedFrame() failed with: NVMEDIA_STATUS_BAD_PARAMETER
ERROR [ISP2] FeedFrame() failed with: NVMEDIA_STATUS_BAD_PARAMETER
ERROR [ISP2] FeedFrame() failed with: NVMEDIA_STATUS_BAD_PARAMETER
ERROR [ISP2] FeedFrame() failed with: NVMEDIA_STATUS_BAD_PARAMETER
ERROR [ISP2] FeedFrame() failed with: NVMEDIA_STATUS_BAD_PARAMETER
ERROR [ISP2] Set encoder pre-fence failed with: NVMEDIA_STATUS_NOT_SUPPORTED
ERROR [ISP2] Set encoder pre-fence failed with: NVMEDIA_STATUS_NOT_SUPPORTED
ERROR [ISP2] Set encoder pre-fence failed with: NVMEDIA_STATUS_NOT_SUPPORTED

Dear @jmanning2,
Is it ok to use DW recorder for your usecase?. It fetches camera data and stores in raw/lraw/h264/h265/mp4 formats.

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