Bug 315453 - Kwin crashed on startup.
Summary: Kwin crashed on startup.
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kwin
Classification: Plasma
Component: activities (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 315897 317173 317679 318423 318617 320930 321873 327740 329277 334330 335139 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-19 15:05 UTC by Russ Fineman
Modified: 2015-09-25 11:56 UTC (History)
16 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
kcrash report (4.55 KB, application/octet-stream)
2013-03-30 13:10 UTC, Dennis Schridde
Details
New crash information added by DrKonqi (4.67 KB, text/plain)
2013-04-24 13:18 UTC, Dennis Schridde
Details
New crash information added by DrKonqi (5.08 KB, text/plain)
2013-05-03 17:20 UTC, Dennis Schridde
Details
New crash information added by DrKonqi (8.33 KB, text/plain)
2013-05-07 13:40 UTC, Dennis Schridde
Details
New crash information added by DrKonqi (8.26 KB, text/plain)
2013-05-08 17:02 UTC, Dennis Schridde
Details
New crash information added by DrKonqi (6.49 KB, text/plain)
2013-06-08 21:05 UTC, John Koch
Details
New crash information added by DrKonqi (7.11 KB, text/plain)
2013-06-14 08:31 UTC, Dennis Schridde
Details
New crash information added by DrKonqi (7.80 KB, text/plain)
2013-06-28 17:49 UTC, Dennis Schridde
Details
New crash information added by DrKonqi (7.20 KB, text/plain)
2013-10-11 09:22 UTC, Dennis Schridde
Details
New crash information added by DrKonqi (7.32 KB, text/plain)
2013-10-12 07:04 UTC, Dennis Schridde
Details
New crash information added by DrKonqi (7.22 KB, text/plain)
2013-10-12 18:02 UTC, Dennis Schridde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Russ Fineman 2013-02-19 15:05:32 UTC
Application: kwin (4.10.00 "release 550")
KDE Platform Version: 4.10.00 "release 550"
Qt Version: 4.8.4
Operating System: Linux 3.4.28-2.20-desktop x86_64
Distribution: "openSUSE 12.2 (x86_64)"

-- Information about the crash:
- What I was doing when the application crashed:
Starting up the computer. message KWIN crashed as desktop was displayed.

-- Backtrace:
Application: KWin (kwin), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f51895cb7c0 (LWP 4375))]

