Quick3D fails with software render backend - docker

When I run my Qt project inside a docker container with the environment variable Qt_quick_backend=software (possibly related to https://bugreports.qt.io/browse/QTBUG-102634), the application runs but does not display any QtQuick 3D object. If I remove the Qt_quick_backend environment variable, the application gives a OpenGL segmentation fault error. When the application runs outside the docker container, i.e., locally, it works.
I'm using Qt 6.2.3, C++, my OS is Ubuntu and the docker container is run with the following options: "xhost +local:",
"--net host",
"-e DISPLAY",
"-e QT_QUICK_BACKEND=software",
"-v /tmp/.X11-unix:/tmp/.X11-unix"
This is the OpenGL segmentation fault output:
qt.scenegraph.general: Using QRhi with backend OpenGL
Graphics API debug/validation layers: 0
QRhi profiling and debug markers: 0
Shader/pipeline cache collection: 0
qt.scenegraph.general: threaded render loop
qt.scenegraph.general: Using sg animation driver
qt.scenegraph.general: Animation Driver: using vsync: 16.67 ms
I20230212 20:19:57.865648 23643 workerthread.cpp:202] runLoop Time: 0
I20230212 20:19:57.865960 23643 workerthread.cpp:80] run: Loop running
qt.scenegraph.general: Using sg animation driver
qt.scenegraph.general: Animation Driver: using vsync: 16.67 ms
qt.rhi.general: Created OpenGL context QSurfaceFormat(version 4.1, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 0, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 1, colorSpace QColorSpace(), profile QSurfaceFormat::CompatibilityProfile)
qt.rhi.general: OpenGL VENDOR: VMware, Inc. RENDERER: SVGA3D; build: RELEASE; LLVM; VERSION: 4.1 (Compatibility Profile) Mesa 21.2.6
qt.scenegraph.general: MSAA sample count for the swapchain is 1. Alpha channel requested = no.
qt.scenegraph.general: rhi texture atlas dimensions: 2048x2048
Segmentation fault (core dumped)
I'm expecting my Qt Project to display correctly the QtQuick 3D Object (e.g. View3D QML Type) inside a docker container.

Related

headless chrome in docker container, visit chrome://gpu , Error: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER

