Bug 278741 - Virtualbox 4.1 opengl composite
Summary: Virtualbox 4.1 opengl composite
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-28 23:24 UTC by David Gräff
Modified: 2011-07-29 12:44 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Gräff 2011-07-28 23:24:08 UTC
Application: kwin (4.7.00 (4.7.0))
KDE Platform Version: 4.7.00 (4.7.0)
Qt Version: 4.7.3
Operating System: Linux 3.0.0-7-generic x86_64
Distribution: Ubuntu oneiric (development branch)

-- Information about the crash:
- What I was doing when the application crashed:
I clicked accept after setting composite mode to opengl (with "Use OpenGl 2 Shaders").

System is a virtualbox 4.1 VM with 128 mb graphics memory, host is a windows 7. Hardware: Core i7 and nvidia. XRender works with artifacts.

The crash can be reproduced every time.

-- Backtrace:
Application: KWin (kwin), signal: Segmentation fault
[Current thread is 1 (Thread 0x7fd0534677a0 (LWP 3188))]

Thread 3 (Thread 0x7fd0392be700 (LWP 3192)):
#0  0x00007fd052c9e2d3 in select () at ../sysdeps/unix/syscall-template.S:82
#1  0x00007fd04f0a43d6 in qt_safe_select (nfds=14, fdread=0x1661dc0, fdwrite=0x1662058, fdexcept=0x16622f0, orig_timeout=<value optimized out>) at kernel/qcore_unix.cpp:82
#2  0x00007fd04f0a9bb0 in QEventDispatcherUNIXPrivate::doSelect (this=0x1661c00, flags=..., timeout=0x0) at kernel/qeventdispatcher_unix.cpp:219
#3  0x00007fd04f0aa0b3 in QEventDispatcherUNIX::processEvents (this=0x1698af0, flags=...) at kernel/qeventdispatcher_unix.cpp:919
#4  0x00007fd04f07bc62 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007fd04f07be67 in QEventLoop::exec (this=0x7fd0392bddb0, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007fd04ef932cf in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:492
#7  0x00007fd04f05ec2f in QInotifyFileSystemWatcherEngine::run (this=0x1693980) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007fd04ef95d55 in QThreadPrivate::start (arg=0x1693980) at thread/qthread_unix.cpp:320
#9  0x00007fd049248d8c in start_thread (arg=0x7fd0392be700) at pthread_create.c:304
#10 0x00007fd052ca61dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fd038aad700 (LWP 3193)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fd051afed82 in ?? () from /usr/lib/libQtScript.so.4
#2  0x00007fd051afedb9 in ?? () from /usr/lib/libQtScript.so.4
#3  0x00007fd049248d8c in start_thread (arg=0x7fd038aad700) at pthread_create.c:304
#4  0x00007fd052ca61dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fd0534677a0 (LWP 3188)):
[KCrash Handler]
#6  __memcpy_ssse3_back () at ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:98
#7  0x00007fd050546b5e in ?? () from /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
#8  0x00007fd0331a083f in KWin::ARBBlurShader::init (this=0x1841640) at ../../../kwin/effects/blur/blurshader.cpp:463
#9  0x00007fd03319d685 in KWin::BlurEffect::reconfigure (this=0x182f990, flags=<value optimized out>) at ../../../kwin/effects/blur/blur.cpp:83
#10 0x00007fd03319d81c in KWin::BlurEffect::BlurEffect (this=0x182f990) at ../../../kwin/effects/blur/blur.cpp:53
#11 0x00007fd03319d906 in KWin::effect_create_kwin4_effect_blur () at ../../../kwin/effects/blur/blur.cpp:33
#12 0x00007fd05304cb92 in KWin::EffectsHandlerImpl::loadEffect (this=0x18aabf0, name=..., checkDefault=false) at ../../kwin/effects.cpp:1125
#13 0x00007fd05304deea in KWin::EffectsHandlerImpl::reconfigure (this=0x18aabf0) at ../../kwin/effects.cpp:189
#14 0x00007fd05304e3f8 in KWin::EffectsHandlerImpl::EffectsHandlerImpl (this=0x18aabf0, type=<value optimized out>) at ../../kwin/effects.cpp:121
#15 0x00007fd0530230fd in KWin::Workspace::setupCompositing (this=0x121ff10) at ../../kwin/composite.cpp:180
#16 0x00007fd053023b85 in KWin::Workspace::setupCompositing (this=<value optimized out>) at ../../kwin/composite.cpp:94
#17 0x00007fd052f9d47c in KWin::Workspace::slotReinitCompositing (this=0x121ff10) at ../../kwin/workspace.cpp:1149
#18 0x00007fd052fa3b67 in KWin::Workspace::qt_metacall (this=0x121ff10, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffbe734a20) at ./workspace.moc:436
#19 0x00007fd04f3d2ff9 in QDBusConnectionPrivate::deliverCall (this=0x1141360, object=0x121ff10, msg=..., metaTypes=..., slotIdx=96) at qdbusintegrator.cpp:942
#20 0x00007fd04f3dc4df in QDBusCallDeliveryEvent::placeMetaCall (this=<value optimized out>, object=<value optimized out>) at qdbusintegrator_p.h:103
#21 0x00007fd04f09328e in QObject::event (this=0x121ff10, e=<value optimized out>) at kernel/qobject.cpp:1217
#22 0x00007fd04e432154 in notify_helper (this=0x1150be0, receiver=0x121ff10, e=0x18ad820) at kernel/qapplication.cpp:4467
#23 QApplicationPrivate::notify_helper (this=0x1150be0, receiver=0x121ff10, e=0x18ad820) at kernel/qapplication.cpp:4439
#24 0x00007fd04e436fc1 in QApplication::notify (this=0x7fffbe735370, receiver=0x121ff10, e=0x18ad820) at kernel/qapplication.cpp:4346
#25 0x00007fd052790de6 in KApplication::notify (this=0x7fffbe735370, receiver=0x121ff10, event=0x18ad820) at ../../kdeui/kernel/kapplication.cpp:311
#26 0x00007fd04f07ca6c in QCoreApplication::notifyInternal (this=0x7fffbe735370, receiver=0x121ff10, event=0x18ad820) at kernel/qcoreapplication.cpp:731
#27 0x00007fd04f07fdff in sendEvent (receiver=0x0, event_type=0, data=0x110d430) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#28 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x110d430) at kernel/qcoreapplication.cpp:1372
#29 0x00007fd04e4da39a in sendPostedEvents (this=0x110ef40, flags=...) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#30 QEventDispatcherX11::processEvents (this=0x110ef40, flags=...) at kernel/qeventdispatcher_x11.cpp:75
#31 0x00007fd04f07bc62 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#32 0x00007fd04f07be67 in QEventLoop::exec (this=0x7fffbe7352b0, flags=...) at kernel/qeventloop.cpp:201
#33 0x00007fd04f08007b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1008
#34 0x00007fd052fc1886 in kdemain (argc=<value optimized out>, argv=<value optimized out>) at ../../kwin/main.cpp:514
#35 0x00007fd052bdee1f in __libc_start_main (main=0x400630 <main(int, char**)>, argc=3, ubp_av=0x7fffbe7359d8, init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fffbe7359c8) at libc-start.c:226
#36 0x0000000000400661 in _start ()