Thread 3 (Thread 0x7f516d9a5700 (LWP 4376)):
[KCrash Handler]
#6  0x00007f518410e16c in QCoreApplicationPrivate::sendPostedEvents (receiver=0x1fa3310, event_type=43, data=0x1fc4d30) at kernel/qcoreapplication.cpp:1474
#7  0x00007f5185322236 in waitForCallFinished (mutex=0x1f78350, watcher=<optimized out>) at /usr/src/debug/kactivities-4.10.0/src/lib/core/utils_p.h:96
#8  KActivities::Consumer::currentActivity (this=0x1f92298) at /usr/src/debug/kactivities-4.10.0/src/lib/core/consumer.cpp:161
#9  0x00007f5189102631 in KWin::fetchActivityListAndCurrent (controller=0x1f92298) at /usr/src/debug/kde-workspace-4.10.0/kwin/workspace.cpp:1406
#10 0x00007f518910d873 in QtConcurrent::StoredFunctorCall1<QPair<QString, QStringList>, QPair<QString, QStringList> (*)(KActivities::Controller*), KActivities::Controller*>::runFunctor (this=0x2096ec0) at /usr/include/QtCore/qtconcurrentstoredfunctioncall.h:267
#11 0x00007f5189111e36 in QtConcurrent::RunFunctionTask<QPair<QString, QStringList> >::run (this=0x2096ec0) at /usr/include/QtCore/qtconcurrentrunbase.h:106
#12 0x00007f5184002c5d in QThreadPoolThread::run (this=0x1fc4b90) at concurrent/qthreadpool.cpp:107
#13 0x00007f518400f08c in QThreadPrivate::start (arg=0x1fc4b90) at thread/qthread_unix.cpp:338
#14 0x00007f5184c603a4 in ?? () from /usr/lib64/libGL.so.1
#15 0x00007f5183d78e0e in start_thread () from /lib64/libpthread.so.0
#16 0x00007f5188dfe2cd in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f5166d26700 (LWP 4391)):
#0  0x00007f5183d7c8f4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f51856bc247 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x7f51859c9640 <QTWTF::pageheap_memory>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#2  0x00007f51856bc279 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=<optimized out>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#3  0x00007f5184c603a4 in ?? () from /usr/lib64/libGL.so.1
#4  0x00007f5183d78e0e in start_thread () from /lib64/libpthread.so.0
#5  0x00007f5188dfe2cd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f51895cb7c0 (LWP 4375)):
#0  0x00007f5183d7c8f4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f518400f5eb in wait (time=18446744073709551615, this=0x1fc4b20) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x1fc4a28, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f518400242f in QThreadPoolPrivate::waitForDone (this=0x1fc49a0, msecs=msecs@entry=-1) at concurrent/qthreadpool.cpp:298
#4  0x00007f5184003edd in QThreadPool::~QThreadPool (this=0x1fc4980, __in_chrg=<optimized out>) at concurrent/qthreadpool.cpp:440
#5  0x00007f5184003f19 in QThreadPool::~QThreadPool (this=0x1fc4980, __in_chrg=<optimized out>) at concurrent/qthreadpool.cpp:442
#6  0x00007f5184003f45 in QGlobalStaticDeleter<QThreadPool>::~QGlobalStaticDeleter (this=0x7f5184468fc8 <theInstance()::cleanup>, __in_chrg=<optimized out>) at ../../src/corelib/global/qglobal.h:1949
#7  0x00007f5188d518b1 in __run_exit_handlers () from /lib64/libc.so.6
#8  0x00007f5188d51935 in exit () from /lib64/libc.so.6
#9  0x00007f5183302558 in qt_xio_errhandler () at kernel/qapplication_x11.cpp:772
#10 0x00007f51888f9878 in KApplication::xioErrhandler (this=0x7fff520372b0, dpy=0x1ea8200) at /usr/src/debug/kdelibs-4.10.0/kdeui/kernel/kapplication.cpp:419
#11 0x00007f5186e7fc4e in _XIOError () from /usr/lib64/libX11.so.6
#12 0x00007f5186e7d6ed in _XEventsQueued () from /usr/lib64/libX11.so.6
#13 0x00007f5186e6ebfb in XEventsQueued () from /usr/lib64/libX11.so.6
#14 0x00007f5183339a62 in QEventDispatcherX11::processEvents (this=0x1e09a70, flags=...) at kernel/qeventdispatcher_x11.cpp:141
#15 0x00007f518410994f in QEventLoop::processEvents (this=this@entry=0x7fff52036fc0, flags=...) at kernel/qeventloop.cpp:149
#16 0x00007f5184109bd8 in QEventLoop::exec (this=0x7fff52036fc0, flags=...) at kernel/qeventloop.cpp:204
#17 0x00007f518410e878 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218
#18 0x00007f518912993a in kdemain (argc=3, argv=0x7fff520373f8) at /usr/src/debug/kde-workspace-4.10.0/kwin/main.cpp:537
#19 0x00007f5188d3b455 in __libc_start_main () from /lib64/libc.so.6
#20 0x0000000000400721 in _start () at ../sysdeps/x86_64/elf/start.S:113

Reported using DrKonqi
Comment 1 Thomas Lübking 2013-02-19 17:22:03 UTC
crash on exit, we should not get _XIOError in the first place.

a) can you reproduce this (does it happen on every start)?
b) can you start kwin afterwards, resp. does it come up by itself?
c) in case of a + b, please attach the output of "qdbus org.kde.kwin /KWin supportInformation"
Comment 2 Russ Fineman 2013-02-19 18:48:18 UTC
On Tuesday, February 19, 2013 05:22:03 PM Thomas Lübking wrote:
> https://bugs.kde.org/show_bug.cgi?id=315453
> 
> --- Comment #1 from Thomas Lübking <thomas.luebking@gmail.com> ---
> crash on exit, we should not get _XIOError in the first place.
> 
> a) can you reproduce this (does it happen on every start)?
 No,  that was first time it happened. Did some updates yesterday.

> b) can you start kwin afterwards, resp. does it come up by itself?
Yes kwin started on reboot. Did not try by itself.

> c) in case of a + b, please attach the output of "qdbus org.kde.kwin /KWin
> supportInformation"
Here the link to the results of:
[CODE]
@linux-9wvj:~> qdbus org.kde.kwin /KWin supportInformation

<http://paste.kde.org/676232/>

[/CODE]
Hope this helps.
Comment 3 Thomas Lübking 2013-02-19 19:37:03 UTC
Ok, please call back in case it happens again.
Otherwise we wont get down to the I/O error.

