Bug 388628 - Long delay on startup
Summary: Long delay on startup
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-06 18:30 UTC by Roman Gilg
Modified: 2018-01-13 15:59 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Gilg 2018-01-06 18:30:21 UTC
When issuing startplasmacompositor from VT there is a large delay for me since some time between

startplasmacompositor: Starting up...
dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1
No backend specified through command line argument, trying auto resolution
OpenGL vendor string:                   Intel Open Source Technology Center
OpenGL renderer string:                 Mesa DRI Intel(R) Kabylake GT1.5 
OpenGL version string:                  4.5 (Core Profile) Mesa 17.2.4
OpenGL shading language version string: 4.50
Driver:                                 Intel
GPU class:                              Unknown
OpenGL version:                         4.5
GLSL version:                           4.50
Mesa version:                           17.2.4
Linux kernel version:                   4.10
Requires strict binding:                no
GLSL shaders:                           yes
Texture NPOT support:                   yes
Virtual Machine:                        no
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
glamor: EGL version 1.4 (DRI2):
X-Server started on display :1


and after this the next output lines are very delayed:


Configuring Lock Action
org.kde.knotifications: env says KDE is running but SNI unavailable -- check KDE_FULL_SESSION and XDG_CURRENT_DESKTOP
kf5.kcoreaddons.desktopparser: Property type "Url" is not a known QVariant type. Found while parsing property definition for "X-KWin-Video-Url" in "/usr/share/kservicetypes5/kwineffect.desktop"
Session path: "/org/freedesktop/login1/session/_33"
Using Wayland-EGL
Using the 'xdg-shell-v6' shell integration
startplasma: Starting up...
dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1
Service started, version: 7.0.0
Cleaning up...
kdeinit5: preparing to launch '/usr/lib/x86_64-linux-gnu/libexec/kf5/klauncher'

I'm currently not using Atomic Mode Setting on this machine. I believe this delay also happens when logging in directly through sddm.
Comment 1 Martin Flöser 2018-01-07 08:25:24 UTC
I also observed the large delay. Not only from VT, but also from SDDM.
Comment 2 Martin Flöser 2018-01-07 08:26:34 UTC
It's clearly a difference to the autotests, they still are fast.
Comment 3 whgentoo 2018-01-13 04:19:31 UTC
Can confirm the same issue using either startplasmacompositor or SDDM to login. My system is also git master. 

The delay is about 15 seconds on my machine, and it affect wayland session only.
Comment 4 Martin Flöser 2018-01-13 15:30:38 UTC
I just gdb'ed into the startup. It's once more KActivities.

(gdb) bt
#0  0x00007fc139a7cb26 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x560fd0989920) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x560fd09898d0, cond=0x560fd09898f8) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=cond@entry=0x560fd09898f8, mutex=mutex@entry=0x560fd09898d0) at pthread_cond_wait.c:655
#3  0x00007fc13746065b in QWaitConditionPrivate::wait (time=18446744073709551615, this=0x560fd09898d0) at thread/qwaitcondition_unix.cpp:143
#4  QWaitCondition::wait (this=<optimized out>, mutex=0x560fd0020c18, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:215
#5  0x00007fc13c7c2c4b in ?? () from target:/usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#6  0x00007fc13c77e2c0 in ?? () from target:/usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007fc13c76b95b in QDBusConnection::call(QDBusMessage const&, QDBus::CallMode, int) const () from target:/usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#8  0x00007fc13c788869 in QDBusAbstractInterface::callWithArgumentList(QDBus::CallMode, QString const&, QList<QVariant> const&) () from target:/usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#9  0x00007fc13c7890be in QDBusAbstractInterface::call(QDBus::CallMode, QString const&, QVariant const&, QVariant const&, QVariant const&, QVariant const&, QVariant const&, QVariant const&, QVariant const&, QVariant const&) () from target:/usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#10 0x00007fc13c7892c1 in QDBusAbstractInterface::call(QString const&, QVariant const&, QVariant const&, QVariant const&, QVariant const&, QVariant const&, QVariant const&, QVariant const&, QVariant const&) () from target:/usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#11 0x00007fc13c76f409 in QDBusConnectionInterface::startService(QString const&) () from target:/usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#12 0x00007fc13ca0ad71 in KActivities::Manager::<lambda()>::operator()(void) const (__closure=0x7ffd30a0f9e0) at /home/martin/src/kf5/frameworks/kactivities/src/lib/manager_p.cpp:81
#13 0x00007fc13ca0bb6d in std::_Function_handler<void(), KActivities::Manager::self()::<lambda()> >::_M_invoke(const std::_Any_data &) (__functor=...)
    at /usr/include/c++/7/bits/std_function.h:316
