[KPhotoAlbum] Import crash

Robert Krawitz rlk at alum.mit.edu
Mon May 15 14:31:41 BST 2017


On Mon, 15 May 2017 09:06:04 -0400 (EDT), Robert Krawitz wrote:
> On Mon, 15 May 2017 09:02:05 -0400 (EDT), Robert Krawitz wrote:
>> I'm trying to import a huge number of photos (as a way of syncing up
>> two image stores), and kpa crashed.  "Huge number" in this case means
>> 90,000; I tried a similar exercise with a much smaller number with no
>> trouble.  I don't have a directly useful stack trace, but it looks
>> like a stack overflow; the number of stack frames is itself telling.
>> This is suggesting to me that something in the importer is recursing
>> when it should be iterating.
>
> I should note that this happens a while after clicking "Next" the
> first time in the import dialog.  The process has been running with
> 100% CPU, suggesting that it is not I/O bound.

Actually, I was wrong about that: it happens after clicking Finish.
However, I was able to find the recursion.  It appears to actually be
recursion between copyNextFromExternal() and aCopyJobCompleted(); the
compiler notes the possibility for tail recursion from aCopyJobCompleted().

I might also note that during a (much smaller) import the timeline bar
constantly flashes, seemingly as each image is added to the database;
this resulted in my window manager crashing.

Finally, the process of comparing MD5 checksums against the database
appears to be extremely slow; it took hours to go through 90,000
images.  Perhaps the existing MD5 checksums need to be stored in a
hash, rather than a sequential comparison or something?

Thread 1 "kphotoalbum" received signal SIGSEGV, Segmentation fault.
0x00007ffff7dedb0e in _dl_update_slotinfo () from /lib64/ld-linux-x86-64.so.2
(gdb) where
#0  0x00007ffff7dedb0e in _dl_update_slotinfo () at /lib64/ld-linux-x86-64.so.2
#1  0x00007ffff7ddd115 in update_get_addr () at /lib64/ld-linux-x86-64.so.2
#2  0x00007fffef127066 in  () at /usr/lib64/libQt5Core.so.5
#3  0x00007fffef2dcd3b in QCoreApplicationPrivate::threadRequiresCoreApplication() () at /usr/lib64/libQt5Core.so.5
#4  0x00007ffff2816138 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#5  0x00007ffff281d0f0 in QApplication::notify(QObject*, QEvent*) ()
    at /usr/lib64/libQt5Widgets.so.5
#6  0x00007fffef2dd245 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib64/libQt5Core.so.5
#7  0x00007ffff28260ad in  () at /usr/lib64/libQt5Widgets.so.5
#8  0x00007ffff28271a6 in  () at /usr/lib64/libQt5Widgets.so.5
#9  0x00007ffff2845558 in QWidget::repaint(QRect const&) ()
    at /usr/lib64/libQt5Widgets.so.5
#10 0x00007ffff28455a3 in QWidget::repaint() ()
    at /usr/lib64/libQt5Widgets.so.5
#11 0x00007ffff2984a98 in QProgressBar::setValue(int) ()
    at /usr/lib64/libQt5Widgets.so.5
#12 0x00007ffff2a107ee in QProgressDialog::setValue(int) ()
    at /usr/lib64/libQt5Widgets.so.5
#13 0x00000000005e0d9a in ImportExport::ImportHandler::aCopyJobCompleted(KJob*) ()
#14 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
#15 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
#16 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
#17 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
#18 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
#19 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
#20 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
#21 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
#22 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
#23 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
#24 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
#25 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
#26 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
#27 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
#28 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
#29 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
#30 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
#31 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
#32 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
#33 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
#34 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
#35 0x00000000005dffef in ImportExport::ImportHandler::copyNextFromExternal() ()
-- 
Robert Krawitz                                     <rlk at alum.mit.edu>

***  MIT Engineers   A Proud Tradition   http://mitathletics.com  ***
Member of the League for Programming Freedom  --  http://ProgFree.org
Project lead for Gutenprint   --    http://gimp-print.sourceforge.net

"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton



More information about the Kphotoalbum mailing list