Bug 320000

Summary: Kwin crashed when enabling OpenGL from XRender in VirtualBox
Product: [Plasma] kwin Reporter: Dylan <podcaster593>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: crash CC: bugtrack, dump78
Priority: NOR    
Version First Reported In: 4.10.2   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Dylan 2013-05-19 02:34:39 UTC
Application: kwin (4.10.2 "release 1")
KDE Platform Version: 4.10.2 "release 1"
Qt Version: 4.8.4
Operating System: Linux 3.7.10-1.4-desktop i686
Distribution: "openSUSE 12.3 (i586)"

-- Information about the crash:
- What I was doing when the application crashed:
In 'Configure desktop effects', I set Desktop Effects > Advanced > Compositing type to OpenGL from XRender (in an attempt to make all of the KDE effects work).

After I clicked Apply, Kwin attempted to use that setting, then crashed and restarted using its prior settings.

- Custom settings of the application:
Contents of Desktop Effects > Advanced before attempting to enable Kwin (i.e., when Kwin is completely stable):

Compositing type: XRender
Qt graphics system: Native
Keep window thumbnails: Only for Shown Windows
Scale method: Crisp
'Suspend desktop effects for fullscreen windows' is unchecked

The OpenGL Options section is greyed out since Compositing type is set to XRender.

Contents of Desktop Effects > Advanced that are changed from above when trying to enable OpenGL:

Compositing type: OpenGL
'Use OpenGL 2 Shaders' has been tried both checked and unchecked with the same results.
'Use VSync' has been tried both checked and unchecked with the same results.
'Enable color correction (experimental)' is unchecked.

- Other information that may be relevant:
I'm running this in VirtualBox v4.2.6 on an Intel Mac running OS X v10.8.3. The virtual machine has 3GB RAM, two 2.8GHz CPU cores with no execution cap, VT-x, Nested Paging, 128MB video RAM, and 3D acceleration.

The crash can be reproduced every time.

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

Thread 5 (Thread 0xae36cb40 (LWP 5857)):
#0  0xb5dd5792 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xb758785c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libc.so.6
#2  0xb666b24d in QTWTF::TCMalloc_PageHeap::scavengerThread (this=this@entry=0xb6778580 <QTWTF::pageheap_memory>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#3  0xb666b27f in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=0xb6778580 <QTWTF::pageheap_memory>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#4  0xb5dd1b5e in start_thread () from /lib/libpthread.so.0
#5  0xb757a16e in clone () from /lib/libc.so.6

Thread 4 (Thread 0xad051b40 (LWP 5875)):
#0  0xb75420ec in nanosleep () from /lib/libc.so.6
#1  0xadacc820 in RTThreadSleep (cMillies=cMillies@entry=50) at /usr/src/debug/VirtualBox-4.2.6/src/VBox/Runtime/r3/posix/thread2-posix.cpp:82
#2  0xada9ff56 in stubSyncThreadProc (ThreadSelf=0x904ea20, pvUser=0x0) at /usr/src/debug/VirtualBox-4.2.6/src/VBox/Additions/common/crOpenGL/load.c:1148
#3  0xadace5ae in rtThreadMain (pThread=0x904ea20, NativeThread=2902793024, pszThreadName=0x904efac "Sync") at /usr/src/debug/VirtualBox-4.2.6/src/VBox/Runtime/common/misc/thread.cpp:698
#4  0xadada819 in rtThreadNativeMain (pvArgs=0x904ea20) at /usr/src/debug/VirtualBox-4.2.6/src/VBox/Runtime/r3/posix/thread-posix.cpp:302
#5  0xb5dd1b5e in start_thread () from /lib/libpthread.so.0
#6  0xb757a16e in clone () from /lib/libc.so.6

Thread 3 (Thread 0xa3e87b40 (LWP 5876)):
#0  0xb5dd5792 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xb758785c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libc.so.6
#2  0xabfea78c in ?? () from /usr/lib/dri/swrast_dri.so
#3  0xb5dd1b5e in start_thread () from /lib/libpthread.so.0
#4  0xb757a16e in clone () from /lib/libc.so.6