#14 0x00007fc13ca09e52 in std::function<void ()>::operator()() const (this=0x7ffd30a0f9e0) at /usr/include/c++/7/bits/std_function.h:706
#15 0x00007fc13ca09ac1 in KActivities::runInMainThread(std::function<void ()>&&) (f=<unknown type in target:/opt/kf5/lib/x86_64-linux-gnu/libKF5Activities.so.5, CU 0x170121, DIE 0x18cef6>)
    at /home/martin/src/kf5/frameworks/kactivities/src/lib/mainthreadexecutor_p.cpp:53
#16 0x00007fc13ca0af5c in KActivities::Manager::self () at /home/martin/src/kf5/frameworks/kactivities/src/lib/manager_p.cpp:71
#17 0x00007fc13ca0decb in KActivities::ActivitiesCache::ActivitiesCache (this=0x560fd03d1190) at /home/martin/src/kf5/frameworks/kactivities/src/lib/activitiescache_p.cpp:62
#18 0x00007fc13ca0dd02 in KActivities::ActivitiesCache::<lambda()>::operator()(void) const (__closure=0x7ffd30a0fd40)
    at /home/martin/src/kf5/frameworks/kactivities/src/lib/activitiescache_p.cpp:48
#19 0x00007fc13ca0f579 in std::_Function_handler<void(), KActivities::ActivitiesCache::self()::<lambda()> >::_M_invoke(const std::_Any_data &) (__functor=...)
    at /usr/include/c++/7/bits/std_function.h:316
---Type <return> to continue, or q <return> to quit---
#20 0x00007fc13ca09e52 in std::function<void ()>::operator()() const (this=0x7ffd30a0fd40) at /usr/include/c++/7/bits/std_function.h:706
#21 0x00007fc13ca09ac1 in KActivities::runInMainThread(std::function<void ()>&&) (f=<unknown type in target:/opt/kf5/lib/x86_64-linux-gnu/libKF5Activities.so.5, CU 0x170121, DIE 0x18cef6>)
    at /home/martin/src/kf5/frameworks/kactivities/src/lib/mainthreadexecutor_p.cpp:53
#22 0x00007fc13ca0ddf1 in KActivities::ActivitiesCache::self () at /home/martin/src/kf5/frameworks/kactivities/src/lib/activitiescache_p.cpp:47
#23 0x00007fc13c9f4934 in KActivities::ConsumerPrivate::ConsumerPrivate (this=0x560fd0152180) at /home/martin/src/kf5/frameworks/kactivities/src/lib/consumer.cpp:31
#24 0x00007fc13c9f4aab in KActivities::Consumer::Consumer (this=0x560fcffea360, parent=0x560fcffc0f40) at /home/martin/src/kf5/frameworks/kactivities/src/lib/consumer.cpp:42
#25 0x00007fc13c9f60d9 in KActivities::Controller::Controller (this=0x560fcffea360, parent=0x560fcffc0f40) at /home/martin/src/kf5/frameworks/kactivities/src/lib/controller.cpp:33
#26 0x00007fc1416a95f3 in KWin::Activities::Activities (this=0x560fcffc0f40, parent=0x560fd098a110) at /home/martin/src/kf5/kde/workspace/kwin/activities.cpp:40
#27 0x00007fc1416a955b in KWin::Activities::create (parent=0x560fd098a110) at /home/martin/src/kf5/kde/workspace/kwin/activities.cpp:36
#28 0x00007fc141471a2d in KWin::Workspace::Workspace (this=0x560fd098a110, sessionKey=...) at /home/martin/src/kf5/kde/workspace/kwin/workspace.cpp:140
#29 0x00007fc14153a7e4 in KWin::Application::createWorkspace (this=0x7ffd30a10930) at /home/martin/src/kf5/kde/workspace/kwin/main.cpp:279
#30 0x0000560fcdeaa7c0 in KWin::ApplicationWayland::continueStartupWithX (this=0x7ffd30a10930) at /home/martin/src/kf5/kde/workspace/kwin/main_wayland.cpp:260
#31 0x0000560fcdeb4544 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KWin::ApplicationWayland::*)()>::call(void (KWin::ApplicationWayland::*)(), KWin::ApplicationWayland*, void**) (f=(void (KWin::ApplicationWayland::*)(KWin::ApplicationWayland * const)) 0x560fcdeaa41e <KWin::ApplicationWayland::continueStartupWithX()>, o=0x7ffd30a10930, 
    arg=0x560fd03c3d70) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:136