Could jsut have been some pending X resource flying around in the system due to the update.
Comment 4 Russ Fineman 2013-02-20 17:18:07 UTC
On Tuesday, February 19, 2013 07:37:03 PM Thomas Lübking wrote:
> https://bugs.kde.org/show_bug.cgi?id=315453
> 
> --- Comment #3 from Thomas Lübking <thomas.luebking@gmail.com> ---
> Ok, please call back in case it happens again.
> Otherwise we wont get down to the I/O error.
> 
> Could jsut have been some pending X resource flying around in the system due
> to the update.
Thanks. I'll let you know if it occurs again.
Comment 5 Thomas Lübking 2013-03-01 15:31:13 UTC
*** Bug 315897 has been marked as a duplicate of this bug. ***
Comment 6 Thomas Lübking 2013-03-01 15:31:38 UTC
other pot. dupe: bug #313187
Comment 7 Christoph Feck 2013-03-02 02:25:46 UTC
Here, the X io error is caused by the activities thread crashing, while bug 313187 looks like a egl bug.
Comment 8 Thomas Lübking 2013-03-02 10:44:16 UTC
the only connection is actually that t3 holds a mutex in list fetching - ie if both situations are due to some race (no idea what egl image creation does) rather than a "regular" crash in the activity thread
Comment 9 Dennis Schridde 2013-03-18 11:59:53 UTC
I also experience this problem occasionally: "I have setup kdm to auto-login. Sometimes (maybe if I do not unlock within a few minutes after login?) it happens, that kwin crashes without me having interacted with the computer in any way (besides pressing the power button when it was cold)."

See also: bug #316955
Comment 10 Thomas Lübking 2013-03-22 11:12:10 UTC
*** Bug 317173 has been marked as a duplicate of this bug. ***
Comment 11 Dennis Schridde 2013-03-30 13:10:58 UTC
Created attachment 78505 [details]
kcrash report

Most of the time DrKonqi does not detect the KWin crash, but this time I was able to extract a kcrash report. Again, same circumstances as in bug #316955.
Comment 12 Thomas Lübking 2013-04-01 13:16:15 UTC
*** Bug 317679 has been marked as a duplicate of this bug. ***
Comment 13 Thomas Lübking 2013-04-01 13:23:23 UTC
I think bug #317679 could explain it, thread #1 is in
#10 0x00007fa71bf35443 in malloc () from /lib64/libc.so.6
#11 0x0000003a5ac7d7f5 in QByteArray::QByteArray(char const*, int) () from /lib64/libQtCore.so.4
#12 0x00000035184bff1a in KConfigIniBackend::parseConfig(QByteArray const&, KEntryMap&, QFlags<KConfigBackend::ParseOption>, bool) () from /lib64/libkdecore.so.5
#13 0x00000035184c0069 in KConfigIniBackend::writeConfig(QByteArray const&, KEntryMap&, QFlags<KConfigBackend::WriteOption>, KComponentData const&) () from /lib64/libkdecore.so.5
#14 0x00000035184ab7e6 in KConfig::sync() () from /lib64/libkdecore.so.5

@Ivan
iirc you wanted to operate on a KConfig cache to cover the sync dbus protocol. Does that (still) happen?
Comment 14 Martin Flöser 2013-04-16 06:35:20 UTC
*** Bug 318423 has been marked as a duplicate of this bug. ***
Comment 15 Thomas Lübking 2013-04-20 07:16:15 UTC
*** Bug 318617 has been marked as a duplicate of this bug. ***
Comment 16 Dennis Schridde 2013-04-22 13:06:21 UTC
>*kwin-4.10.2-r1 (22 Apr 2013)
>	  22 Apr 2013; Michael Palimaka <kensington@gentoo.org>
>	  +files/kwin-4.10.2-mesa.patch, +kwin-4.10.2-r1.ebuild:
>	  Backport workaround from upstream to fix crashes with mesa-9.1/r600 and
>	  >=linux-3.8.

Is this related?

From: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/kde-base/kwin/ChangeLog?view=markup
Comment 17 Thomas Lübking 2013-04-22 13:13:52 UTC
no
Comment 18 Dennis Schridde 2013-04-24 13:18:12 UTC
Created attachment 79413 [details]
New crash information added by DrKonqi

kwin (4.10.2) on KDE Platform 4.10.2 using Qt 4.8.4

- What I was doing when the application crashed:

I unlocked my autologin session after booting.

