Bug 503910 - "Image Fingerprints have not been generated" error message, but I've tried 5 times
Summary: "Image Fingerprints have not been generated" error message, but I've tried 5 ...
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: Searches-Similarity (other bugs)
Version First Reported In: 8.6.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-08 08:42 UTC by David
Modified: 2025-05-16 19:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Image fingerprints have not yet been generated for your collection (20.12 KB, image/jpeg)
2025-05-08 08:42 UTC, David
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David 2025-05-08 08:42:06 UTC
Created attachment 181056 [details]
Image fingerprints have not yet been generated for your collection

SUMMARY:
There is no "button" to generate a fingerprints database. 
I've tried the button to "Update" the fingerprints DB and the button to "Rebuild" the fingerprints DB. But apparently, the Fingerprints DB never gets "Generated".
Is there a button to "Generate" the fingerprints database?
And if the Update and Rebuild are interchangeable and will Generate the initial fingerprints database, is there something I should be looking at on the remote MySQL server?

STEPS TO REPRODUCE
1. Run the "Update fingerprints" in the "Similarities" tab on the left toolbar. All 12 i7 cores run up to 100% CPU utilization and stay at 100% for 3 to 4 days with the fans running.
2. There is little to no activity on the remote MySQL server during this time.
3. When the there is "No active process" displayed on the bottom right of the digiKam window, the error message does not come back when I click on Similarities, but the app will become unresponsive and one of the CPU cores goes to 100% for 30 seconds to a minute.
4. After a while, when I go back to the Similarities tab, the error message comes back

OBSERVED RESULT: No Similarities or Tags

SOFTWARE/OS VERSION
WIndows 11 

ADDITIONAL INFORMATION
Remote docker based MariaDB MySQL server
All images are on NAS

Google search takes me to the digiKam manual's page for "Maintenance Tools" > "Rebuild Fingerprints", but that page actually shows a graphic of the left side-toolbar for "Similarities" to "Update" the fingerprints.
Regardless, using either of these run for between 3 and 4 days, and when it finishes the error message 
"Image fingerprints have not yet been generated for your collection. The Similarities Search Tools will not bet operational without pre-generating fingerprints. Please generate the fingerprints first" still pops up the next time I try to check Similarities.
Comment 1 caulier.gilles 2025-05-08 08:52:50 UTC
Run DebugView before digiKam and capture the debug trace to investiguate. Re
Comment 2 caulier.gilles 2025-05-08 08:53:38 UTC
Read the notice here:

https://www.digikam.org/contribute/#windows-host
Comment 3 David 2025-05-14 06:28:42 UTC
I'm collecting log files now. I'm on the 3rd one (using Debug View).
The first log took quite a long time before the problem come up (I saved it and can upload it later). 
I spent about 4 hours on the screen doing things like checking "tags" for duplicates based on misspellings (like one tag for "Hotel" vs. a tag for "Hotle") and moved files from one tag to another, then deleting the old tag - just keeping digiKam loaded continuously to see how long it would last.

The whole time I was doing that, I had btop running on the MariaDB server and I could see normal network traffic / memory / CPU traffic ramping up and down as expected. The Windows Task Manager showed the activity on the network, but the 12 CPU were not ramping up to 100%. There was network traffic, but no disk traffic to the local C: drive (c:\digikam\thumbnails-digikam.db).
Checking Similarities, the app slowed way down (The "Drag and Drop" of an image took 30 to 40 seconds in some cases), but it kept going and finally showed some results.

I started an "Auto-tag Scan" and left it to run overnight. It ran for an unknown period, then failed at some point during the night.
There was one last digiKam message before a very long period of no more from digiKam:
00020547	33271.10937500	[47352] digikam.dimg: "J:/MyPix/MyPix/models/Annie_Cruz/Annie_Cruz-Pix/a-file-name.jpg" : "JPEG" file identified

Followed by several hundred lines of debug messages from unrelated apps and services, finally a digiKam message:

00021475	72684.45312500	[47352] digikam.dbengine: Failure executing query:	
00021476	72684.45312500	[47352]  "SELECT imageid FROM ImageTagProperties LEFT JOIN Images ON Images.id=ImageTagProperties.imageid  WHERE tagid=? AND property=? AND Images.status=1 LIMIT 1;" 	
00021477	72684.45312500	[47352] Error messages: "QMYSQL: Unable to prepare statement" "Lost connection to MySQL server during query" "2013" 2 	
00021478	72684.45312500	[47352] Bound values:  QList()	
00021479	72684.46093750	[47352] digikam.dbengine: Failure executing query:	
00021480	72684.46093750	[47352]  "SELECT imageid FROM ImageTagProperties LEFT JOIN Images ON Images.id=ImageTagProperties.imageid  WHERE tagid=158 AND property='tagRegion' AND Images.status=1 LIMIT 1;" 	
00021481	72684.46093750	[47352] Error messages: "QMYSQL: Unable to execute query" "Lost connection to MySQL server during query" "2013" 2 	
00021482	72684.46093750	[47352] Bound values:  QList(QVariant(int, 158), QVariant(QString, "tagRegion"))	
00021483	72684.47656250	[47352] digikam.dbengine: Failure executing query:	
00021484	72684.47656250	[47352]  "SELECT imageid FROM ImageTagProperties LEFT JOIN Images ON Images.id=ImageTagProperties.imageid  WHERE tagid=? AND property=? AND Images.status=1 LIMIT 1;" 