#32 0x0000560fcdeb40f5 in QtPrivate::FunctionPointer<void (KWin::ApplicationWayland::*)()>::call<QtPrivate::List<>, void>(void (KWin::ApplicationWayland::*)(), KWin::ApplicationWayland*, void**) (f=(void (KWin::ApplicationWayland::*)(KWin::ApplicationWayland * const)) 0x560fcdeaa41e <KWin::ApplicationWayland::continueStartupWithX()>, o=0x7ffd30a10930, arg=0x560fd03c3d70)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:169
#33 0x0000560fcdeb38be in QtPrivate::QSlotObject<void (KWin::ApplicationWayland::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, 
    this_=0x560fd05236d0, r=0x7ffd30a10930, a=0x560fd03c3d70, ret=0x0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:120
#34 0x00007fc13766c8c2 in QObject::event (this=0x7ffd30a10930, e=<optimized out>) at kernel/qobject.cpp:1246
#35 0x00007fc137b998d4 in QGuiApplication::event(QEvent*) () from target:/usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#36 0x00007fc13856244f in QApplication::event(QEvent*) () from target:/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#37 0x00007fc13855c59c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from target:/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#38 0x00007fc138563e64 in QApplication::notify(QObject*, QEvent*) () from target:/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#39 0x00007fc13763d258 in QCoreApplication::notifyInternal2 (receiver=0x7ffd30a10930, event=event@entry=0x560fd0520650) at kernel/qcoreapplication.cpp:1018
---Type <return> to continue, or q <return> to quit---
#40 0x00007fc13763f9cd in QCoreApplication::sendEvent (event=0x560fd0520650, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:233
#41 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x560fcff639c0) at kernel/qcoreapplication.cpp:1678
#42 0x00007fc1376932f4 in QEventDispatcherUNIX::processEvents (this=0x560fcff928d0, flags=...) at kernel/qeventdispatcher_unix.cpp:466
#43 0x00007fc1278499dd in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from target:/opt/kf5/lib/x86_64-linux-gnu/plugins/platforms/KWinQpaPlugin.so
#44 0x00007fc13763b2aa in QEventLoop::exec (this=this@entry=0x7ffd30a107b0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#45 0x00007fc137644214 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1291
#46 0x0000560fcdeaed3c in main (argc=4, argv=0x7ffd30a110d8) at /home/martin/src/kf5/kde/workspace/kwin/main_wayland.cpp:838
Comment 5 Martin Flöser 2018-01-13 15:59:08 UTC
Git commit b8f43618478437e52b5e4f7f5cc50d1c689e6b1c by Martin Flöser.
Committed on 13/01/2018 at 15:58.
Pushed by graesslin into branch 'master'.

Disable KActivities integration on Wayland

Once again KActivities causes a delay in the startup of KWin. This is
not the first time it happens, that has been a problem since the start
of the Wayland project.

In the past we added a compile time switch due to that and added a
runtime switch once it stoped freezing (20a9a2a247).
And now it broke again, so let's disable again.

KActivities doesn't make sense on Wayland anyway as there is no activity
support for Wayland windows. Once KActivities is able to be used without
freezing KWin on startup and being able to ensure that it won't break
again we can reenable. But I expect guarantees about that. This must be
ensured by proper autotest support to verify that in future usage of
KActivities in the display manager doesn't freeze it.

This is maintainer decision, due to that no pre-commit review.

CCMAIL: plasma-devel@kde.org

M  +1    -9    main_wayland.cpp

https://commits.kde.org/kwin/b8f43618478437e52b5e4f7f5cc50d1c689e6b1c