Created attachment 133830 [details] Log file of identifying unknown faces Aloha, I have been using digikam 7.2.0 beta 1 for about a month. Win 10. Local MariaDB. No problems. The problem started a few days ago. 1 - Cleaning the dB through the maintenance menu hangs the program. 2 - When I manually identify an unknown face the program hangs. I am enclosing a log file of the second item above. Please note the various error messages like "Error messages: "QMYSQL3: Unable to execute statement" "Duplicate entry '349109' for key 'PRIMARY'" "1062" 2 " Please let me know if I can provide additional information. Many thanks for your excellent work and all the best.
Well, that's a problem that we can't solve by fixing a bug. Your thumbnail database is broken for whatever reason. You use the internal MySQL database for this. Do you dare to make changes with the HeidiSQL program? Maik
(In reply to Maik Qualmann from comment #1) > Well, that's a problem that we can't solve by fixing a bug. Your thumbnail > database is broken for whatever reason. You use the internal MySQL database > for this. Do you dare to make changes with the HeidiSQL program? > > Maik Thanks much for the prompt response. I have never done anything like it, but am happy to do so. Would need your advise though. I take it the problem lies in the file thumbnails.ibd. Is this correct or are there other files involved? I will download and install HeidiSQL. Take Care and Thanks Much. --Haim
I think the best solution is to delete all tables from the thumbnail DB. DigiKam will recreate the tables at the next start and create new thumbnails. First start digiKam so that the internal MySQL server runs. Now start HeidiSQL. Connect to the server, localhost, port 3307, username "root", no password. Database is "digikam". In HeidiSQL there is the possibility to execute SQL code. Copy line by line and execute them: DROP TABLE IF EXISTS ThumbSettings; DROP TABLE IF EXISTS CustomIdentifiers; DROP TABLE IF EXISTS FilePaths; DROP TABLE IF EXISTS UniqueHashes; DROP TABLE IF EXISTS Thumbnails; Quit HeidiSQL and digiKam. Please check your hard drive on which the database is located, a defective hard drive could also cause the problem. Maik
Created attachment 133871 [details] failed to create table
(In reply to Maik Qualmann from comment #3) > I think the best solution is to delete all tables from the thumbnail DB. > DigiKam will recreate the tables at the next start and create new thumbnails. > > First start digiKam so that the internal MySQL server runs. Now start > HeidiSQL. > > Connect to the server, localhost, port 3307, username "root", no password. > Database is "digikam". > > In HeidiSQL there is the possibility to execute SQL code. Copy line by line > and execute them: > > DROP TABLE IF EXISTS ThumbSettings; > DROP TABLE IF EXISTS CustomIdentifiers; > DROP TABLE IF EXISTS FilePaths; > DROP TABLE IF EXISTS UniqueHashes; > DROP TABLE IF EXISTS Thumbnails; > > Quit HeidiSQL and digiKam. Please check your hard drive on which the > database is located, a defective hard drive could also cause the problem. > > Maik Aloha, Thanks much for the details. The tables were dropped but an error message pops when digikam starts stating "Failed to create tables in database" I am attaching a snippet of the log file. Thanks much
The MySQL server files are definitely damaged at the file level. Go to the directory "C:\Media\Photography\.mysql.digikam\db_data\digikam" and delete all files with the name thumbnails.* There is probably still a thumbnails.frm available. Maik
Created attachment 133872 [details] Start digikam w/o any thumbnails file Aloha, Many thanks for your suggestion. I removed the thumbnails.ibd (no frm file) and restarted digikam. The same error message pops up as it can not create tables. All the Best; --Haim
Forgot to mention that I added the log file associated with this action. Thanks Much; --Haim
I'm slowly running out of ideas to fix the database. Try comment 5 again and only execute "DROP TABLE IF EXISTS Thumbnails;". Maik
Created attachment 133897 [details] existing digikan tables Aloha, Thanks for your patience. I followed your instructions but things are similar. digikam fails to recreate a new thumbnails table when it starts. I would like to understand the process a bit better 1 - I sent a screen capture of the HeidiSQL digikam tables. This is taken after digikam started. I suspect that for each ibd file in "\.mysql.digikam\db_data\digikam" I should have an entry in HeidiSQL. Yet, I do not see a thumbnails table listed. Please note that a file "thumbnails.ibd" exists, though "thumbnails.frm" does not. I do not understand why HeidiSQL does not see this file. 2 - Under "\.mysql.digikam\db_data" there are over a dozen files like "mysql-bin.0000xx" (xx in my case is 72 onward). Most are 2KB. Are they important? 3 - After going through a clean install of digikam and let it run for over a day on my images, some of the ibd files where well over 10GB. I do not have any large files now 4 - Assume that I need to restart from scratch. What I do not want to lose is the facial recognition part. specifically, I have over 25K faces which I manually identified. Is there a way to keep those? I do have an older back-up. Is it possible to do some hybrid restore where I copy some tables from the back-up but keep other tables current? 5 - Please note that digikam is the only process that touches the "\.mysql.digikam" tree structure on my disk. Eventually, it will be nice to understand what caused the problem as it may have additional impact on digikam stability and may effect others. Thanks much for your patience and all the best; --Haim Thanks much and all the best
Did you also delete the files "thumbnails.ibd" and "thumbnails.frm"? The directory ".mysql.digikam\db_data" is not changed directly by digiKam. The MySQL server does this. Even if digiKam crashes, the database should not be damaged. Maik
After drooping the thumbnails table in HeidiSQL there are no "thumbnails.ibd" or "frm" files in the digikam folder. When I re-start digikam, "thumbnail.ibd" is generated after I press OK on the "Failed to initialise thumbnails database" error message. When I close digikam, the "ibd" file is still there. No "frm" one. If I relaunch digikam, I get the same error message of "Failed to initialise thumbnails database" My backup has a 14GB "thumbnails.ibd" file and a 1KB "thumbnails.frm". What happens if I use them? Thanks Much; --Haim
Created attachment 133951 [details] Start digikam w/o DB Aloha, Not knowing how to proceed, I reinstalled MariaDB and removed the ".mysql.digikam" folder. I am enclosing a log which seems to indicate all is OK. I did not add any Albums and closed digikam. But the plot thickens; please see the next comment. Thanks; --Haim
Created attachment 133952 [details] Relaunch digikam Aloha, After closing digikam, I re-launced it. Please see the log file. Your advice is appreciated. Thanks; --Haim
Now the "Settings" table does not seem to exist in the core database. You should no longer work with this database either. I have no explanation. I tested the internal MySQL a week ago under Windows without any problems, but I will check it again in the next few days. Maik
(In reply to Maik Qualmann from comment #15) > Now the "Settings" table does not seem to exist in the core database. You > should no longer work with this database either. I have no explanation. I > tested the internal MySQL a week ago under Windows without any problems, but > I will check it again in the next few days. > > Maik Aloha, Thanks for response. There may be significant differences between the way you test digikam with internal DB and they way I work with it over time. To illustrate, I did a clean install of digikam and MariaDB (removing all configuration and data files). After going through the initial digikam setup as part of the first launch (and specifying an album with thousands of images on my HDD), I close digikam. In Windows, the digikam process is still consuming CPU and Disk after the application shuts down. Now terminate the process. I do not know what happens internally, but the end result is rather similar to what I described in a previous comment. Similar situation may happen in other scenarios. For example, chose a large (say, 1000) unknown faces and assign them to a name. This takes some time. During that time, assign names to other unknown face (or even to faces in the first group) and terminate digikam. My gut feeling is that somewhere in the graceful failover there may be a glitch. All the Best; --Haim
Git commit 2334d832f1e17a177a18a27557ef05ec930b6b62 by Maik Qualmann. Committed on 12/12/2020 at 05:51. Pushed by mqualmann into branch 'master'. more time for the MySQL server to shut down Related: bug 430277 M +1 -1 core/libs/database/server/databaseserver.cpp https://invent.kde.org/graphics/digikam/commit/2334d832f1e17a177a18a27557ef05ec930b6b62
You can see in their last two logs that the MySQL server was killed. This means that our waiting time of 5 seconds was too short. We are now waiting 30 seconds. That is almost certainly the cause of the broken databases. Please test it again with the next digiKam version (date greater than 12/12/2020). Maik
Thanks much. Will do. Take Care.
Hi and happy new year, Please give us a fresh feedback using current digiKam 7.5.0 pre-release installer for Windows available here : https://files.kde.org/digikam/ Thanks in advance Gilles Caulier
*** Bug 430277 has been marked as a duplicate of this bug. ***
@vadeinpacem@gmail.com digiKam 8.0.0 is out. Problem still reproducible ? Best regards Gilles Caulier
@vadeinpacem@gmail.com, This problem still reproducible with the new digiKam 8.2.0 pre-release Windows installer available at usual place: https://files.kde.org/digikam/ This new bundle is based on last Qt framework 5.15.11 and KDE framework 5.110. Thanks in advance Gilles Caulier
It's a Q of course... Gilles Caulier
Thank you very much for the fix.