Summary: | Segfault when scanning faces | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Thomas Coquelin <totocoq> |
Component: | Faces-Detection | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | caulier.gilles, metzpinguin |
Priority: | NOR | Keywords: | drkonqi |
Version: | 7.0.0 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 7.2.0 | |
Sentry Crash Report: |
Description
Thomas Coquelin
2020-06-28 21:45:09 UTC
There is nothing at the crash point that should trigger a crash. Can you please create a new backtrace? Can you please post the output of "opencv_version --hw --opencl"? Can you also test whether the problem with the AppImage can be reproduced? From here: https://files.kde.org/digikam/ Maik My guess is that the crash in OpenCV is triggered by OpenCL hardware acceleration. You are using AMD hardware. OpenCV has an environment variable to disable OpenCL. Maik Hello, I tried digikam with OPENCV_OPENCL_RUNTIME=disabled and OPENCV_OPENCL_DEVICE=null env, face detection scan works to the end. I'll try to run some opencv opencl tests. I found this small python script to test opencv : #################################################" """ cpu_gpu.py An OpenCL-OpenCV-Python CPU vs GPU comparison """ import cv2 import timeit # A simple image pipeline that runs on both Mat and Umat def img_cal(img, mode): if mode=='UMat': img = cv2.UMat(img) img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) img = cv2.GaussianBlur(img, (7, 7), 1.5) img = cv2.Canny(img, 0, 50) if type(img) == 'cv2.UMat': img = cv2.UMat.get(img) return img # Timing function def run(processor, function, n_threads, N): cv2.setNumThreads(n_threads) t = timeit.timeit(function, globals=globals(), number=N)/N*1000 print('%s avg. with %d threads: %0.2f ms' % (processor, n, t)) return t img = cv2.imread('abricotier.tif') img_UMat = cv2.UMat(img) N = 200 threads = [1, 16] processor = {'GPU': "img_cal(img_UMat,mode='UMat')", 'CPU': "img_cal(img,mode='Mat')"} results = {} for n in threads: for pro in processor.keys(): results[pro,n] = run(processor=pro, function= processor[pro], n_threads=n, N=N) print('\nGPU speed increase over 1 CPU thread [%%]: %0.2f' % \ (results[('CPU', 1)]/results[('GPU', 1)]*100)) print('CPU speed increase on 16 threads versus 1 thread [%%]: %0.2f' % \ (results[('CPU', 1)]/results[('CPU', 16)]*100)) ##############################################################"" The script works properly : ############################# $ python3.7 opencv_test.py LoadLib(libhsa-amd-aqlprofile64.so) failed: libhsa-amd-aqlprofile64.so: cannot open shared object file: No such file or directory GPU avg. with 1 threads: 19.34 ms CPU avg. with 1 threads: 338.04 ms GPU avg. with 16 threads: 16.43 ms CPU avg. with 16 threads: 74.33 ms GPU speed increase over 1 CPU thread [%]: 1747.75 CPU speed increase on 16 threads versus 1 thread [%]: 454.77 ######################################### From the opencv test suite : Success : /usr/bin/opencv_test_aruco success /usr/bin/opencv_test_flann success /usr/bin/opencv_test_highgui success /usr/bin/opencv_test_img_hash success /usr/bin/opencv_test_phase_unwrapping success /usr/bin/opencv_test_saliency success /usr/bin/opencv_test_superres success /usr/bin/opencv_test_text success /usr/bin/opencv_test_videostab success Failures: /usr/bin/opencv_test_bgsegm failed /usr/bin/opencv_test_bioinspired failed /usr/bin/opencv_test_calib3d failed /usr/bin/opencv_test_core failed /usr/bin/opencv_test_dnn failed /usr/bin/opencv_test_dnn_superres failed /usr/bin/opencv_test_face failed /usr/bin/opencv_test_features2d failed /usr/bin/opencv_test_fuzzy failed /usr/bin/opencv_test_imgcodecs failed /usr/bin/opencv_test_imgproc failed /usr/bin/opencv_test_line_descriptor failed /usr/bin/opencv_test_ml failed /usr/bin/opencv_test_objdetect failed /usr/bin/opencv_test_optflow failed /usr/bin/opencv_test_photo failed /usr/bin/opencv_test_quality failed /usr/bin/opencv_test_reg failed /usr/bin/opencv_test_rgbd failed /usr/bin/opencv_test_shape failed /usr/bin/opencv_test_stereo failed /usr/bin/opencv_test_stitching failed /usr/bin/opencv_test_structured_light failed /usr/bin/opencv_test_tracking failed /usr/bin/opencv_test_video failed /usr/bin/opencv_test_videoio failed /usr/bin/opencv_test_ximgproc failed /usr/bin/opencv_test_xphoto failed Summary from opencv_test_core: [==========] 11420 tests from 239 test cases ran. (69132 ms total) [ PASSED ] 11416 tests. [ FAILED ] 4 tests, listed below: [ FAILED ] Core_InputOutput.filestorage_base64_basic_read_XML [ FAILED ] Core_InputOutput.filestorage_base64_basic_read_YAML [ FAILED ] Core_globbing.accuracy [ FAILED ] Samples.findFile I'll try to make them pass. Do you have hints on the relevant ones for digikam ? Git commit 365954a7c7dca0c46444b5843c7485602dd0e059 by Gilles Caulier. Committed on 08/07/2020 at 01:31. Pushed by cgilles into branch 'master'. disable opencl runtime support for OpenCV in AppImage M +5 -0 project/bundles/appimage/data/AppRun https://invent.kde.org/graphics/digikam/commit/365954a7c7dca0c46444b5843c7485602dd0e059 Git commit b66eb0a0556388fc532fcc5bba7a40ed6eda2fc1 by Maik Qualmann. Committed on 12/07/2020 at 06:58. Pushed by mqualmann into branch 'master'. disable OpenCL for everyone An analysis with Heaptrack shows that we have a big memory leak with active OpenCL. Related: bug 421043, bug 416266, bug 420411 M +10 -0 core/app/main/main.cpp M +0 -5 project/bundles/appimage/data/AppRun https://invent.kde.org/graphics/digikam/commit/b66eb0a0556388fc532fcc5bba7a40ed6eda2fc1 Hi, Can you check if this crash still exist with last weekly AppImage build available here : https://files.kde.org/digikam/ Thanks in advance digiKam 7.0.0 stable release is now published: https://www.digikam.org/news/2020-07-19-7.0.0_release_announcement/ We need a fresh feedback on this file using this version. Thanks in advance Gilles Caulier I tried with 7.0.0 and it now always crashes during face detection, with or without opencl (OPENCV_OPENCL_RUNTIME=disabled OPENCV_OPENCL_DEVICE=null to disable opencl) Git commit b5e3c5987a7380fdc5ce9a59ee5e62e6acbaf51b by Gilles Caulier. Committed on 08/09/2020 at 03:11. Pushed by cgilles into branch 'master'. Fix typo with OpenCV environnement variable value used to disable OpenCL device for 3D accelerations Related: bug 426175 M +2 -1 core/app/main/main.cpp https://invent.kde.org/graphics/digikam/commit/b5e3c5987a7380fdc5ce9a59ee5e62e6acbaf51b @Gilles, I think it has to be "disabled" and not "disable". Maik Maik, you are right. I need to change my glass (:=))))... Gilles Git commit f813d64af40c5ea342ab9da340f12acc4b19023d by Gilles Caulier. Committed on 08/09/2020 at 07:23. Pushed by cgilles into branch 'master'. I needs new glasses : disable => disabled Related: bug 426175 M +1 -1 core/app/main/main.cpp https://invent.kde.org/graphics/digikam/commit/f813d64af40c5ea342ab9da340f12acc4b19023d Git commit cde3403938b82e0cfcccb1b557b6c2319ac8557e by Maik Qualmann. Committed on 08/09/2020 at 10:37. Pushed by mqualmann into branch 'master'. add base classes initialization explicit in the constructor Related: bug 425723, bug 426175 M +2 -0 core/libs/threadimageio/fileio/loadsavetask.cpp M +2 -0 core/libs/threadimageio/fileio/loadsavetask.h https://invent.kde.org/graphics/digikam/commit/cde3403938b82e0cfcccb1b557b6c2319ac8557e Git commit a06b3c5dcc32a2f95c5fbf0ac2fa898931524cea by Maik Qualmann. Committed on 08/09/2020 at 20:05. Pushed by mqualmann into branch 'master'. add static cast for loading notifikation Related: bug 425723, bug 426175 M +2 -1 core/libs/threadimageio/fileio/loadingcache.cpp https://invent.kde.org/graphics/digikam/commit/a06b3c5dcc32a2f95c5fbf0ac2fa898931524cea Git commit 901227fa96db807e02b71a84c933d34b97ce3ec3 by Maik Qualmann. Committed on 09/09/2020 at 19:56. Pushed by mqualmann into branch 'master'. changes to setStatus() function Related: bug 425723, bug 426175 M +1 -1 core/libs/threadimageio/fileio/loadingcache.cpp M +19 -12 core/libs/threadimageio/fileio/loadsavetask.cpp M +1 -2 core/libs/threadimageio/thumb/thumbnailtask.cpp https://invent.kde.org/graphics/digikam/commit/901227fa96db807e02b71a84c933d34b97ce3ec3 Fixed with bug 426175. Maik |