Bug 414553

Summary: Crash From New Images On Desktop Or Dolphin - kdeinit5, kio/thumbnail.so
Product: [Frameworks and Libraries] kio-extras Reporter: vindicator <nroycea+kde>
Component: Thumbnails and previewsAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DUPLICATE    
Severity: crash CC: kde, nate
Priority: NOR    
Version: 19.08.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description vindicator 2019-11-26 21:35:45 UTC
SUMMARY
A crash occurs when viewing a folder containing images in Dolphin.
It only occurs with *new* images. Cached are still displayed correctly.
The time it takes before this eventuality happens is unknown.

STEPS TO REPRODUCE
1. Run the OS for an unspecified amount of time.
2. Save a new image to the filesystem.
3. View the folder containing the new image using Dolphin.

OBSERVED RESULT
No thumbnails created for new images.


EXPECTED RESULT
Thumbnails should be created for all images.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 5.17.3
KDE Frameworks Version: 5.64.0
Qt Version: 5.13.2
**kio-extras: 19.08.3-1 (not 19.08.1, but it's not an option in the listbox).

ADDITIONAL INFORMATION
Based on https://bugs.kde.org/show_bug.cgi?id=414106#c4, I am creating this as a new bug.
*****
Process 2711078 (thumbnail.so) of user 1000 dumped core.
                
                Stack trace of thread 2711078:
                #0  0x00007ff4cadcef25 raise (libc.so.6)
                #1  0x00007ff4cadb8897 abort (libc.so.6)
                #2  0x00007ff4cafe18f4 _ZNK14QMessageLogger5fatalEPKcz (libQt5Core.so.5)
                #3  0x00007ff4cb5814e5 _ZN22QGuiApplicationPrivate25createPlatformIntegrationEv (libQt5Gui.so.5)
                #4  0x00007ff4cb581d81 _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt5Gui.so.5)
                #5  0x00007ff4cb1f14e5 _ZN23QCoreApplicationPrivate4initEv (libQt5Core.so.5)
                #6  0x00007ff4cb583b30 _ZN22QGuiApplicationPrivate4initEv (libQt5Gui.so.5)
                #7  0x00007ff4ca3ac03a _ZN19QApplicationPrivate4initEv (libQt5Widgets.so.5)
                #8  0x00007ff4cbc9e21a kdemain (thumbnail.so)
                #9  0x000060af7dbb1293 n/a (kdeinit5)
                #10 0x000060af7dbb23ba n/a (kdeinit5)
                #11 0x000060af7dbb2d2e n/a (kdeinit5)
                #12 0x000060af7dbadb5c n/a (kdeinit5)
                #13 0x00007ff4cadba153 __libc_start_main (libc.so.6)
                #14 0x000060af7dbae81e n/a (kdeinit5)
*****

My system has been up for 12 days.
It does not happen right away after a(/n) reboot(/upgrade), so I can't say "when" it begins to happen or why.
I've noticed it happening over the past few upgrades.
I'd upgrade, reboot, and everything would be fine... for awhile. Eventually this sort of crashing would begin again and happen continuously.
I'm thinking it isn't about the upgrades, but rather a clean reboot where things settle down for an unknown period of time before starting to crash again.

I'm making the assumption it is the kio/thumbnail.so, but for full transparency, there is:
/usr/lib/qt/plugins/kf5/kio/thumbnail.so
/usr/lib/ImageMagick-7.0.9/modules-Q16HDRI/coders/thumbnail.so
Comment 1 Kai Uwe Broulik 2019-11-27 08:04:07 UTC
Did you update your Frameworks or Qt version without restarting?
It appears to print an error on console, can you check your ~/.xsession-errors file for errors when the thumbnailer crashed?
Comment 2 vindicator 2019-11-27 16:47:05 UTC
Nope, with an upgrade as impactful as that, I always reboot. That was nearly 2 weeks ago.
pacman on Nov 13, and a reboot maybe an hour later.
The next pacman was a package install, no reboot needed, and none since then.

I think that is the second time recently that I've encountered someone mentioning ".xsession-errors". I think the other was relating to Kodi crashing.
There is NO such file in ~/. It sounds like something I should be having, only if related to xorg stuff.

Mind you, I can create such a crash at-will (as long as I don't reboot I'm sure), so if there's some test or "$ gdb -p" you want me to try, let me know.

Oh, HEY! I just did "$ lsof" and grepped for "session" and found "/home/username/.local/share/sddm/xorg-session.log".
I don't know if that's of interest.
*****
kdeinit5: Got EXEC_NEW '/usr/lib/qt/plugins/kf5/kio/thumbnail.so' from launcher.
kdeinit5: preparing to launch '/usr/lib/qt/plugins/kf5/kio/thumbnail.so'
No protocol specified
kdeinit5: PID 3054875 terminated.
Memory pressure relief: Total: res = 1237889024/1237889024/0, res+swap = 1232474112/1232474112/0
*****
Comment 3 vindicator 2019-12-11 00:40:05 UTC
I now have 223 entries in coredumpctl for this issue... just from today alone.
Interesting that uptime is also showing 12 days again.

For what it's worth, I'm also seeing:
*****
Dec 10 15:56:43 computerName kdeinit5[2972391]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
                                          
                                          Available platform plugins are: wayland-org.kde.kwin.qpa, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
...
Nov 28 11:25:45 computerName systemd-coredump[226677]: Process 226672 (kglobalaccel5) of user 1000 dumped core.
                                                 
                                                 Stack trace of thread 226672:
                                                 #0  0x00007de1f9de3f25 raise (libc.so.6)
                                                 #1  0x00007de1f9dcd897 abort (libc.so.6)
                                                 #2  0x00007de1fa1e28f4 _ZNK14QMessageLogger5fatalEPKcz (libQt5Core.so.5)
                                                 #3  0x00007de1fa7804e5 _ZN22QGuiApplicationPrivate25createPlatformIntegrationEv (libQt5Gui.so.5)
                                                 #4  0x00007de1fa780d81 _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt5Gui.so.5)
                                                 #5  0x00007de1fa3f24e5 _ZN23QCoreApplicationPrivate4initEv (libQt5Core.so.5)
                                                 #6  0x00007de1fa782b30 _ZN22QGuiApplicationPrivate4initEv (libQt5Gui.so.5)
                                                 #7  0x00007de1fa783b48 _ZN15QGuiApplicationC1ERiPPci (libQt5Gui.so.5)
                                                 #8  0x00005b99122c108f n/a (kglobalaccel5)
                                                 #9  0x00007de1f9dcf153 __libc_start_main (libc.so.6)
                                                 #10 0x00005b99122c13fe n/a (kglobalaccel5)
-- Subject: Process 226672 (kglobalaccel5) dumped core
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: man:core(5)
-- 
-- Process 226672 (kglobalaccel5) crashed and dumped core.
-- 
-- This usually indicates a programming error in the crashing program and
-- should be reported to its vendor as a bug.
Nov 28 11:25:38 computerName kdeinit5[1250]: The X11 connection broke: I/O error (code 1)
Nov 28 11:25:38 computerName kdeinit5[1250]: QDBusAbstractAdaptor: Cannot relay signal KDEDModule::moduleDeleted(KDEDModule*): Pointers are not supported: KDEDModule*
...
Nov 28 11:25:38 computerName sddm[960]: Running: /usr/bin/X -nolisten tcp -auth /var/run/sddm/{426bda34-0b77-4c6d-a6bc-84fd07730e26} -background none -noreset -displayfd 18 -seat seat0 vt1
*****

I'm currently looking to see if I can re-establish X11 (even though I'd think it was running considering I'm typing this on the system).

I've no idea if this any way relates to when I turn on/off my receiver which I have HDMI going to, as well as DVI going to my monitor (don't ask, screwy monitor doesn't play nice with HDMI).

I also noticed a kernel trace log containing "i915" nearby.
I'll build a newer kernel (5.3.7->5.4.1 I think), reboot, keep an eye out for that error and report it if needed.

In any case, exceptions are being thrown and not caught and nicely notifying the user.
Comment 4 vindicator 2019-12-26 22:06:39 UTC
I missed that it started happening again on the 21st.
And there was no issue with "kglobalaccel5" ever since the reboot, so that seems to be unrelated.
So too is me turning on/off my receiver. There has been no issue for over 1 week after I did that as a test.

Looking at the journal in verbose output, I saw a reference to /home/username/.local/share/sddm/xorg-session.log (also mentioned in my previous comment)
which contained:
*****
...
[2070:2189:1221/183544.426808:ERROR:object_proxy.cc(632)] Failed to call method: org.freedesktop.Notifications.Notify: object_path= /org/freedesktop/Notifications: org.freedesktop.Notifications.Error.ExcessNotificationGeneration: Created too many similar notifications in
 quick succession
...
[2362766:1:1221/183612.309765:ERROR:child_process_sandbox_support_impl_linux.cc(81)] FontService unique font name matching request did not receive a response.
kdeinit5: Got EXEC_NEW '/usr/lib/qt/plugins/kf5/kio/file.so' from launcher.
kdeinit5: preparing to launch '/usr/lib/qt/plugins/kf5/kio/file.so'
kdeinit5: Got EXEC_NEW '/usr/lib/qt/plugins/kf5/kio/file.so' from launcher.
kdeinit5: preparing to launch '/usr/lib/qt/plugins/kf5/kio/file.so'
kdeinit5: Got EXEC_NEW '/usr/lib/qt/plugins/kf5/kio/thumbnail.so' from launcher.
kdeinit5: preparing to launch '/usr/lib/qt/plugins/kf5/kio/thumbnail.so'
No protocol specified
kdeinit5: PID 2362999 terminated.
kdeinit5: Got EXEC_NEW '/usr/lib/qt/plugins/kf5/kio/thumbnail.so' from launcher.
kdeinit5: preparing to launch '/usr/lib/qt/plugins/kf5/kio/thumbnail.so'
No protocol specified
kdeinit5: PID 2363009 terminated.
...
*****

I'm not getting anywhere with this and not seeing much feedback based on what I've provided.

Searching on this issue, I see it's been mentioned in the middle of the year: https://alien.slackbook.org/blog/kde-plasma5-for-slackware-introducing-qt-5-13-in-the-july19-update/#comment-36118
https://bugs.archlinux.org/task/63280
https://forum.manjaro.org/t/cant-run-apps-by-right-clicking-any-file-in-dolphin/85215
Even in 2015: https://bbs.archlinux.org/viewtopic.php?id=204835
Comment 5 vindicator 2020-01-10 18:13:45 UTC
And again starting today, where the previous update was done on the 27th last month.
I see that kio-extras and ffmpegthumbs was both updated then and I see an update for them again today (19.12.1-1) which I'll do in a moment, but still there hasn't been any change as of yet.
Comment 6 Christoph Feck 2020-02-06 18:05:44 UTC
The error messages point to a setup problem. Qt crashes (i.e. shows a fatal error message), because it cannot find a platform plugin. I don't think you can expect help for this issue if it cannot be reproduced reliably; it might even be a hardware bug.
Comment 7 vindicator 2020-02-06 22:26:14 UTC
"setup problem"? As in the installation? Or kdeinit5/thumbnail.so "setting up" to use QT stuff?

If the issue was random in the sense that it would start to fail within 5 hours of a reboot one time, and then 29 days after another reboot, I would be more apt to agree with you on the "reliability" of the issue being produced... But when it is happening pretty regularly around 11 days, even when my usage varies, I'd call that pretty reliable.
I can tell you that I just upgraded today after seeing the coredump entries starting on Feb 3rd, and the last time I upgraded/rebooted was on Jan 24th. That would make it like 11 days.
I WOULD say it is not ideal in debugging/troubleshooting when you have to wait that long for the issue to rear its ugly head.

I could always attach gdb to the process on like the 10th day and get a backtrace or some variable data sampled at that time to see if something is on its way out of bounds (about to cause it to freak out continually on the #th day), but I'd need a bit more guidance of what is to be expected from me (specifics, rather than the vague procedure I laid out) in doing this.

I'd be curious to know how you could see hardware affecting ONLY this particular software in this manner (repetitive failures after #days).

What files does kdeinit5/thumbnail.so affect (config?) that I could possibly just try renaming to get a fresh start (without just fully reinstalling everything).
I think it would be obvious to say that thumbnail.so would create thumbnails for files, but I doubt I would need to delete the thumbnail cache (which would also be fine) since the issue isn't the display of thumbnails since it still does, but rather the creation of NEW thumbnails after #days.
Comment 8 vindicator 2020-09-21 07:54:43 UTC
It's still an issue, but at least program address locations are being displayed in the dump:
*****
Stack trace of thread 1806553:
#0  0x00007bfb41f0e615 raise (libc.so.6 + 0x3d615)
#1  0x00007bfb41ef7862 abort (libc.so.6 + 0x26862)
#2  0x00007bfb421299ac _ZNK14QMessageLogger5fatalEPKcz (libQt5Core.so.5 + 0x8f9ac)
#3  0x00007bfb4271c546 _ZN22QGuiApplicationPrivate25createPlatformIntegrationEv (libQt5Gui.so.5 + 0x131546)
#4  0x00007bfb4271c9e1 _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt5Gui.so.5 + 0x1319e1)
#5  0x00007bfb423523e6 _ZN23QCoreApplicationPrivate4initEv (libQt5Core.so.5 + 0x2b83e6)
#6  0x00007bfb4271fa20 _ZN22QGuiApplicationPrivate4initEv (libQt5Gui.so.5 + 0x134a20)
#7  0x00007bfb4170b68a _ZN19QApplicationPrivate4initEv (libQt5Widgets.so.5 + 0x15e68a)
#8  0x00007bfb42f04dfc kdemain (thumbnail.so + 0x6dfc)
#9  0x00005ccbe71735bd n/a (kdeinit5 + 0x75bd)
#10 0x00005ccbe7174a59 n/a (kdeinit5 + 0x8a59)
#11 0x00005ccbe717521d n/a (kdeinit5 + 0x921d)
#12 0x00005ccbe7170b54 n/a (kdeinit5 + 0x4b54)
#13 0x00007bfb41ef9152 __libc_start_main (libc.so.6 + 0x28152)
#14 0x00005ccbe71716be n/a (kdeinit5 + 0x56be)
*****
kio-extras/dolphin version: 20.08.1
Comment 9 vindicator 2020-12-14 02:07:27 UTC
Testing this further (instead of just rebooting), I found that killing the kdeinit5 threads "file.so", sets things back the way it should (no crashes, thumbnails are generated).

I first suicided kdeinit5.
Then ps showed the previous, along with new instances existed as well as the "file.so" threads:
*****
$ ps -ef |grep kdeini
userName       1298       1  0 Dec03 ?        00:00:00 /usr/lib/kf5/start_kdeinit
userName       1300       1  0 Dec03 ?        00:00:01 kdeinit5: Running...
userName      70978    1300  0 Dec03 ?        00:00:40 kcalc [kdeinit5]
userName    1721649    1300  0 19:55 ?        00:00:00 file.so [kdeinit5] file local:/run/user/<uid>/klauncherknWPUc.1.slave-socket local:/run/user/<uid>/kded5iOYDAY.1.slave-socket
userName    1721650    1300  0 19:55 ?        00:00:00 file.so [kdeinit5] file local:/run/user/<uid>/klauncherknWPUc.1.slave-socket local:/run/user/<uid>/kded5mmOANs.2.slave-socket
userName    1721652       1  0 19:55 ?        00:00:00 kdeinit5: Running...
*****
It was only after killing those 2 sockets did the crashes stop and thumbnails start generating again.

Nothing else I provided told you enough. Hopefully this does something. I at least now know what I can do instead of rebooting.
Comment 10 vindicator 2020-12-31 06:25:21 UTC
Backtrace for process: "file.so [kdeinit5] file local:/run/user/<userId>/klauncherMMDZXa.1.slave-socket local:/run/user/<userId>/dolphinoTcyBm.718.slave-socket"
*****
#0  0x000072e894e1e50f in ppoll () from /usr/lib/libc.so.6
#1  0x000072e8951fc64b in qt_safe_poll(pollfd*, unsigned long, timespec const*) () from /usr/lib/libQt5Core.so.5
#2  0x000072e891390813 in ?? () from /usr/lib/libQt5Network.so.5
#3  0x000072e89138e1f2 in ?? () from /usr/lib/libQt5Network.so.5
#4  0x000072e8913811a2 in QAbstractSocket::waitForReadyRead(int) () from /usr/lib/libQt5Network.so.5
#5  0x000072e891502442 in ?? () from /usr/lib/libKF5KIOCore.so.5
#6  0x000072e89153f798 in KIO::SlaveBase::dispatchLoop() () from /usr/lib/libKF5KIOCore.so.5
#7  0x000072e895d5a388 in kdemain () from /usr/lib/qt/plugins/kf5/kio/file.so
#8  0x00006071f1fd35bd in ?? ()
#9  0x00006071f1fd4a59 in ?? ()
#10 0x00006071f1fd5237 in ?? ()
#11 0x00006071f1fd0b54 in ?? ()
#12 0x000072e894d51152 in __libc_start_main () from /usr/lib/libc.so.6
#13 0x00006071f1fd16be in ?? ()
*****
This process ended up disappearing. There were 4 dolphin related processes for file.so. Now there is just 1.

backtrace for process: "file.so [kdeinit5] file local:/run/user/<userId>/klauncherCNHsFj.1.slave-socket local:/run/user/<userId>/kded5NqjChC.1.slave-socket"
*****
#0  0x000072e894e1e50f in ppoll () from /usr/lib/libc.so.6
#1  0x000072e8951fc64b in qt_safe_poll(pollfd*, unsigned long, timespec const*) () from /usr/lib/libQt5Core.so.5
#2  0x000072e891390813 in ?? () from /usr/lib/libQt5Network.so.5
#3  0x000072e89138e1f2 in ?? () from /usr/lib/libQt5Network.so.5
#4  0x000072e8913811a2 in QAbstractSocket::waitForReadyRead(int) () from /usr/lib/libQt5Network.so.5
#5  0x000072e891502442 in ?? () from /usr/lib/libKF5KIOCore.so.5
#6  0x000072e89153f798 in KIO::SlaveBase::dispatchLoop() () from /usr/lib/libKF5KIOCore.so.5
#7  0x000072e895d5a388 in kdemain () from /usr/lib/qt/plugins/kf5/kio/file.so
#8  0x00006071f1fd35bd in ?? ()
#9  0x00006071f1fd4a59 in ?? ()
#10 0x00006071f1fd5237 in ?? ()
#11 0x00006071f1fd0b54 in ?? ()
#12 0x000072e894d51152 in __libc_start_main () from /usr/lib/libc.so.6
#13 0x00006071f1fd16be in ?? ()
*****
There are 2 processes of this type.

There were 2 instances of plasmashell related to file.so (plasmashelluXvTgd.328.slave-socket), but they all went away.

The constant that remains are the kded ones. Unchanging pids.

Okay, using coredumpctl info, I see that the dumps are for the plasmashell and dolphin related file.so stuff.
I don't know if there's an effective way of finding if the kded related ones are in there as well (there are A LOT).

First test was to kill the latest kded related file.so (pid 1908). No effect, still crashes. Then the other kded one (1907). Also still crashes.
Next, I killed each of the only other file.so stuff that were related to dolphin (kded ones were recreated). Still crashed on the dolphin instance was recreated.

Next, with this 2 recreated kded instances, I closed Dolphin and waited until there were no other file.so instances. After re-opening dolphin and going to a folder with new pictures, there are more coredumps. This kind of coredump is at least quick, where I don't even notice a slowed system as it's being dumped.

With dolphin closed, I killall for the remaining kded file.so instances.
Now that there are no file.so instances, I open dolphin, go to the folder and it still crashes (odd).
****Okay, close dolphin, killall file.so, suicide kdeinit5, file.so sockets are recreated, open dolphin, go to folder... SUCCESS.

Reminder to self, in next 10+ days when it starts crashing again, close dolphin, suicide kdeinit5, make sure no other file.so instances exist, open dolphin and check folder. Apparently just killing the file.so instances were not enough, kdeinit5 also has to be suicided.
Backtrace doesn't look any different when it's working (kde file.so):
*****
#0  0x000072e894e1e50f in ppoll () from /usr/lib/libc.so.6
#1  0x000072e8951fc64b in qt_safe_poll(pollfd*, unsigned long, timespec const*) () from /usr/lib/libQt5Core.so.5
#2  0x000072e891390813 in ?? () from /usr/lib/libQt5Network.so.5
#3  0x000072e89138e1f2 in ?? () from /usr/lib/libQt5Network.so.5
#4  0x000072e8913811a2 in QAbstractSocket::waitForReadyRead(int) () from /usr/lib/libQt5Network.so.5
#5  0x000072e891502442 in ?? () from /usr/lib/libKF5KIOCore.so.5
#6  0x000072e89153f798 in KIO::SlaveBase::dispatchLoop() () from /usr/lib/libKF5KIOCore.so.5
#7  0x000072e895d5a388 in kdemain () from /usr/lib/qt/plugins/kf5/kio/file.so
#8  0x00006071f1fd35bd in ?? ()
#9  0x00006071f1fd4a59 in ?? ()
#10 0x00006071f1fd5237 in ?? ()
#11 0x00006071f1fd0b54 in ?? ()
#12 0x000072e894d51152 in __libc_start_main () from /usr/lib/libc.so.6
#13 0x00006071f1fd16be in ?? ()
*****
Comment 11 Nate Graham 2021-03-17 23:42:05 UTC

*** This bug has been marked as a duplicate of bug 430862 ***