[BUG] sample_cgf_dwchannel custom datatypes failed with DW_NOT_AVAILABLE in inter-process-socket-custom

Required Info:

  • Software Version
    DRIVE OS 6.0.6
  • Target OS
    Linux
  • SDK Manager Version
    1.9.2.10884
  • Host Machine Version
    native Ubuntu Linux 20.04 Host installed with DRIVE OS DOCKER Containers

Describe the bug

running test program failed in developing custom channel data types.

To Reproduce

the code of dwchannel_test is derived from sample_cgf_dwchannel and can be read in https://github.com/ZhenshengLee/nv_driveworks_demo/blob/fea/channel/modules/common/cgf_channel/tools/dwchannel_test.cpp

./dwchannel_test --cons=1 --prod=1 --downstreams=1 --dataType=custom

Expected behavior

the same as what sample_cgf_dwchannel --cons=1 --prod=1 --downstreams=1 --dataType=custom do.

Actual behavior

nvidia@tegra-ubuntu:~/zhensheng/orin_ws/nv_driveworks_demo/target/aarch64/install/bin/common_cgf_channel$ ./dwchannel_test --cons=1 --prod=1 --downstreams=1 --dataType=custom
Creating channel with dataType: custom
[11-07-2023 13:34:31] Platform: Detected Drive Orin P3710
[11-07-2023 13:34:31] TimeSource: monotonic epoch time offset is 1688958463806737
[11-07-2023 13:34:31] TimeSourceVibranteLinux: detect valid PTP interface mgbe2_0
[11-07-2023 13:34:31] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to mgbe2_0
[11-07-2023 13:34:31] PTP Time is available from Eth Driver
[11-07-2023 13:34:31] Adding variable DW_Base:DW_Version
[11-07-2023 13:34:31] Added variable DW_Base:DW_Version
[11-07-2023 13:34:31] Platform: number of GPU devices detected 1
[11-07-2023 13:34:31] Platform: currently selected GPU device 0, Resource Data Dir: trt_08_05_10_03, Arch: ga10b
[11-07-2023 13:34:31] Platform: currently selected GPU device integrated ID 0
[11-07-2023 13:34:31] CUDLAEngine:getDLACount: CUDLA version is = 1003000
[11-07-2023 13:34:31] CUDLAEngine:getDLACount: Number of DLA devices = 2
[11-07-2023 13:34:31] Context::mountResourceCandidateDataPath resource FAILED to mount from './resources': VirtualFileSystem: Failed to mount './resources/resources.pak'
[11-07-2023 13:34:31] Context::mountResourceCandidateDataPath resource FAILED to mount from '/home/nvidia/zhensheng/orin_ws/nv_driveworks_demo/target/aarch64/install/bin/common_cgf_channel/data': VirtualFileSystem: Failed to mount '/home/nvidia/zhensheng/orin_ws/nv_driveworks_demo/target/aarch64/install/bin/common_cgf_channel/data/resources.pak'
[11-07-2023 13:34:31] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks/data
[11-07-2023 13:34:31] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks/data': VirtualFileSystem: Failed to mount '/usr/local/driveworks/data/resources.pak'
[11-07-2023 13:34:31] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks-5.10/data
[11-07-2023 13:34:31] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks-5.10/data': VirtualFileSystem: Failed to mount '/usr/local/driveworks-5.10/data/resources.pak'
[11-07-2023 13:34:31] Context::findResourcesPackageInPathWalk: Could not find ./resources/resources.pak in upto 7 parent directories from /usr/local/driveworks/lib/libdw_base.so.5.10
[11-07-2023 13:34:31] Context::findResourcesPackageInPathWalk: Could not find ./resources/resources.pak in upto 7 parent directories from /usr/local/driveworks-5.10/targets/aarch64-Linux/lib/libdw_base.so.5.10
[11-07-2023 13:34:31] SDK: No resources(.pak) mounted, some modules will not function properly
[11-07-2023 13:34:31] egl::Display: found 1 EGL devices
[11-07-2023 13:34:31] egl::Display: use drm device: drm-nvdc
[11-07-2023 13:34:31] TimeSource: monotonic epoch time offset is 1688958463806737
[11-07-2023 13:34:31] TimeSourceVibranteLinux: detect valid PTP interface mgbe2_0
[11-07-2023 13:34:31] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to mgbe2_0
[11-07-2023 13:34:31] PTP Time is available from Eth Driver
[11-07-2023 13:34:31] Initialize DriveWorks SDK v5.10.87
[11-07-2023 13:34:31] Release build with GNU 9.3.0 from buildbrain-branch-0-g9a5b4670e12 against Drive PDK v6.0.6.0
Creating channel with parameters: role=consumer,type=SOCKET,ip=127.0.0.1,id=40002,timeout=1000,fifo-size=4
[11-07-2023 13:34:31] ChannelSocket Consumer created to connect with Server127.0.0.1:40002
[11-07-2023 13:34:31] Add consumer[0]: role=consumer,type=SOCKET,ip=127.0.0.1,id=40002,timeout=1000,fifo-size=4, current consumer list size: 0
Creating channel with parameters: role=producer,type=SOCKET,ip=127.0.0.1,id=40002,num-clients=1,producer-fifo=1,fifo-size=4,timeout=1000
[11-07-2023 13:34:31] ChannelSocket Producer @ port:40002, BlockingConnectionCount=1
[11-07-2023 13:34:31] Driveworks exception thrown: DW_NOT_AVAILABLE: ChannelFactory makePacket: requested signature not registered id: 1024 channel type: 3
terminate called after throwing an instance of 'std::runtime_error'
  what():  DW Error DW_NOT_AVAILABLE executing DW function:
 m_outputPort->bindChannel(m_outputChannel.get())
 at /gw_demo/modules/common/cgf_channel/tools/dwchannel_test.cpp:381
