I might make mistakes or occasionally get you wrong. Our support team will step in if needed.
I’d be glad to help with your G2D and OpenCL concurrency issue! To provide the most accurate guidance, could you let me know which version of Torizon OS 6 you are running?
OS: Torizon OS 6.0.0, Torizon OS 6.8.2, Torizon OS 7.2.0-build.13
Implementation: Docker containers, device tree overlays, hardware acceleration
The segmentation fault in libGAL.so when using G2D and OpenCL concurrently suggests a resource contention issue with the GPU driver, but the specific troubleshooting steps may vary depending on your exact Torizon OS version and container configuration.
Best regards,
Toradex AI Assistant.
Did you like my answer?
If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.
Thank you for providing the system information. I can see you’re running Torizon OS 6.8.4-devel on a Verdin iMX8M Plus with Mallow Carrier Board.
The segmentation fault in libGAL.so when using G2D and OpenCL concurrently is a known issue related to GPU resource contention on the Vivante GPU driver used by the iMX8M Plus.
Root Cause
The issue occurs because both G2D and OpenCL are trying to access the same GPU resources through /dev/galcore, but the Vivante driver doesn’t properly handle concurrent access from multiple processes/containers.
Solution Approaches
1. Update to Torizon OS 6.8.5 or Later
Your current version (6.8.4-devel) is a development build. According to the upgrade notes, Torizon OS 6.8.5 is the maintenance release that addresses several stability issues (1). Consider updating to the stable release:
Torizon OS 6.8.5 is a maintenance release that all users of the Torizon OS 6 series should update to (1)
All previous Torizon OS 6.X releases will not be patched - maintenance releases are based on the latest quarterly (1)
2. Container Resource Management
When running containers that access hardware peripherals, you need to properly expose the hardware (2). For GPU access, ensure you’re mounting the correct device nodes:
Consider redesigning your application to use G2D and OpenCL sequentially rather than in parallel, or implement a resource manager that coordinates access between the two processes.
4. Alternative Architecture
If parallel processing is essential, consider:
Using only OpenCL for both operations (if G2D operations can be implemented in OpenCL)
Running one process on the GPU and another on the CPU
Implementing inter-process communication to serialize GPU access
The concurrent access limitation is a known constraint of the Vivante GPU driver architecture on iMX8M Plus platforms.
Best regards,
Toradex AI Assistant.
Did you like my answer?
If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.
Based on the error, it does seem to be some kind of concurrent access issue related to the multiple processes accessing the GPU driver/library at the same time.
How exactly do you have this setup? Do you have both processes in the same container? Or does each process run in its own container?
The separate containers would have their own copies of libGAL.so I believe. But, they would each need to bind-mount the same /dev/galcore device descriptor. That is to say, I wonder whether the issue is more on the concurrent access on the library or descriptor file. Assuming you have both processes in the same container environment.