I am trying to use GPU in chrome headless(version: Google Chrome 102.0.5005.61) mode in docker container.Bug get next Error:
exec cmd in container:
start container:
docker run --gpus all --name centos-chrome-gpu1 -it centos-chrome-gpu:v1 /bin/bash
exec cmd in container to detect gpu:
chrome --headless --no-sandbox --enable-features=Vulkan,UseSkiaRenderer --use-vulkan=native --enable-unsafe-webgpu --enable-logging --disable-vulkan-fallback-to-gl-for-testing --disable-vulkan-surface --use-angle=vulkan --print-to-pdf=out.pdf 'chrome://gpu'
got error:
[root#3298c3aaf37a data]# chrome --headless --no-sandbox --enable-features=Vulkan,UseSkiaRenderer --use-vulkan=native --enable-unsafe-webgpu --enable-logging --disable-vulkan-fallback-to-gl-for-testing --disable-vulkan-surface --use-angle=vulkan --print-to-pdf=out.pdf 'chrome://gpu'
[0529/064825.243304:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[0529/064825.244022:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[0529/064825.247593:WARNING:bluez_dbus_manager.cc(248)] Floss manager not present, cannot set Floss enable/disable.
[0529/064825.255679:ERROR:angle_platform_impl.cc(43)] RendererVk.cpp:127 (VerifyExtensionsPresent): Extension not supported: VK_KHR_surface
[0529/064825.256516:ERROR:angle_platform_impl.cc(43)] RendererVk.cpp:127 (VerifyExtensionsPresent): Extension not supported: VK_KHR_xcb_surface
[0529/064825.256673:ERROR:angle_platform_impl.cc(43)] Display.cpp:977 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-7): A requested extension is not supported, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1446.
[0529/064825.257420:ERROR:gl_surface_egl.cc(852)] EGL Driver message (Critical) eglInitialize: Internal Vulkan error (-7): A requested extension is not supported, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1446.
[0529/064825.257477:ERROR:gl_surface_egl.cc(1489)] eglInitialize Vulkan failed with error EGL_NOT_INITIALIZED
[0529/064825.257526:ERROR:gl_ozone_egl.cc(21)] GLSurfaceEGL::InitializeOneOff failed.
[0529/064825.263608:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[0529/064825.277845:ERROR:angle_platform_impl.cc(43)] RendererVk.cpp:127 (VerifyExtensionsPresent): Extension not supported: VK_KHR_surface
[0529/064825.277953:ERROR:angle_platform_impl.cc(43)] RendererVk.cpp:127 (VerifyExtensionsPresent): Extension not supported: VK_KHR_xcb_surface
[0529/064825.278040:ERROR:angle_platform_impl.cc(43)] Display.cpp:977 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-7): A requested extension is not supported, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1446.
[0529/064825.278129:ERROR:gl_surface_egl.cc(852)] EGL Driver message (Critical) eglInitialize: Internal Vulkan error (-7): A requested extension is not supported, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1446.
[0529/064825.278192:ERROR:gl_surface_egl.cc(1489)] eglInitialize Vulkan failed with error EGL_NOT_INITIALIZED
[0529/064825.278255:ERROR:gl_ozone_egl.cc(21)] GLSurfaceEGL::InitializeOneOff failed.
[0529/064825.279831:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[0529/064825.306604:WARNING:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process.
Warning: vkCreateInstance: Found no drivers!
Error: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER
at CheckVkSuccessImpl (../../third_party/dawn/src/dawn/native/vulkan/VulkanError.cpp:88)
at CreateVkInstance (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:361)
at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:235)
at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:165)
at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:420)
and gpu detect failed:
Graphics Feature Status
Canvas: Software only, hardware acceleration unavailable
Canvas out-of-process rasterization: Disabled
Direct Rendering Display Compositor: Disabled
Compositing: Software only. Hardware acceleration disabled
Multiple Raster Threads: Enabled
OpenGL: Disabled
Rasterization: Software only. Hardware acceleration disabled
Raw Draw: Disabled
Skia Renderer: Enabled
Video Decode: Software only. Hardware acceleration disabled
Video Encode: Software only. Hardware acceleration disabled
Vulkan: Disabled
WebGL: Software only, hardware acceleration unavailable
WebGL2: Software only, hardware acceleration unavailable
WebGPU: Software only, hardware acceleration unavailable
err2
Bug in host machine,it works well:
[root#ecs-aedd data]# chrome --headless --no-sandbox --enable-features=Vulkan,UseSkiaRenderer --use-vulkan=native --enable-unsafe-webgpu --enable-logging --disable-vulkan-fallback-to-gl-for-testing --disable-vulkan-surface --use-angle=vulkan --print-to-pdf=out.pdf 'chrome://gpu'
[0529/145105.116019:WARNING:bluez_dbus_manager.cc(248)] Floss manager not present, cannot set Floss enable/disable.
[0529/145105.892509:INFO:headless_shell.cc(660)] Written to file out.pdf.
and gpu detect is successful:
Graphics Feature Status
Canvas: Hardware accelerated
Canvas out-of-process rasterization: Disabled
Direct Rendering Display Compositor: Disabled
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
OpenGL: Enabled
Rasterization: Hardware accelerated
Raw Draw: Disabled
Skia Renderer: Enabled
Video Decode: Software only. Hardware acceleration disabled
Video Encode: Software only. Hardware acceleration disabled
Vulkan: Enabled
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
WebGPU: Hardware accelerated
succ2
How should I do to solve this to detect successfully in container?

How to use DNN OPENCL on AMD GPU?

On Windows 10, I want to use GPU as DNN backend to save CPU power. It works for Intel GPU, but there is problem on AMD GPU.
After I use setPreferableTarget(DNN_TARGET_OPENCL), the speed become very slow (much slower than DNN_TARGET_CPU).
I checked with task manager and saw all calculation is on CPU actually.
The following is some log.
[ INFO:0] global D:\work\opencv\opencv\modules\core\src\ocl.cpp (891)
cv::ocl::haveOpenCL Initialize OpenCL runtime...
OpenCV(ocl4dnn): consider to specify kernel configuration cache
directory via OPENCV_OCL4DNN_CONFIG_PATH parameter.
[ INFO:0] global D:\work\opencv\opencv\modules\core\src\ocl.cpp (433)
cv::ocl::OpenCLBinaryCacheConfigurator::OpenCLBinaryCacheConfigurator
Successfully initialized OpenCL cache directory:
C:\Users\wangq\AppData\Local\Temp\opencv\4.3\opencl_cache\
[ INFO:0] global D:\work\opencv\opencv\modules\core\src\ocl.cpp (457)
cv::ocl::OpenCLBinaryCacheConfigurator::prepareCacheDirectoryForContext
Preparing OpenCL cache configuration for context:
Advanced_Micro_Devices__Inc_--Baffin--2906_10
OpenCL program build log: dnn/dummy
Status -66: CL_INVALID_COMPILER_OPTIONS
-cl-no-subgroup-ifp -D AMD_DEVICE
Any help would be appreciated.

Arangodb container reaches memory limit and crashes while filtering using 'path' for graph traversal

My Environment
ArangoDB Version: 3.6.2
Storage Engine: RocksDB
Deployment Mode: Single Server
Deployment Strategy: Manual Start in Docker
Infrastructure: Own
Operating System: Linux version 4.4.0-154-generic (gcc version 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) )
Total RAM in your machine: 4GB
Disks in use: HDD
Used Package: Docker-Official Docker library
My Problem:
I have a graph with 60k nodes and 4*60k edges. Whenever I try using 'path' for Filter or Return, the memory limit reaches, arangodb container crashes and it gets restarted. However, if I don't use 'path' and use 'vertex' or 'edge' only for filter or return the query executes and produces result as expected. This issue is seen in version 3.6.2.
However, in arangodb 3.1.18 this issue is not seen and everything is
working fine.
Sample Query:
FOR v, e, p IN 6 OUTBOUND "root_node" GRAPH "my_graph_db"
FILTER (
LENGTH(p.edges) == 6 &&
LIKE (p.edges[3]._from,"Data_level_3%",true) &&
(LIKE (p.edges[3]._to, "Data_level_4%") || LIKE (p.edges[3]._to, "Data_4%")) &&
...................................................................
)
LIMIT 0,10
RETURN {
result: Merge(
{data: v},
{parent_id: p.edge[5]._id}
),
.................
}
Expected result:
The arangodb container should not reach memory limit crash. 'Path' attributes needs to accessed while doing queries.
Please refer to https://github.com/arangodb/arangodb/issues/11277

Beaglebone Black Latest Firmware Images U-Boot SPL 2018.01 not boot

I'm trying to flash Beaglebone back from element14 by step on Getting Started page , it can't flash or boot on sdcard on deabian 9.1 LXQT or 9.3 loT lasteset Firmware Image, but I can flash on Old Firmware debian7.5 from step
"dd if=/dev/mmcblk0 of=/dev/mmcblk1" on stackoverflow this page.
I use debug port, It show
U-Boot SPL 2018.01-00002-ge9ff418fb8 (Feb 20 2018 - 20:14:57)
Trying to boot from MMC1
U-Boot 2018.01-00002-ge9ff418fb8 (Feb 20 2018 - 20:14:57 -0600), Build: jenkins-github_Bootloader-Builder-38
CPU : AM335X-GP rev 2.1
I2C: ready
DRAM: 512 MiB
No match for driver 'omap_hsmmc'
No match for driver 'omap_hsmmc'
Some drivers were not found
Reset Source: Power-on reset has occurred.
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Using default environment
what should I do?
thanks you.
You may use the following procedure with your required images from https://beagleboard.org/latest-images
http://old.ghielectronics.com/community/forum/topic?id=23763

caffe powered and GPU enabled Microsoft Azure VM

I'm trying to build a VM for model training in Azure. I found this Data Science Virtual Machine for Linux (Ubuntu) VM which seems to be a suitable candidate.
Unfortunately, when I spun up the VM and installed the caffe prerequisites I wasn't able to run the tests. I'm getting the following error on make runtest (make all and make test were completed without errors):
NVIDIA: no NVIDIA devices found
Cuda number of devices: 0
Setting to use device 0
Current device id: 0
Current device name:
Note: Randomizing tests' orders with a seed of 97204 .
[==========] Running 2041 tests from 267 test cases.
[----------] Global test environment set-up.
[----------] 11 tests from AdaDeltaSolverTest/3, where TypeParam = caffe::GPUDevice<double>
[ RUN ] AdaDeltaSolverTest/3.TestAdaDeltaLeastSquaresUpdateWithHalfMomentum
NVIDIA: no NVIDIA devices found
E0715 02:24:32.097311 59355 common.cpp:114] Cannot create Cublas handle. Cublas won't be available.
NVIDIA: no NVIDIA devices found
E0715 02:24:32.103780 59355 common.cpp:121] Cannot create Curand generator. Curand won't be available.
F0715 02:24:32.103914 59355 test_gradient_based_solver.cpp:80] Check failed: error == cudaSuccess (30 vs. 0) unknown error
*** Check failure stack trace: ***
# 0x7f77a463f5cd google::LogMessage::Fail()
# 0x7f77a4641433 google::LogMessage::SendToLog()
# 0x7f77a463f15b google::LogMessage::Flush()
# 0x7f77a4641e1e google::LogMessageFatal::~LogMessageFatal()
# 0x7115e3 caffe::GradientBasedSolverTest<>::TestLeastSquaresUpdate()
# 0x7122af caffe::AdaDeltaSolverTest_TestAdaDeltaLeastSquaresUpdateWithHalfMomentum_Test<>::TestBody()
# 0x8e6023 testing::internal::HandleExceptionsInMethodIfSupported<>()
# 0x8df63a testing::Test::Run()
# 0x8df788 testing::TestInfo::Run()
# 0x8df865 testing::TestCase::Run()
# 0x8e0b3f testing::internal::UnitTestImpl::RunAllTests()
# 0x8e0e63 testing::UnitTest::Run()
# 0x466ecd main
# 0x7f77a111c830 __libc_start_main
# 0x46e589 _start
# (nil) (unknown)
Makefile:532: recipe for target 'runtest' failed
make: *** [runtest] Aborted (core dumped)
Is it possible to spin up a virtual machine in Azure suitable for GPU enabled machine learning using caffe?
All the details about the VM here
The Data Science Virtual Machine (DSVM) for Ubuntu already has Caffe installed in /opt/caffe. To use it on a GPU, create a VM with a K80 GPU by choosing the one of the NC sizes. (Be sure to choose HDD as the storage type, or the NC sizes will not appear.) Caffe will then be available out of the box.
Also note that PyCaffe is available. At a terminal:
source activate root
And python will then have PyCaffe available.

Resources