Aborted (core dumped)

Additional context

I think there is no obvious difference between dwchannel_test.cpp and driverorks-5.10/samples/src/dwchannel/main.cpp, but the behavior is really strange. Hope that the forum helps. Thanks.

Dear @lizhensheng,
there is no obvious difference between dwchannel_test.cpp and driverorks-5.10/samples/src/dwchannel/main.cpp , but the behavior is really strange

Is the original sample working?

the original sample works with custom data type.
But I don’t see any difference between the codes from both side. Could you help to check with the code?

nvidia@tegra-ubuntu:~/zhensheng/orin_ws/nv_driveworks_demo/target/aarch64/install/bin/common_cgf_channel$ ./sample_cgf_dwchannel --cons=1 --prod=1 --downstreams=1 --dataType=custom
[12-07-2023 02:00:40] Platform: Detected Drive Orin P3710
[12-07-2023 02:00:40] TimeSource: monotonic epoch time offset is 1688958463806737
[12-07-2023 02:00:40] TimeSourceVibranteLinux: detect valid PTP interface mgbe2_0
[12-07-2023 02:00:40] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to mgbe2_0
[12-07-2023 02:00:40] PTP Time is available from Eth Driver
[12-07-2023 02:00:40] Adding variable DW_Base:DW_Version
[12-07-2023 02:00:40] Added variable DW_Base:DW_Version
[12-07-2023 02:00:40] Platform: number of GPU devices detected 1
[12-07-2023 02:00:40] Platform: currently selected GPU device 0, Resource Data Dir: trt_08_05_10_03, Arch: ga10b
[12-07-2023 02:00:40] Platform: currently selected GPU device integrated ID 0
[12-07-2023 02:00:40] CUDLAEngine:getDLACount: CUDLA version is = 1003000
[12-07-2023 02:00:40] CUDLAEngine:getDLACount: Number of DLA devices = 2
[12-07-2023 02:00:40] Context::mountResourceCandidateDataPath resource FAILED to mount from './resources': VirtualFileSystem: Failed to mount './resources/resources.pak'
[12-07-2023 02:00:40] Context::mountResourceCandidateDataPath resource FAILED to mount from '/home/nvidia/zhensheng/orin_ws/nv_driveworks_demo/target/aarch64/install/bin/common_cgf_channel/data': VirtualFileSystem: Failed to mount '/home/nvidia/zhensheng/orin_ws/nv_driveworks_demo/target/aarch64/install/bin/common_cgf_channel/data/resources.pak'
[12-07-2023 02:00:40] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks/data
[12-07-2023 02:00:40] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks/data': VirtualFileSystem: Failed to mount '/usr/local/driveworks/data/resources.pak'
[12-07-2023 02:00:40] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks-5.10/data
[12-07-2023 02:00:40] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks-5.10/data': VirtualFileSystem: Failed to mount '/usr/local/driveworks-5.10/data/resources.pak'
[12-07-2023 02:00:40] Context::findResourcesPackageInPathWalk: Could not find ./resources/resources.pak in upto 7 parent directories from /usr/local/driveworks/lib/libdw_base.so.5.10
[12-07-2023 02:00:40] Context::findResourcesPackageInPathWalk: Could not find ./resources/resources.pak in upto 7 parent directories from /usr/local/driveworks-5.10/targets/aarch64-Linux/lib/libdw_base.so.5.10
[12-07-2023 02:00:40] SDK: No resources(.pak) mounted, some modules will not function properly
[12-07-2023 02:00:40] egl::Display: found 1 EGL devices
[12-07-2023 02:00:40] egl::Display: use drm device: drm-nvdc
[12-07-2023 02:00:40] TimeSource: monotonic epoch time offset is 1688958463806737
[12-07-2023 02:00:40] TimeSourceVibranteLinux: detect valid PTP interface mgbe2_0
[12-07-2023 02:00:40] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to mgbe2_0
[12-07-2023 02:00:40] PTP Time is available from Eth Driver
[12-07-2023 02:00:40] Initialize DriveWorks SDK v5.10.87
[12-07-2023 02:00:40] Release build with GNU 9.3.0 from buildbrain-branch-0-g9a5b4670e12 against Drive PDK v6.0.6.0
Creating channel with parameters: role=consumer,type=SOCKET,ip=127.0.0.1,id=40002,timeout=1000,fifo-size=4
[12-07-2023 02:00:40] ChannelSocket Consumer created to connect with Server127.0.0.1:40002
[12-07-2023 02:00:40] Add consumer[0]: role=consumer,type=SOCKET,ip=127.0.0.1,id=40002,timeout=1000,fifo-size=4, current consumer list size: 0
Creating channel with parameters: role=producer,type=SOCKET,ip=127.0.0.1,id=40002,num-clients=1,producer-fifo=1,fifo-size=4,timeout=1000
[12-07-2023 02:00:40] ChannelSocket Producer @ port:40002, BlockingConnectionCount=1
[12-07-2023 02:00:40] Initializing server socket for port 40002
[12-07-2023 02:00:40] SocketServer: listening on 40002
[12-07-2023 02:00:40] Server socket initialized for port 40002 server = 187651436113376
[12-07-2023 02:00:40] Add producer[0]: role=producer,type=SOCKET,ip=127.0.0.1,id=40002,num-clients=1,producer-fifo=1,fifo-size=4,timeout=1000, current producer list size: 0
[12-07-2023 02:00:40] ChannelConnector: thread 281473132509440 starting producer and consumer connect threads 
[12-07-2023 02:00:40] ChannelConnector: started producer and consumer threads. producer tid=281472968431872, consumer tid=281472976824576
[12-07-2023 02:00:40] SocketClient: connected 127.0.0.1:40002
[12-07-2023 02:00:40] SocketServer(@port:40002): accepted 127.0.0.1:45561
[12-07-2023 02:00:40] Connection for port 40002 accepted; status=DW_SUCCESS(0)
[12-07-2023 02:00:40] Connection for port 40002 sent metadata
[12-07-2023 02:00:40] ChannelConnector: thread 281473132509440 stopping producer and consumer connect threads 
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:40] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
[12-07-2023 02:00:41] Sending 96 bytes on port 40002
Producer Send BandWidth: 0MB/s
Consumer Idx[0] Latency: 119us
Consumer Idx[0] Recv BandWidth: 0MB/s
[12-07-2023 02:00:41] Releasing Driveworks SDK Context

it’s really strange.

add_executable(dwchannel_test
    ./tools/dwchannel_test.cpp
    ./tools/ProgramArguments.cpp
    ./tools/Log.cpp
    # must add src with custom.cpp
    ${DWCGF_CHANNEL_FILES}
)

solves this issue.

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