Thanks. I found the sample. I have tried to run it on the DriveAGX and I get the follwoing output:
Producer:
$ ./nvscistream_sample -p nvscistream_0
NvMedia producer created
Producer channel created
Query max number of sync objects allowed: 4.
Number of waiter sync objects: 1.
========================= Producer Connection setup =========================
Connecting over Ipc... waiting for consumer connection
Producer channel connected
========================================= ==================================================
========================= Producer Sync requirement setup =========================
Producer creates NvSciSync attributes:
Create signaler's sync attribute list.
Set nvmedia-signaler attribute value.
Create waiter's sync attribute list.
Set nvmedia-waiter attribute value.
Producer sends sync attribute to producer:
Send waiter's sync object requirement.
========================================= ==================================================
========================= Producer Packet requirement setup =========================
Producer creates NvSciBuf attributes:
Create NvSciBuf attribute list of element 0.
Set attribute value of element 0.
Producer sends packet requirements to the pool:
Send the number of elements per packet to the pool, 1.
Send buffer attributes of element 0.
========================================= ==================================================
========================= Producer finalize requirements and map resources =========================
Pool + Producer receive packet and resource requirements.
and process them once all are received
Receive waiter's sync object requirement.
Producer received producer attributes
Common: Reconcile its signaler attributes and the reveived waiter attributes.
Common: Create NvSciSync object 0 with the reconciled attribute list.
Producer reconciled producer attributes and creates sync object:
sending sync objects to consumer...
Send number of sync objects, 1.
Send sync object 0.
Pool Receives number of elements per packet from producer: 1.
Receive the number of sync objects, 1.
Pool Receives number of elements per packet from consumer: 1.
Receive sync object 0.
Pool Receives packet capabilities of element 0 from producer.
Pool Receives packet requirements of element 0 from consumer.
Pool received all prod / cons packet Attrs
Query max number of elements per packet allowed: 4.
Determine the number of elements per packet: 1.
Reconcile producer's and consumer's attribute lists of element 0.
Send the reconciled attribute list of element 0 to producer and consumer.
Pool creates a new packet 0:
Create buffer object of element 0 with the reconciled attribute list.
Assign pool cookie 1 to the packet, and
send this new packet (handle = fffffffffffffffe) to producer and consumer.
Send buffer object of element 0 to producer and consumer.
Pool creates a new packet 1:
Create buffer object of element 0 with the reconciled attribute list.
Assign pool cookie 2 to the packet, and
send this new packet (handle = fffffffffffffffd) to producer and consumer.
Send buffer object of element 0 to producer and consumer.
Pool creates a new packet 2:
Create buffer object of element 0 with the reconciled attribute list.
Assign pool cookie 3 to the packet, and
send this new packet (handle = fffffffffffffffc) to producer and consumer.
Send buffer object of element 0 to producer and consumer.
Pool creates a new packet 3:
Create buffer object of element 0 with the reconciled attribute list.
Assign pool cookie 4 to the packet, and
send this new packet (handle = fffffffffffffffb) to producer and consumer.
Send buffer object of element 0 to producer and consumer.
Receive the number of elements per packet from pool: 1.
Received PacketStatus (cookie = 1) from consumer, total received = 1.
Receive reconciled attributes of element0from pool.
Received PacketStatus (cookie = 2) from consumer, total received = 2.
Receive a new packet (handle = fffffffffffffffe),
1 packet(s) received.
Assign cookie c00c1e5 to the packet (handle = 0x43e560).
Received PacketStatus (cookie = 1) from producer, total received = 1.
Receive buffer object of element 0.
Received PacketStatus (cookie = 3) from consumer, total received = 3.
Receive a new packet (handle = fffffffffffffffd),
2 packet(s) received.
Assign cookie c00c1e6 to the packet (handle = 0x43e5a8).
Received PacketStatus (cookie = 2) from producer, total received = 2.
Receive buffer object of element 0.
Received PacketStatus (cookie = 4) from consumer, total received = 4.
Receive a new packet (handle = fffffffffffffffc),
3 packet(s) received.
Assign cookie c00c1e7 to the packet (handle = 0x43e5f0).
Received PacketStatus (cookie = 3) from producer, total received = 3.
Receive buffer object of element 0.
Received ElementStatus (cookie = 1, idx = 0) from consumer, total received = 1.
Receive a new packet (handle = fffffffffffffffb),
4 packet(s) received.
Assign cookie c00c1e8 to the packet (handle = 0x43e638).
Producer receives consumer's sync object:
Producer initializes NvSciSyncFence:
Producer maps buffer objects:
Producer Mapping element: 0 of cookie c00c1e5.
Accept elements in packet (handle = fffffffffffffffe).
Producer Mapping element: 0 of cookie c00c1e6.
Accept elements in packet (handle = fffffffffffffffd).
Producer Mapping element: 0 of cookie c00c1e7.
Accept elements in packet (handle = fffffffffffffffc).
Producer Mapping element: 0 of cookie c00c1e8.
[ERROR: NvSciBufObjDup]: Bad parameter supplied to NvSciBufObjDup
[ERROR: NvSciBufObjDup]: bufObj: (nil), dupObj: 0x43e788
/dvs/git/dirty/git-master_linux/tests/nvsci/nvscistream/sample_app/nvmedia_producer.cpp (84), mapBuffers: NvSci error 100
Consumer:
$ ./nvscistream_sample -c nvscistream_1 -q 1
CUDA Consumer Created
Consumer channel created
Query max number of sync objects allowed: 4.
Number of waiter sync objects: 1.
========================= Consumer Connection setup =========================
Connecting over Ipc... waiting for producer connection
Consumer channel connected
========================= Consumer Sync requirement setup =========================
Consumer creates NvSciSync attributes:
Create signaler's sync attribute list.
Set CUDA-signaler attribute value.
Create waiter's sync attribute list.
Set CUDA-waiter attribute value.
Consumer sends sync attribute to producer:
Send waiter's sync object requirement.
========================================= ==================================================
========================= Consumer Packet requirement setup =========================
Consumer creates NvSciBuf attributes:
Create NvSciBuf attribute list of element 0.
Set attribute value of element 0.
Consumer sends packet requirements to the pool:
Send the number of elements per packet to the pool, 1.
Send buffer attributes of element 0.
========================================= ==================================================
========================= Consumer finalize requirements and map resources =========================
Receive waiter's sync object requirement.
Consumer received producer attributes
Common: Reconcile its signaler attributes and the reveived waiter attributes.
Common: Create NvSciSync object 0 with the reconciled attribute list.
Consumer reconciled producer attributes and creates sync object:
sending sync objects to producer...
Send number of sync objects, 1.
Send sync object 0.
Receive the number of sync objects, 1.
Receive sync object 0.
Receive the number of elements per packet from pool: 1.
Receive reconciled attributes of element0from pool.
Receive a new packet (handle = 18446744073709551614),
1 packet(s) received.
Assign cookie c00c1e5 to the packet (handle = 0x43e340).
Receive buffer object of element 0.
Receive a new packet (handle = fffffffffffffffd),
2 packet(s) received.
Assign cookie c00c1e6 to the packet (handle = 0x43e388).
Receive buffer object of element 0.
Receive a new packet (handle = fffffffffffffffc),
3 packet(s) received.
Assign cookie c00c1e7 to the packet (handle = 0x43e3d0).
Receive buffer object of element 0.
Receive a new packet (handle = fffffffffffffffb),
4 packet(s) received.
Assign cookie c00c1e8 to the packet (handle = 0x43e418).
Consumer maps sync objects:
Consumer initializes NvSciSyncFence:
Consumer maps buffer objects:
Consumer Mapping element: 0 of cookie c00c1e5.
Accept elements in packet (handle = fffffffffffffffe).
Consumer Mapping element: 0 of cookie c00c1e6.
Accept elements in packet (handle = fffffffffffffffd).
Consumer Mapping element: 0 of cookie c00c1e7.
Accept elements in packet (handle = fffffffffffffffc).
Consumer Mapping element: 0 of cookie c00c1e8.
[ERROR: NvSciBufObjGetAttrList]: Bad parameter supplied to NvSciBufObjGetAttrList
[ERROR: NvSciBufObjGetAttrList]: bufObj: (nil), bufAttrList: 0x7ff72208a8
/dvs/git/dirty/git-master_linux/tests/nvsci/nvscistream/sample_app/cuda_consumer.cpp (70), mapBuffers: NvSci error 100
So it seems the message passing works but there happens an error at the end. Futhermore, if I try to run the sample again I do get the following error messages.
Producer:
$ ./nvscistream_sample -p nvscistream_0
!err[L:81]:nvsciipc_ipc_check_end: pid not 0, but process doesn't exist, (pid:2576)
!err[L:614]:nvsciipc_ipc_open_endpoint: init resources is failed: 256
!err[L:286]:NvSciIpcOpenEndpoint: Failed to open nvsciipc [INTER_PROCESS] endpoint: 256
/dvs/git/dirty/git-master_linux/tests/nvsci/nvscistream/sample_app/channel_producer.cpp (56), initIpc: NvSci error 100
Consumer:
$ ./nvscistream_sample -c nvscistream_1 -q 1
!err[L:81]:nvsciipc_ipc_check_end: pid not 0, but process doesn't exist, (pid:2577)
!err[L:614]:nvsciipc_ipc_open_endpoint: init resources is failed: 256
!err[L:286]:NvSciIpcOpenEndpoint: Failed to open nvsciipc [INTER_PROCESS] endpoint: 256
/dvs/git/dirty/git-master_linux/tests/nvsci/nvscistream/sample_app/channel_consumer.cpp (52), initIpc: NvSci error 100
Appearently the channel is broken in some way and won’t work until the system has been rebooted. I assume this is not the expected behavior of this sample. Does somebody have a hint where I should start to look for the error?