These messages repeated for several 1000 more lines until I closed the log file.

The MariaDB was still up, but showing no load on it at all.
DigiKam was still up, and the "Image Fingerprints have not been generated" error message was present in Similarities tab.
I restarted digiKam and everything was back to normal.

This morning, I rebooted the Windows 11 host and shut off all the startup apps (Steam, Evernote, qBtTorrent, discord) and tried to minimize the background chatter on the Debug View. I started a new log and started digiKam.
After using digiKam for a few more hours, and started a "Find Duplicates" activity. It's been running now for 7 hours (68% done) with all 12 CPU at 100%, otherwise the app is still functional. But whenever I click on the "Similarities" tab on the left side, it can take up to 45 seconds before the screen changes and all 12 CPU drop to about 1% for 30 seconds before starting back up to 100%. 
The log is running and I can upload that file tomorrow.
Comment 4 David 2025-05-14 18:52:19 UTC
Log file "DigiKam-8.6-AURORA-R8-25.5.13-minimal.LOG" is still too big to upload. This is the 7z compressed file on DropBox:
https://www.dropbox.com/scl/fi/t7nmv0zp1hmx5hkkedb3h/DigiKam-8.6-AURORA-R8-25.5.13-minimal.LOG.7z?rlkey=fpfyd4cyt0pej8yxdj35whc19&st=ifoq7w3l&dl=0

The first half of the log is running the "Find Duplicates" and me using digiKam for tagging and sorting images at the same time. 
At time 59946.14453125 some internal process starts on the Windows 11 PC and digiKam appears to freeze until 61949.76562500 when digiKam seems to wake up and declare it lost the connection to the MySQL database. The remaining log is the same error message repeating until 65819.04687500. The last digiKam message is at 65819.45312500 "Finish Main Thread.

The MariaDB server shows uptime is 43 days, 10hrs, all 4 CPU are currently at idle, 1.6GB used of 16GB, all disks are below 5% utilization.
There is currently non-zero write traffic to MariaDB, but iftop isn't showing where is it coming from. 

While writing this, digiKam is running on the other PC and I clicked on "Similarities" and there are images presented. Also, the MariaDB sever started showing w/r database traffic and iftop shows 6 to 10 mysql ports opened from the PC. 
It looks like digiKam reconnected to the DB without needing to be restarted this time. 
But it is very slow to open the Similarities or Tags tabs
Comment 5 Maik Qualmann 2025-05-15 06:35:23 UTC
The query is lost, probably the timeout on the server is too short, we are seeing this problem more often with MYSQL servers on NAS at the moment.

Maik
Comment 6 David 2025-05-15 20:06:28 UTC
To clarify: 
The MariaDB is a docker image running on a Mac Mini (late 2014) with 16GB RAM and 4-core i7-4578u CPU with 1Gbps Cat5 running Rocky Linux 9.5.0. This is the only docker image running right now.
But the image libraries are all on NAS (WD PR4100, 24TB RAID5, dual 1Gbps NIC 802.3ad channel bonding).
This would not be considered "high performance", but with 1 or 2 users, it should keep up.
Comment 7 David 2025-05-16 19:21:38 UTC
(In reply to Maik Qualmann from comment #5)
> The query is lost, probably the timeout on the server is too short, we are
> seeing this problem more often with MYSQL servers on NAS at the moment.
> 
> Maik

This morning, after digiKam sat idle for 12 hours, I unlocked the screen and switched from the "Similarities" tab to "Albums" tab and Debug Viewer filled up with MySQL Connection Lost error messages. This time, it looks like Lat/Long info is missing. I happened to have the "Map" pane open on the right side, and all the thumbnail pics no longer have the little "globe" icon in the upper right of their borders. They were fine last night.
I've seen this happen before, but I didn't have Debug Viewer running at that time.
---
[28552] digikam.dbengine: Failure executing query:
[28552]  "SELECT latitude, latitudeNumber, longitude, longitudeNumber, altitude, orientation, tilt, roll, accuracy, description FROM ImagePositions WHERE imageid=337133;" 
[28552] Error messages: "QMYSQL: Unable to execute query" "Lost connection to MySQL server during query" "2013" 2 
[28552] Bound values:  QList(QVariant(qlonglong, 337133))
[28552] digikam.geoiface: ----
---

The MySQL server is and the 2nd PC that I've been on this morning still has a good connection to the MySQL server with its digiKam. DigiKam has been running about the same amount of time.