Bug 405446 - ksplashqml hits its hard timeout of 30 seconds because setStage(6) is needed twice
Summary: ksplashqml hits its hard timeout of 30 seconds because setStage(6) is needed ...
Status: RESOLVED DUPLICATE of bug 405444
Alias: None
Product: ksplash
Classification: Plasma
Component: general (show other bugs)
Version: 5.14.5
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-13 18:24 UTC by Bernhard Übelacker
Modified: 2019-03-16 11:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
ksplashqml: Quit on first call to setStage with stage == 6. (860 bytes, patch)
2019-03-13 18:24 UTC, Bernhard Übelacker
Details
ksplashqml: Add some logging to get details when stages were reached. (1.87 KB, patch)
2019-03-13 18:25 UTC, Bernhard Übelacker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Übelacker 2019-03-13 18:24:46 UTC
Created attachment 118782 [details]
ksplashqml: Quit on first call to setStage with stage == 6.

As far as I see the dbus interface setStage is called with 6 different strings.
These get stored in m_stages and an setStage overload is called with the number
of elements in m_stages.

When setStage is called with parameter stage==6 another it gets not into the
closing path immediately because another setStage call is needed for some reason.

I could not find a reason for the need of this second setStage call and therefore
want to ask if the assignment has really to be done before the check "m_stage == 6"?

With this I get the ksplashqml appearance of less than 5 seconds instead of 30.

The second attached patch was used to get some logging from ksplashqml.


Operating System: Debian GNU/Linux 
KDE Plasma Version: 5.14.5
Qt Version: 5.11.3
KDE Frameworks Version: 5.54.0
Kernel Version: 4.19.0-2-amd64
OS Type: 64-bit
Processors: 16 × AMD Ryzen 7 1700 Eight-Core Processor
Memory: 15.5 GiB of RAM
Comment 1 Bernhard Übelacker 2019-03-13 18:25:11 UTC
Created attachment 118783 [details]
ksplashqml: Add some logging to get details when stages were reached.
Comment 2 Kai Uwe Broulik 2019-03-14 09:55:08 UTC
Is this still an issue or just a symptom of Bug 405444?
Comment 3 Bernhard Übelacker 2019-03-14 14:24:41 UTC
(In reply to Kai Uwe Broulik from comment #2)
> Is this still an issue or just a symptom of Bug 405444?

I think both are two distinct issues:

- in 405444 we are just collecting 5 different elements in m_stages and
  therefore the most we reach is a call setStage(5)
  and never enter the exit path.

- in 405446 we reach setStage(6), but need any other call setStage(int)
  following to enter the exit path.

But there might be a reason for that ordering in
setStage(int) that I may have overlooked.
E.g. two dbus calls setStage("desktop") are expected to be received?
Therefore I am less sure about 405446.
Comment 4 Kai Uwe Broulik 2019-03-14 15:14:05 UTC
I'm having the following stages here:
1: initial - set by ksplash initially
2: kcminit - sent by kcminit_startup
3: kinit - run by startkde script via qdbus
4: ksmserver - sent by ksmserver when it starts
5: wm - sent by KWin
6: ready - sent my ksmserver when it finishes session restore and what not
7: desktop - sent my plasmashell ← at this point m_stage is 6 (is checked before incrementing and ksplash quits)
Comment 5 Bernhard Übelacker 2019-03-14 22:44:34 UTC
Hello Kai Uwe Broulik,
thats strange because I could get with my patches applied just the 6 stages
mentioned in the comment in [1]. Also the comment of the lastest git version
just mentions these 6.

So the comment might be incomplete and I have to investigate why
I don't get the "kcminit" stage?

At a first sight I don't see a failure of kcminit_startup - I will
have a look and report back.

[1] https://sources.debian.org/src/plasma-workspace/4:5.14.5.1-1/ksplash/ksplashqml/splashapp.cpp/#L40

[2] https://cgit.kde.org/plasma-workspace.git/tree/ksplash/ksplashqml/splashapp.cpp#n40
Comment 6 Bernhard Übelacker 2019-03-15 21:52:59 UTC
Comment on attachment 118783 [details]
ksplashqml: Add some logging to get details when stages were reached.

Better version added to #405444.
Comment 7 Bernhard Übelacker 2019-03-15 21:58:04 UTC
Hello Kai Uwe Broulik,
with the patch from #405444 I now receive that missing "kcminit" stage.

Maybe that stage "kcminit" arrives even before the "kinit" and got lost
because of the not yet up dbus interface.

So this issue might be just closed.
Still adding that stage "kcminit" to the comment in splashapp.cpp
might be an improvement.

Kind regards,
Bernhard
Comment 8 Bernhard Übelacker 2019-03-15 21:59:06 UTC
Comment on attachment 118782 [details]
ksplashqml: Quit on first call to setStage with stage == 6.

Moving the assignment is not correct as there are really 7 stages.
Comment 9 Kai Uwe Broulik 2019-03-16 09:16:38 UTC

*** This bug has been marked as a duplicate of bug 405444 ***
Comment 10 Kai Uwe Broulik 2019-03-16 09:25:38 UTC
> Still adding that stage "kcminit" to the comment in splashapp.cpp might be an improvement.

Agreed: https://phabricator.kde.org/D19801
Comment 11 Kai Uwe Broulik 2019-03-16 11:28:04 UTC
Git commit f899ccdc0fa3e28dd614c06f297d1d5fccceeb67 by Kai Uwe Broulik.
Committed on 16/03/2019 at 11:27.
Pushed by broulik into branch 'master'.

[KSplashQML] Update stages comment and make code clearer

There's an kcminit stage that wasn't documented.
Also change m_stage and then check it so the number here matches the number of stages in the comment.

Differential Revision: https://phabricator.kde.org/D19801

M  +4    -4    ksplash/ksplashqml/splashapp.cpp

https://commits.kde.org/plasma-workspace/f899ccdc0fa3e28dd614c06f297d1d5fccceeb67