Platform: Xavier
Jetpack: 4.2 (stuck on 4.2 for the moment because of camera driver support)
Camera: IMX577 (Leopard Imaging)
(Note: I have included a sample program to replicate my issue, attached. It can be copied to tegra_multimedia_api/argus/samples. Just edit tegra_multimedia_api/argus/CMakeLists.txt to include the samples/argus_multi_fifo directory.)
Our application stitches images from several cameras in real time on the Xavier.
I recently changed our Argus camera configuration code to use EGL_STREAM_MODE_FIFO instead of the default Mailbox mode, and it has started to hang in waitForIdle()
Old code:
iEGLStreamSettings->setMode(Argus::EGL_STREAM_MODE_MAILBOX);
New code:
iEGLStreamSettings->setMode(Argus::EGL_STREAM_MODE_FIFO);
iEGLStreamSettings->setFifoLength(2);
I then launch repeat captures:
iCaptureSession->repeat(myrequest.get());
Later, I stop the repeat captures. Ever since I set the EGL stream mode to FIFO, my code seems to hang in the call to ICapture::waitForIdle() while stopping the cameras. I have several capture sessions, and it doesn’t always seem to hang on the first one.
iCaptureSession->stopRepeat();
iCaptureSession->waitForIdle();
If I wait long enough, the attached program generates the following error messages:
Stopping Camera 0:
(Argus) Error Timeout: (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 87)
Stopping Camera 1
(Argus) Error Timeout: (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 87)
Followed by:
(Argus) Error FileOperationFailed: Failed socket read: Connection reset by peer (in src/rpc/socket/common/SocketUtils.cpp, function readSocket(), line 79)
(Argus) Error FileOperationFailed: Unexpected error in reading socket (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 266)
(Argus) Error FileOperationFailed: Receive worker failure, notifying 3 waiting threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 340)
(Argus) Error InvalidState: Argus client is exiting with 3 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 357)
(Argus) Error FileOperationFailed: Receiving thread terminated with error (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadWrapper(), line 368)
(Argus) Error FileOperationFailed: Client thread received an error from socket (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 145)
(Argus) Error FileOperationFailed: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 87)
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 96)
(Argus) Error InvalidState: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 87)
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 96)
(Argus) Error InvalidState: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 87)
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 96)
(Argus) Error InvalidState: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 87)
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 96)
(Argus) Error InvalidState: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 87)
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 96)
(Argus) Error InvalidState: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 87)
Based on the attached source code, is there anything I need to ensure before I call waitForIdle()?
Note: the code is hard-coded to grab the first sensor mode and run at 30 fps. You may need to modify it to match your camera capabilities.
argus_multi_fifo.tar.gz (3.97 KB)