Bug 409574 - Dolphin startup is sometimes delayed by up to 10 seconds
Summary: Dolphin startup is sometimes delayed by up to 10 seconds
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 19.04.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
: 416937 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-07-07 11:12 UTC by Jim Jones
Modified: 2022-06-18 11:36 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
strace of a slow startup (505.56 KB, application/gzip)
2019-07-07 11:12 UTC, Jim Jones
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Jones 2019-07-07 11:12:00 UTC
Created attachment 121364 [details]
strace of a slow startup

SUMMARY


STEPS TO REPRODUCE
1. start dophin
2. what until it shows up

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Jim Jones 2019-07-07 11:14:25 UTC
there are thousands of lines of
4498 13:05:35.209272 read(10, "\2\0\0\0\2\0\0\0\0\0\0\0\20\0\0\0log1.txt\0\0\0\0\0\0\0\0", 32) = 32 <0.000008>
14498 13:05:35.209317 poll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLPRI}, {fd=13, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=POLLIN}, {fd=22, events=POLLIN}], 10, 104) = 1 ([{fd=10, revents=POLLIN}]) <0.000009>
14498 13:05:35.209395 ioctl(10, FIONREAD, [32]) = 0 <0.000007>

log1.txt was the file strace stored its output into, and dolphin seems to poll this files
Comment 2 Christoph Feck 2019-07-25 10:11:43 UTC
According to the strace log, a futex with a timeout value of 5 seconds was aborted with ETIMEDOUT. This might help to investigate the deadlock.
Comment 3 Méven Car 2019-09-04 16:16:09 UTC
There are two issues causing the bug, I believe :

What Christopher said, we can see the 5 seconds futex timeout :

14498 13:05:27.346112 futex(0x55638e72d680, FUTEX_WAIT_PRIVATE, 0, {tv_sec=4, tv_nsec=999998802} <unfinished ...>
14499 13:05:27.346137 poll([{fd=3, events=POLLIN}], 1, -1 <unfinished ...>
14498 13:05:32.346393 <... futex resumed> ) = -1 ETIMEDOUT (Connection timed out) <5.000231>
14498 13:05:32.346666 futex(0x55638e72d630, FUTEX_WAKE_PRIVATE, 1) = 0 <0.000097>

The futex lock seems to be in ki18n loading, because prior to this mutex loop invocation we have :
14498 13:05:27.341563 statx(AT_FDCWD, "/usr/share/locale/en/LC_SCRIPTS/kio5/kio5.js", AT_STATX_SYNC_AS_STAT, STATX_ALL, 0x7ffcb000c4d0) = -1 ENOENT (No such file or directory) <0.000012>

That is clearly originating from klocalizedstring.cpp and this file deels with QMutex.

The lines :

4498 13:05:35.209272 read(10, "\2\0\0\0\2\0\0\0\0\0\0\0\20\0\0\0log1.txt\0\0\0\0\0\0\0\0", 32) = 32 <0.000008>
14498 13:05:35.209317 poll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLPRI}, {fd=13, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=POLLIN}, {fd=22, events=POLLIN}], 10, 104) = 1 ([{fd=10, revents=POLLIN}]) <0.000009>
14498 13:05:35.209395 ioctl(10, FIONREAD, [32]) = 0 <0.000007>

Could be due to mimetype determination or metadata gathering going wrong, reading a whole file when it fails or errors.
I haven't yet investigated into it as much as the first issue.

I reproduce at least one of the two issues, but I don't know which one yet.
Comment 4 Patrick Silva 2021-04-14 14:18:16 UTC
dupe of bug 348521 ?
Comment 5 Méven Car 2021-04-15 05:32:39 UTC
(In reply to Patrick Silva from comment #4)
> dupe of bug 348521 ?

No, we need to keep bugs separate when the deal with different things even similar.
Having meta-bugs non-discerning bugs where no one has the same symptoms make it so very hard to fix.

sometimes takes 1 min / 30ses != starting is a bit slow
Comment 6 Méven Car 2021-04-15 05:37:47 UTC
*** Bug 416937 has been marked as a duplicate of this bug. ***
Comment 7 Jim Jones 2022-06-18 11:36:32 UTC
fixed some time ago