-- Backtrace (Reduced):
#6  0x000000319b17640c in QCoreApplicationPrivate::sendPostedEvents (receiver=0x1faf000, event_type=43, data=0x1f5c8e0) at kernel/qcoreapplication.cpp:1474
#7  0x00000031a28099dc in KActivities::Consumer::listActivities() const () from /usr/lib64/libkactivities.so.6
#8  0x00000035e8c40d84 in KWin::fetchActivityListAndCurrent (controller=0x1faa0c8) at /var/tmp/portage/kde-base/kwin-4.10.2-r1/work/kwin-4.10.2/kwin/workspace.cpp:1405
#9  0x00000035e8c4bd83 in QtConcurrent::StoredFunctorCall1<QPair<QString, QStringList>, QPair<QString, QStringList> (*)(KActivities::Controller*), KActivities::Controller*>::runFunctor (this=0x2015ea0) at /usr/include/qt4/QtCore/qtconcurrentstoredfunctioncall.h:267
#10 0x00000035e8c50206 in QtConcurrent::RunFunctionTask<QPair<QString, QStringList> >::run (this=0x2015ea0) at /usr/include/qt4/QtCore/qtconcurrentrunbase.h:106
Comment 19 Dennis Schridde 2013-05-03 17:20:05 UTC
Created attachment 79674 [details]
New crash information added by DrKonqi

kwin (4.10.2) on KDE Platform 4.10.2 using Qt 4.8.4

- What I was doing when the application crashed:

KDE started with KDM autologin and KWin crashed immediately after (?) unlocking the session.

-- Backtrace (Reduced):
#6  0x000000319b17640c in QCoreApplicationPrivate::sendPostedEvents (receiver=0x965e00, event_type=43, data=0x96f170) at kernel/qcoreapplication.cpp:1474
#7  0x00000039dd8099dc in KActivities::Consumer::listActivities() const () from /usr/lib64/libkactivities.so.6
#8  0x000000327c440304 in KWin::fetchActivityListAndCurrent (controller=0x9a8358) at /var/tmp/portage/kde-base/kwin-4.10.2-r1/work/kwin-4.10.2/kwin/workspace.cpp:1405
#9  0x000000327c44b303 in QtConcurrent::StoredFunctorCall1<QPair<QString, QStringList>, QPair<QString, QStringList> (*)(KActivities::Controller*), KActivities::Controller*>::runFunctor (this=0xa285e0) at /usr/include/qt4/QtCore/qtconcurrentstoredfunctioncall.h:267
#10 0x000000327c44f786 in QtConcurrent::RunFunctionTask<QPair<QString, QStringList> >::run (this=0xa285e0) at /usr/include/qt4/QtCore/qtconcurrentrunbase.h:106
Comment 20 Dennis Schridde 2013-05-07 13:40:05 UTC
Created attachment 79755 [details]
New crash information added by DrKonqi

kwin (4.10.2) on KDE Platform 4.10.2 using Qt 4.8.4

- What I was doing when the application crashed:

KWin crashed again on startup after auto-login. I saw the DrKonqi message right after unlocking. Plasma was not yet started.

-- Backtrace (Reduced):
#6  0x0000003af657640c in QCoreApplicationPrivate::sendPostedEvents (receiver=0xbfaed0, event_type=43, data=0xb925a0) at kernel/qcoreapplication.cpp:1474
#7  0x0000003b072099dc in KActivities::Consumer::listActivities() const () from /usr/lib64/libkactivities.so.6
#8  0x0000003b04840304 in KWin::fetchActivityListAndCurrent (controller=0xbdfb38) at /var/tmp/portage/kde-base/kwin-4.10.2-r1/work/kwin-4.10.2/kwin/workspace.cpp:1405
#9  0x0000003b0484b303 in QtConcurrent::StoredFunctorCall1<QPair<QString, QStringList>, QPair<QString, QStringList> (*)(KActivities::Controller*), KActivities::Controller*>::runFunctor (this=0xc60ce0) at /usr/include/qt4/QtCore/qtconcurrentstoredfunctioncall.h:267
#10 0x0000003b0484f786 in QtConcurrent::RunFunctionTask<QPair<QString, QStringList> >::run (this=0xc60ce0) at /usr/include/qt4/QtCore/qtconcurrentrunbase.h:106
Comment 21 Dennis Schridde 2013-05-08 17:02:34 UTC
Created attachment 79783 [details]
New crash information added by DrKonqi

kwin (4.10.3) on KDE Platform 4.10.3 using Qt 4.8.4

- What I was doing when the application crashed:

The issue persists in KDE 4.10.3.

[.....]

-- Backtrace (Reduced):
#6  0x0000003af657640c in QCoreApplicationPrivate::sendPostedEvents (receiver=0x24e1200, event_type=43, data=0x247d440) at kernel/qcoreapplication.cpp:1474
#7  0x00007f9b6d36c9dc in KActivities::Consumer::listActivities() const () from /usr/lib64/libkactivities.so.6
#8  0x00007f9b6e7b0304 in KWin::fetchActivityListAndCurrent (controller=0x248fda8) at /var/tmp/portage/kde-base/kwin-4.10.3/work/kwin-4.10.3/kwin/workspace.cpp:1405
#9  0x00007f9b6e7bb303 in QtConcurrent::StoredFunctorCall1<QPair<QString, QStringList>, QPair<QString, QStringList> (*)(KActivities::Controller*), KActivities::Controller*>::runFunctor (this=0x254f1a0) at /usr/include/qt4/QtCore/qtconcurrentstoredfunctioncall.h:267
#10 0x00007f9b6e7bf786 in QtConcurrent::RunFunctionTask<QPair<QString, QStringList> >::run (this=0x254f1a0) at /usr/include/qt4/QtCore/qtconcurrentrunbase.h:106
Comment 22 Thomas Lübking 2013-05-08 19:45:49 UTC
https://bugreports.qt-project.org/browse/QTBUG-27809
also compare bug #297502 & bug #254034

It *smells* as if blocking dbus out of a secondary thread simply is risky.

Because of eg. bug #314575 or #295933 (and in general) we generally cannot make blocking dbus calls from the compositor or even WM thread.

It would be good if KActivities had an async API (ie. we would simply send a request to send us the list), otherwise we had to take the -effectively blocking, it seems only Running is  cached anyway- sync dbus call (on Workspace::init())
Comment 23 Steffen Michalek 2013-05-10 13:46:43 UTC
Hello,  I searched help for an bug that seemed to look similar,
and found bug https://bugs.kde.org/show_bug.cgi?id=318941,
which solved my problem by using other window decoration "air"
instead of "air-oxygen"
(system settings -> desktop -> appearence -> decoration (? in german here))
or by downloading "air-oxygen" 
(same place: button "downloading new decoration")
- now everything is o.k.
Comment 24 Thomas Lübking 2013-05-10 13:51:13 UTC
(In reply to comment #23)
> Hello,  I searched help for an bug that seemed to look similar,
but completely unrelated.
that bug was caused by the aurorae engine not sufficiently handling the absence of the configured decoration and ubuntu changing their packages w/o altering the usersettings through a kconf update.
Comment 25 Martin Flöser 2013-05-10 15:23:11 UTC
> ubuntu changing their packages w/o
> altering the usersettings through a kconf update.
I know it's not the rule, but this time we (or better said I) should take the 
blame. I removed them from kde-artwork and didn't consider that this means 
that they will get uninstalled.
Comment 26 Thomas Lübking 2013-05-10 17:04:58 UTC
(In reply to comment #25)
> blame. I removed them from kde-artwork and didn't consider that this 
Then I shall apologize for blaming the wrong location for altering packages w/o a kconf update. (most surprisingly i don't have kde-artwork installed ;-)
Comment 27 Thomas Lübking 2013-06-08 19:30:00 UTC
*** Bug 320930 has been marked as a duplicate of this bug. ***
Comment 28 John Koch 2013-06-08 21:05:13 UTC
Created attachment 80403 [details]
New crash information added by DrKonqi

kwin (4.10.4) on KDE Platform 4.10.4 using Qt 4.8.2

- What I was doing when the application crashed: Logged into the system after a few seconds the screen blinked black and restarted. Nothing unusual except for the blink and crash indication.

-- Backtrace (Reduced):
#6  0x00007fc3dfc57ccc in QCoreApplicationPrivate::sendPostedEvents (receiver=0xfa2b70, event_type=43, data=0xf7c1d0) at kernel/qcoreapplication.cpp:1443
#7  0x00007fc3e0d5b21c in KActivities::Consumer::listActivities() const () from /usr/lib/libkactivities.so.6
#8  0x00007fc3e4b47eb4 in KWin::fetchActivityListAndCurrent (controller=0xfa2cf8) at ../../kwin/workspace.cpp:1405
#9  0x00007fc3e4b51df3 in QtConcurrent::StoredFunctorCall1<QPair<QString, QStringList>, QPair<QString, QStringList> (*)(KActivities::Controller*), KActivities::Controller*>::runFunctor (this=0x1009aa0) at /usr/include/qt4/QtCore/qtconcurrentstoredfunctioncall.h:267
#10 0x00007fc3e4b53b86 in run (this=0x1009aa0) at /usr/include/qt4/QtCore/qtconcurrentrunbase.h:106
Comment 29 Dennis Schridde 2013-06-14 08:31:52 UTC
Created attachment 80510 [details]
New crash information added by DrKonqi

kwin (4.10.4) on KDE Platform 4.10.4 using Qt 4.8.4

- What I was doing when the application crashed:

Still happens in KDE 4.10.4. [.........]

-- Backtrace (Reduced):
#6  0x0000003fd7d7640c in QCoreApplicationPrivate::sendPostedEvents (receiver=0x8aca70, event_type=43, data=0x8a1780) at kernel/qcoreapplication.cpp:1474
#7  0x0000003fd640b80b in KActivities::Consumer::listActivities() const () from /usr/lib64/libkactivities.so.6
#8  0x00007f0e025137e4 in KWin::fetchActivityListAndCurrent (controller=0x85a508) at /var/tmp/portage/kde-base/kwin-4.10.4/work/kwin-4.10.4/kwin/workspace.cpp:1405
#9  0x00007f0e0251d1d3 in QtConcurrent::StoredFunctorCall1<QPair<QString, QStringList>, QPair<QString, QStringList> (*)(KActivities::Controller*), KActivities::Controller*>::runFunctor (this=0x91c0c0) at /usr/include/qt4/QtCore/qtconcurrentstoredfunctioncall.h:267
#10 0x00007f0e02520a96 in QtConcurrent::RunFunctionTask<QPair<QString, QStringList> >::run (this=0x91c0c0) at /usr/include/qt4/QtCore/qtconcurrentrunbase.h:106
Comment 30 Toralf Förster 2013-06-14 09:35:05 UTC
I've the feeling that this bug now occurs much more often with kernel 3.10-rcX than with stable 3.9.X
Comment 31 Thomas Lübking 2013-06-14 18:59:34 UTC
Does it also (ever?) crash on "kwin --replace" or only on session start?
Comment 32 Toralf Förster 2013-06-14 19:50:26 UTC
(In reply to comment #31)
> Does it also (ever?) crash on "kwin --replace" or only on session start?

I run a lot of "kwin --replace &" w/o any problems - and yes - it crashed only at login few times.
Comment 33 Thomas Lübking 2013-06-14 20:35:31 UTC
Ok, thanks (it's valuable information by opening another option to deal with the core problem)
Comment 34 Dennis Schridde 2013-06-28 17:49:40 UTC
Created attachment 80836 [details]
New crash information added by DrKonqi

kwin (4.10.4) on KDE Platform 4.10.4 using Qt 4.8.4

- What I was doing when the application crashed:
This time it happened on `kwin --replace`: After booting the PC and autologin, I unlocked the screen and found Plasma not using transparency. Pressing Alt+F12 to disable and re-enable compositing did not help, as usual. So (as usual), I ran `kwin --replace` on a console (Yakuake, which I also had open during pressing Alt+F12, so I could verify compositing being off, when Yakuake became opaque). Right thereafter kwin crashed.

-- Backtrace (Reduced):
#6  0x0000003fd7d7640c in QCoreApplicationPrivate::sendPostedEvents (receiver=0x1718570, event_type=43, data=0x16c7630) at kernel/qcoreapplication.cpp:1474
#7  0x0000003c59c0b80b in KActivities::Consumer::listActivities() const () from /usr/lib64/libkactivities.so.6
#8  0x00007f47759087e4 in KWin::fetchActivityListAndCurrent (controller=0x16c0bd8) at /var/tmp/portage/kde-base/kwin-4.10.4/work/kwin-4.10.4/kwin/workspace.cpp:1405
#9  0x00007f47759121d3 in QtConcurrent::StoredFunctorCall1<QPair<QString, QStringList>, QPair<QString, QStringList> (*)(KActivities::Controller*), KActivities::Controller*>::runFunctor (this=0x1783460) at /usr/include/qt4/QtCore/qtconcurrentstoredfunctioncall.h:267
#10 0x00007f4775915a96 in QtConcurrent::RunFunctionTask<QPair<QString, QStringList> >::run (this=0x1783460) at /usr/include/qt4/QtCore/qtconcurrentrunbase.h:106
Comment 35 Thomas Lübking 2013-07-02 20:19:12 UTC
*** Bug 321873 has been marked as a duplicate of this bug. ***
Comment 36 Dennis Schridde 2013-10-11 09:22:12 UTC
Created attachment 82783 [details]
New crash information added by DrKonqi

kwin (4.11.2) on KDE Platform 4.11.2 using Qt 4.8.5

- What I was doing when the application crashed:

Shortly after logging into my auto-login session after the computer started, I noticed the DrKonqi crash report window about kwin. I assume it was there since login, but it took a few minutes for me to notice.

-- Backtrace (Reduced):
#6  0x000000328957fe7c in QCoreApplicationPrivate::sendPostedEvents (receiver=0x199ce90, event_type=43, data=0x19b0470) at kernel/qcoreapplication.cpp:1477
#7  0x0000003925409928 in KActivities::Consumer::listActivities() const () from /usr/lib64/libkactivities.so.6
#8  0x00007f807909c644 in KWin::fetchActivityListAndCurrent (controller=0x18e8520) at /var/tmp/portage/kde-base/kwin-4.11.2/work/kwin-4.11.2/kwin/activities.cpp:232
#9  0x00007f807909f013 in QtConcurrent::StoredFunctorCall1<QPair<QString, QStringList>, QPair<QString, QStringList> (*)(KActivities::Controller*), KActivities::Controller*>::runFunctor (this=0x1a5d7c0) at /usr/include/qt4/QtCore/qtconcurrentstoredfunctioncall.h:267
#10 0x00007f80790a19d6 in QtConcurrent::RunFunctionTask<QPair<QString, QStringList> >::run (this=0x1a5d7c0) at /usr/include/qt4/QtCore/qtconcurrentrunbase.h:106
Comment 37 Dennis Schridde 2013-10-12 07:04:44 UTC
Created attachment 82796 [details]
New crash information added by DrKonqi

kwin (4.11.2) on KDE Platform 4.11.2 using Qt 4.8.5

- What I was doing when the application crashed:

When I unlocked KDE autologin session just after the computer booted, there already was a DrKonqi crash report window open about a kwin crash.

-- Backtrace (Reduced):
#6  0x000000328957fe7c in QCoreApplicationPrivate::sendPostedEvents (receiver=0x2081100, event_type=43, data=0x2095d50) at kernel/qcoreapplication.cpp:1477
#7  0x0000003925409928 in KActivities::Consumer::listActivities() const () from /usr/lib64/libkactivities.so.6
#8  0x00007f6d0f911644 in KWin::fetchActivityListAndCurrent (controller=0x1fbbd30) at /var/tmp/portage/kde-base/kwin-4.11.2/work/kwin-4.11.2/kwin/activities.cpp:232
#9  0x00007f6d0f914013 in QtConcurrent::StoredFunctorCall1<QPair<QString, QStringList>, QPair<QString, QStringList> (*)(KActivities::Controller*), KActivities::Controller*>::runFunctor (this=0x212b5f0) at /usr/include/qt4/QtCore/qtconcurrentstoredfunctioncall.h:267
#10 0x00007f6d0f9169d6 in QtConcurrent::RunFunctionTask<QPair<QString, QStringList> >::run (this=0x212b5f0) at /usr/include/qt4/QtCore/qtconcurrentrunbase.h:106
Comment 38 Thomas Lübking 2013-10-12 08:15:32 UTC
pattern:
thread1 - X request
thread2 - dbus in activities

probably more the lack of XInitThreads than the dbus mutex issue (Qt bug)

--> can anybody who encounters this on a pretty regular base compile a patch?
Comment 39 Dennis Schridde 2013-10-12 08:26:11 UTC
(In reply to comment #38)
> --> can anybody who encounters this on a pretty regular base compile a patch?

Yes, I'm on Gentoo. Just give me a link.
Comment 40 Thomas Lübking 2013-10-12 09:44:44 UTC
It's not a very complex patch ;-)

(the only thing added to kdemain in main.cpp is XInitThreads())


From cbd0fee957b781ecf5c6c6796288bf140345d8a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20L=C3=BCbking?= <thomas.luebking@gmail.com>
Date: Sat, 12 Oct 2013 11:46:59 +0200
Subject: [PATCH 1/2] call XInitThreads

---
 kwin/main.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kwin/main.cpp b/kwin/main.cpp
index 1052295..e94642f 100644
--- a/kwin/main.cpp
+++ b/kwin/main.cpp
@@ -462,6 +462,7 @@ static const char description[] = I18N_NOOP("KDE window manager");
 extern "C"
 KDE_EXPORT int kdemain(int argc, char * argv[])
 {
+    XInitThreads();
 #ifdef M_TRIM_THRESHOLD
     // Prevent fragmentation of the heap by malloc (glibc).
     //
-- 
1.8.4
Comment 41 Dennis Schridde 2013-10-12 18:02:54 UTC
Created attachment 82804 [details]
New crash information added by DrKonqi

kwin (4.11.2) on KDE Platform 4.11.2 using Qt 4.8.5

- What I was doing when the application crashed:

Still crashes with the patch from comment #40. I reemerged kde-base/kwin with your patch in /etc/portage/patches/kde-base/kwin/ - and the ebuild/portage claimed that it was applying it.

-- Backtrace (Reduced):
#6  0x000000328957fe7c in QCoreApplicationPrivate::sendPostedEvents (receiver=0x2130b30, event_type=43, data=0x2150e90) at kernel/qcoreapplication.cpp:1477
#7  0x0000003925409928 in KActivities::Consumer::listActivities() const () from /usr/lib64/libkactivities.so.6
#8  0x00007f4183b90694 in KWin::fetchActivityListAndCurrent (controller=0x208ff10) at /var/tmp/portage/kde-base/kwin-4.11.2/work/kwin-4.11.2/kwin/activities.cpp:232
#9  0x00007f4183b93063 in QtConcurrent::StoredFunctorCall1<QPair<QString, QStringList>, QPair<QString, QStringList> (*)(KActivities::Controller*), KActivities::Controller*>::runFunctor (this=0x21fbfc0) at /usr/include/qt4/QtCore/qtconcurrentstoredfunctioncall.h:267
#10 0x00007f4183b95a26 in QtConcurrent::RunFunctionTask<QPair<QString, QStringList> >::run (this=0x21fbfc0) at /usr/include/qt4/QtCore/qtconcurrentrunbase.h:106
Comment 42 Martin Flöser 2013-10-14 15:48:27 UTC
Alex Fiestas mentioned to me today that dbus is not threat safe.
Comment 43 Thomas Lübking 2013-10-14 17:13:04 UTC
The problem i'm aware of is https://bugreports.qt-project.org/browse/QTBUG-27809 what howeve would look different.

Not being able to use dbus from threads however implies that we've to drop activity support of kactivities needs an async API.

Reg. this bug, i had prepared another patch to just schedule activity fetching.
https://git.reviewboard.kde.org/r/111375/diff/#index_header

No idea whether it still applies.
Comment 44 Martin Flöser 2013-10-14 17:23:11 UTC
> Not being able to use dbus from threads however implies that we've to drop
> activity support of kactivities needs an async API.
AFAIK Ivan is reworking the API for KF5 which is the reason why at the moment 
the code is dead in kwin5
Comment 45 Russ Fineman 2013-10-14 18:00:49 UTC
(In reply to comment #43)
> The problem i'm aware of is
> https://bugreports.qt-project.org/browse/QTBUG-27809 what howeve would look
> different.
> 
> Not being able to use dbus from threads however implies that we've to drop
> activity support of kactivities needs an async API.
> 
> Reg. this bug, i had prepared another patch to just schedule activity
> fetching.
> https://git.reviewboard.kde.org/r/111375/diff/#index_header
> 
> No idea whether it still applies.

I have not seen this crash ince I started using KDE 4.11. Presently on KDE 4.11.2. Patch may not apply to 4.11.2 or may already have been corrected.
Comment 46 Thomas Lübking 2013-11-18 01:24:43 UTC
*** Bug 327740 has been marked as a duplicate of this bug. ***
Comment 47 Thomas Lübking 2013-12-27 16:07:55 UTC
*** Bug 329277 has been marked as a duplicate of this bug. ***
Comment 48 Thomas Lübking 2014-05-04 15:47:17 UTC
*** Bug 334330 has been marked as a duplicate of this bug. ***
Comment 49 Martin Flöser 2014-05-21 12:45:49 UTC
*** Bug 335139 has been marked as a duplicate of this bug. ***
Comment 50 Thomas Lübking 2015-09-25 11:56:09 UTC
The sync activities API is gone, we're not threading anymore - this should no longer be a problem and last bug reports were filed more than a year ago.