Thread 2 (Thread 0xa3687b40 (LWP 5877)):
#0  0xb5dd5792 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xb758785c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libc.so.6
#2  0xabfea78c in ?? () from /usr/lib/dri/swrast_dri.so
#3  0xb5dd1b5e in start_thread () from /lib/libpthread.so.0
#4  0xb757a16e in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb191aa00 (LWP 5839)):
[KCrash Handler]
#6  0xad8715ba in packspu_TexImage2D (target=3553, level=0, internalformat=32856, width=2560, height=1440, border=0, format=32993, type=5121, pixels=0x0) at /usr/src/debug/VirtualBox-4.2.6/src/VBox/Additions/common/crOpenGL/pack/packspu_pixel.c:394
#7  0xadac668c in cr_glTexImage2D (target=3553, level=0, internalFormat=32856, width=2560, height=1440, border=0, format=32993, type=5121, pixels=0x0) at /usr/src/debug/VirtualBox-4.2.6/out/linux.x86/release/obj/VBoxOGLgen/linux_exports.c:3798
#8  0xb64a0282 in KWin::GLTexture::GLTexture (this=0xbfddf608, width=2560, height=1440) at /usr/src/debug/kde-workspace-4.10.2/kwin/libkwineffects/kwingltexture.cpp:101
#9  0xae3d619c in KWin::BlurEffect::BlurEffect (this=0x8f95658) at /usr/src/debug/kde-workspace-4.10.2/kwin/effects/blur/blur.cpp:45
#10 0xae3d648c in KWin::effect_create_kwin4_effect_blur () at /usr/src/debug/kde-workspace-4.10.2/kwin/effects/blur/blur.cpp:35
#11 0xb76f7016 in KWin::EffectsHandlerImpl::loadEffect (this=this@entry=0x8e35ed0, name=..., checkDefault=false) at /usr/src/debug/kde-workspace-4.10.2/kwin/effects.cpp:1308
#12 0xb76f882f in KWin::EffectsHandlerImpl::slotEffectsQueried (this=0x8e35ed0) at /usr/src/debug/kde-workspace-4.10.2/kwin/effects.cpp:227
#13 0xb76403b2 in qt_static_metacall (_a=0xbfddf8fc, _id=31, _o=0x8e35ed0, _c=<optimized out>) at /usr/src/debug/kde-workspace-4.10.2/build/kwin/moc_effects.cpp:158
#14 KWin::EffectsHandlerImpl::qt_static_metacall (_o=_o@entry=0x8e35ed0, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=31, _a=0xbfddf8fc) at /usr/src/debug/kde-workspace-4.10.2/build/kwin/moc_effects.cpp:117
#15 0xb5f7eb32 in QMetaObject::activate (sender=0x8e672c0, m=0xb60d0800 <QFutureWatcherBase::staticMetaObject>, local_signal_index=1, argv=0x0) at kernel/qobject.cpp:3548
#16 0xb5fcc5b5 in QFutureWatcherBase::finished (this=0x8e672c0) at .moc/release-shared/moc_qfuturewatcher.cpp:141
#17 0xb5e4338c in QFutureWatcherBasePrivate::sendCallOutEvent (this=this@entry=0x8fe4860, event=event@entry=0xaf10c768) at concurrent/qfuturewatcher.cpp:439
#18 0xb5e43692 in QFutureWatcherBase::event (this=0x8e672c0, event=0xaf10c768) at concurrent/qfuturewatcher.cpp:344
#19 0xb5435bac in QApplicationPrivate::notify_helper (this=0x8caed68, receiver=0x8e672c0, e=0xaf10c768) at kernel/qapplication.cpp:4562
#20 0xb543a5cc in QApplication::notify (this=0xaf10c768, receiver=0x8e672c0, e=0xaf10c768) at kernel/qapplication.cpp:3944
#21 0xb7246351 in KApplication::notify (this=0xbfde0178, receiver=0x8e672c0, event=0xaf10c768) at /usr/src/debug/kdelibs-4.10.2/kdeui/kernel/kapplication.cpp:311
#22 0xb7671a9f in notify (e=0xaf10c768, o=0x8e672c0, this=0xbfde0178) at /usr/src/debug/kde-workspace-4.10.2/kwin/main.cpp:371
#23 KWin::Application::notify (this=0xbfde0178, o=0x8e672c0, e=0xaf10c768) at /usr/src/debug/kde-workspace-4.10.2/kwin/main.cpp:367
#24 0xb5f667de in QCoreApplication::notifyInternal (this=0xbfde0178, receiver=0x8e672c0, event=0xaf10c768) at kernel/qcoreapplication.cpp:946
#25 0xb5f6a531 in sendEvent (event=<optimized out>, receiver=<optimized out>) at kernel/qcoreapplication.h:231
#26 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x8c62130) at kernel/qcoreapplication.cpp:1570
#27 0xb5f6a7ac in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1463
#28 0xb54e832d in sendPostedEvents () at ../../src/corelib/kernel/qcoreapplication.h:236
#29 QEventDispatcherX11::processEvents (this=0x8c65998, flags=...) at kernel/qeventdispatcher_x11.cpp:75
#30 0xb5f652ac in QEventLoop::processEvents (this=this@entry=0xbfddfff8, flags=...) at kernel/qeventloop.cpp:149
#31 0xb5f655a1 in QEventLoop::exec (this=0xbfddfff8, flags=...) at kernel/qeventloop.cpp:204
#32 0xb5f6a85a in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218
#33 0xb5433a24 in QApplication::exec () at kernel/qapplication.cpp:3823
#34 0xb7674521 in kdemain (argc=2, argv=0xbfde0264) at /usr/src/debug/kde-workspace-4.10.2/kwin/main.cpp:537
#35 0x080485bb in main (argc=2, argv=0xbfde0264) at /usr/src/debug/kde-workspace-4.10.2/build/kwin/kwin_dummy.cpp:3

Reported using DrKonqi
Comment 1 Martin Flöser 2013-05-19 06:55:37 UTC
(In reply to comment #0) 
> Thread 1 (Thread 0xb191aa00 (LWP 5839)):
> [KCrash Handler]
> #6  0xad8715ba in packspu_TexImage2D (target=3553, level=0,
> internalformat=32856, width=2560, height=1440, border=0, format=32993,
> type=5121, pixels=0x0) at
> /usr/src/debug/VirtualBox-4.2.6/src/VBox/Additions/common/crOpenGL/pack/
> packspu_pixel.c:394
> #7  0xadac668c in cr_glTexImage2D (target=3553, level=0,
> internalFormat=32856, width=2560, height=1440, border=0, format=32993,
> type=5121, pixels=0x0) at
> /usr/src/debug/VirtualBox-4.2.6/out/linux.x86/release/obj/VBoxOGLgen/
> linux_exports.c:3798

I'm sorry it crashes in the driver of the virtual device. Nothing we can do about it.
Comment 2 Thomas Lübking 2013-05-19 07:09:48 UTC
try to disable the blur effect, resp. the "cache blur results" setting.
also (random guess): what's the output of "glxinfo -l | grep -i tex" (in the virtual machine)
Comment 3 Martin Flöser 2014-05-27 05:31:14 UTC
*** Bug 335397 has been marked as a duplicate of this bug. ***
Comment 4 Thomas Lübking 2016-04-01 22:18:29 UTC
*** Bug 361294 has been marked as a duplicate of this bug. ***