Reported using DrKonqi
Comment 1 Martin Flöser 2011-07-29 05:52:16 UTC
> #7  0x00007fd050546b5e in ?? () from /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1

crashes in OpenGL driver - to my knowledge Virtualbox does not support an OpenGL mode which works with KWin.
Comment 2 David Gräff 2011-07-29 10:05:50 UTC
Hey Martin,

well it's not the fact that kwin compositing is not working with virtualbox but that kwin crashes while trying to do so. Is it possible to detect missing functionality in the vbox driver and prevent this behaviour.

To create a bug report for upstream it would be helpful to know exactly which opengl functionality is missing for at least one of the two current kwin opengl backends. What do you feel about that?
Comment 3 Thomas Lübking 2011-07-29 12:44:52 UTC
a) you've a "this GL call will crash on this driver/GPU/CPU/kernel combo" function
b) you're willing to provide and maintain a blacklist server (as an online-only solution)

Otherwise it's not possible "to detect missing functionality in the vbox driver and prevent this behaviour" - the problem is that the driver _does_ announce support for ARB shaders (otherwise the function would not be in use) but just pees itself and crashes when it's actually used.

It's even worse. several drivers only have issues under certain conditions (like opening two GL contexts at the same time, ie. eg. kwin + OpenGL compositing & some screensaver...) or after a re-redirection (from an unredirected fullscreen)

So the upstream bugreport would be: "please do not annouce GL extensions you do not support or support by a segfault"

The broken function in this particular case would be glGenProgramsARB(); what is  apparently leads to a memory issue in an x64 sse3 call - you might even be lucky using a 32bit variant.

The crash can be worked around by deactivating blurring and setting the scale method to "smooth" (since iirc they're the only ones which in doubt rely on ARB shaders iff -andonlyif- glsl isn't available)