2152888_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2152888_en-US

2152888_en-US

RTSP server crash on i.MX8MP Verdin after 2 streams disconnect (EGL / libdrm / gstreamer issue)

Hello,

I am working on an RTSP streaming application running on a Toradex Verdin i.MX8MP module using the NXP Yocto BSP (imx-gpu-viv for EGL).
The application uses GStreamer with the NXP hardware-accelerated pipeline (vpuenc_h264) to serve multiple H.264 streams via gst-rtsp-server.

Issue:
When two or more RTSP clients are connected and two disconnect (one after the other), the application crashes inside eglTerminate() while tearing down the pipeline.
The backtrace shows that the crash happens inside drmFreeDevice() in libdrm, which is called indirectly from eglTerminate().
In GDB, the device pointer in drmFreeDevice sometimes contains a small integer value (e.g., 0x21) instead of a valid pointer, which triggers an invalid memory access.

The crash only occurs when using gldeinterlace (OpenGL-based deinterlacing) in the pipeline with glupload and gldownload. If I switch to CPU-based deinterlacing (deinterlace element), the crash does not happen. It uses DMABuf.

The application uses 4 cameras, and one client connects to one stream. 2 clients cannot connect to the same camera stream.
It seems to be related to GstGLDisplayEGL. This suggests that eglTerminate is being called with an already-freed or corrupted DRM device pointer, possibly due to improper cleanup of GPU resources in multi-stream scenarios.

In the images, you can see the backtrace for 2 clients disconnecting:

  • First client disconnects and there is one call for drmFreeDevice

1st_client_disconnect_1_call_drmFreeDevice.png

  • Second client disconnects and there are 2 calls for drmFreeDevice

2nd_client_disconnect_1st_call_drmFreeDevice.png

  

2nd_client_disconnect_2nd_call_drmFreeDevice.png



   


Graphics & DisplayRe: RTSP server crash on i.MX8MP Verdin after 2 streams disconnect (EGL / libdrm / gstreamer issue)

I found a workaround:
I set media reusable and shared. I used this commit that was missing from gstreamer1.0 tag 1.24.0
More info here

Re: RTSP server crash on i.MX8MP Verdin after 2 streams disconnect (EGL / libdrm / gstreamer issue)

Hello,

You need contact Toradex, since this not happens with the MX8MP EVK.

Regards

タグ(1)
評価なし
バージョン履歴
最終更新日:
‎11-21-2025 12:47 AM
更新者: