Bug 309171 - Kwin crash (due to too much open files?)
Summary: Kwin crash (due to too much open files?)
Status: RESOLVED DUPLICATE of bug 307580
Alias: None
Product: kwin
Classification: Unclassified
Component: general (show other bugs)
Version: 4.9.2
Platform: Ubuntu Packages Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-28 22:06 UTC by Mathieu MD
Modified: 2012-11-04 14:01 UTC (History)
1 user (show)

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 Mathieu MD 2012-10-28 22:06:12 UTC
Application: kwin (4.9.2)
KDE Platform Version: 4.9.2
Qt Version: 4.8.3
Operating System: Linux 3.5.0-18-generic i686
Distribution: Ubuntu 12.10

-- Information about the crash:
- What I was doing when the application crashed:

Just using Gramps 3.4.1 on Ubuntu 12.10.

However, the crash only -- and always -- happens when I'm using Gramps. I can use this computer for hours without problems, but if I start Gramps, Kwin will crash after a few hours, and eventually KDE will completely crash a few hours laters, leaving me back to the LightDM login panel.

Today it crashed 4 times. Below is the file-nr contents at each crashes.

# mathieu@inspiron:~ # 00:38:32 28/10 #
cat /proc/sys/fs/file-nr
397632  0       616817

# mathieu@inspiron:~ # 15:37:59 28/10 #
cat /proc/sys/fs/file-nr
164800  0       616817

# mathieu@inspiron:~ # 18:27:04 28/10 #
cat /proc/sys/fs/file-nr 
175072  0       616817

# mathieu@inspiron:~ # 22:41:47 28/10 #
cat /proc/sys/fs/file-nr 
164800  0       616817

The crash cannot be reproduced volontarily, but simply starting and using Gramps will lead at a moment or another to a crash of Kwin.

Is it a KDE or a Gramps bug, or something else?

The crash can be reproduced every time.

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

Thread 4 (Thread 0xac98cb40 (LWP 12101)):
#0  0xb77d4424 in __kernel_vsyscall ()
#1  0xb2d2796b in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb75b164c in __pthread_cond_wait (cond=0xaee8fb68, mutex=0xaee8fb50) at forward.c:139
#3  0xadd187ac in pipe_semaphore_wait (sema=0xaee8fb50) at ../../../../../src/gallium/auxiliary/os/os_thread.h:433
#4  radeon_drm_cs_emit_ioctl (param=0xaee6f008) at radeon_drm_cs.c:416
#5  0xb2d23d4c in start_thread (arg=0xac98cb40) at pthread_create.c:308
#6  0xb75a3d3e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3 (Thread 0xabadfb40 (LWP 12104)):
#0  0xb77d4424 in __kernel_vsyscall ()
#1  0xb2d2796b in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb75b164c in __pthread_cond_wait (cond=0xb681b670, mutex=0xb681b658) at forward.c:139
#3  0xb67091cd in ?? () from /usr/lib/i386-linux-gnu/libQtScript.so.4
#4  0xb67091ff in ?? () from /usr/lib/i386-linux-gnu/libQtScript.so.4
#5  0xb2d23d4c in start_thread (arg=0xabadfb40) at pthread_create.c:308
#6  0xb75a3d3e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xaad71b40 (LWP 12105)):
#0  0xb2d69dcd in __GI_clock_gettime (clock_id=1, tp=0xaad71098) at ../sysdeps/unix/clock_gettime.c:116
#1  0xb5f9cfb5 in do_gettime (frac=0xaad71090, sec=0xaad71088) at tools/qelapsedtimer_unix.cpp:123
#2  qt_gettime () at tools/qelapsedtimer_unix.cpp:140
#3  0xb608436e in QTimerInfoList::updateCurrentTime (this=0xaa400b34) at kernel/qeventdispatcher_unix.cpp:343
#4  0xaad7119c in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 1 (Thread 0xb1d7d980 (LWP 12096)):
[KCrash Handler]
#7  r600_context_bo_reloc (usage=RADEON_USAGE_READWRITE, ctx=<optimized out>, rbo=<optimized out>) at r600_pipe.h:786
#8  r600_create_fence (rctx=0x9fb4620) at r600_pipe.c:110
#9  r600_flush (ctx=ctx@entry=0x9fb4620, fence=fence@entry=0xbff3affc, flags=flags@entry=0) at r600_pipe.c:127
#10 0xadce1eaf in r600_flush_from_st (ctx=0x9fb4620, fence=0xbff3affc) at r600_pipe.c:147
#11 0xaddcd313 in st_flush (st=st@entry=0xa032bf8, fence=fence@entry=0xbff3affc) at ../../../../src/mesa/state_tracker/st_cb_flush.c:86
#12 0xaddcd3a7 in st_finish (st=st@entry=0xa032bf8) at ../../../../src/mesa/state_tracker/st_cb_flush.c:97
#13 0xaddd0708 in st_AllocTextureImageBuffer (ctx=0x9fe9548, texImage=0xad6d4a8) at ../../../../src/mesa/state_tracker/st_cb_texture.c:451
#14 0xaddaead1 in _mesa_store_teximage (ctx=ctx@entry=0x9fe9548, dims=dims@entry=2, texImage=texImage@entry=0xad6d4a8, format=format@entry=32993, type=type@entry=5121, pixels=pixels@entry=0xb07df08, packing=packing@entry=0x9feefe8) at ../../../../src/mesa/main/texstore.c:4403
#15 0xaddcf8ac in st_TexImage (ctx=0x9fe9548, dims=2, texImage=0xad6d4a8, format=32993, type=5121, pixels=0xb07df08, unpack=0x9feefe8) at ../../../../src/mesa/state_tracker/st_cb_texture.c:537
#16 0xadd9d14c in teximage (ctx=0x9fe9548, compressed=compressed@entry=0 '\000', dims=dims@entry=2, target=target@entry=3553, level=level@entry=0, internalFormat=internalFormat@entry=32856, width=width@entry=111, height=height@entry=111, depth=depth@entry=1, border=border@entry=0, format=format@entry=32993, type=type@entry=5121, imageSize=imageSize@entry=0, pixels=pixels@entry=0xb07df08) at ../../../../src/mesa/main/teximage.c:3042
#17 0xadd9ed4e in _mesa_TexImage2D (target=3553, level=0, internalFormat=32856, width=111, height=111, border=0, format=32993, type=5121, pixels=0xb07df08) at ../../../../src/mesa/main/teximage.c:3083
#18 0xb6570822 in KWin::GLTexture::load (this=this@entry=0xad166e0, image=..., target=target@entry=3553) at ../../../kwin/libkwineffects/kwingltexture.cpp:214
#19 0xb65709c5 in KWin::GLTexture::GLTexture (this=0xad166e0, image=..., target=3553) at ../../../kwin/libkwineffects/kwingltexture.cpp:68
#20 0xb773eb0f in KWin::SceneOpenGLShadow::prepareBackend (this=0xa9c6a80) at ../../kwin/scene_opengl.cpp:1697
#21 0xb76e99b4 in KWin::Shadow::init (this=this@entry=0xa9c6a80, data=...) at ../../kwin/shadow.cpp:109
#22 0xb76e9ef2 in KWin::Shadow::createShadow (toplevel=0xaa51520) at ../../kwin/shadow.cpp:61
#23 0xb7730a88 in KWin::Toplevel::getShadow (this=0xaa51520) at ../../kwin/toplevel.cpp:371
#24 0xb77455a0 in KWin::SceneOpenGL::windowAdded (this=0x9f893d8, c=0xaa51520) at ../../kwin/scene_opengl.cpp:224
#25 0xb7729e3e in KWin::Toplevel::setupCompositing (this=0xaa51520) at ../../kwin/composite.cpp:618
#26 0xb7731b7a in KWin::Unmanaged::track (this=0xaa51520, w=61167904) at ../../kwin/unmanaged.cpp:76
#27 0xb76b0fae in KWin::Workspace::createUnmanaged (this=0x9f25948, w=61167904) at ../../kwin/workspace.cpp:586
#28 0xb76e8785 in KWin::Workspace::workspaceEvent (this=0x9f25948, e=0xbff3baec) at ../../kwin/events.cpp:368
#29 0xb76d8862 in KWin::Application::x11EventFilter (this=0xbff3bdf8, e=0xbff3baec) at ../../kwin/main.cpp:362
#30 0xb55bb386 in qt_x11EventFilter (ev=0xbff3baec) at kernel/qapplication_x11.cpp:441
#31 qt_x11EventFilter (ev=0xbff3baec) at kernel/qapplication_x11.cpp:429
#32 0xb55cc993 in QApplication::x11ProcessEvent (this=0xbff3bdf8, event=0xbff3baec) at kernel/qapplication_x11.cpp:3449
#33 0xb55f997d in QEventDispatcherX11::processEvents (this=0x9de9ea0, flags=...) at kernel/qeventdispatcher_x11.cpp:132
#34 0xb605026c in QEventLoop::processEvents (this=this@entry=0xbff3bc78, flags=...) at kernel/qeventloop.cpp:149
#35 0xb6050561 in QEventLoop::exec (this=0xbff3bc78, flags=...) at kernel/qeventloop.cpp:204
#36 0xb6055cba in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#37 0xb553ffc4 in QApplication::exec () at kernel/qapplication.cpp:3823
#38 0xb76db189 in kdemain (argc=1, argv=0xbff3bee4) at ../../kwin/main.cpp:545
#39 0x0804855b in main (argc=1, argv=0xbff3bee4) at kwin_dummy.cpp:3

Possible duplicates by query: bug 307580.

Reported using DrKonqi
Comment 1 Thomas Lübking 2012-10-28 22:11:01 UTC
Driver bug.
Do you use the oxygen gtk+ style?

*** This bug has been marked as a duplicate of bug 307580 ***
Comment 2 Mathieu MD 2012-10-29 19:16:13 UTC
Yes indeed, oxygen-gtk is selected for both GTK2 and GTK3. Shall I use something else?
Comment 3 Thomas Lübking 2012-10-29 22:59:31 UTC
The crash occurs on loading the shadow image provided by the style for popups.
While this would still be a bug in the driver, it might be exposed by some bogus pixmap data - if you encounter no further crashes of this type, it might be worth to take a closer look at that data (the Qt style uses the same infrastructure. So if it does not cause this...)
Comment 4 Mathieu MD 2012-11-04 11:59:07 UTC
Thanks Thomas. Indeed, from the moment I used "Ambiance" instead of "oxygen-gtk" for GTK theme, I did not encounter any more crash.
However, I do not know what to do about your comment to "take a closer look at that data"...
Comment 5 Thomas Lübking 2012-11-04 14:01:16 UTC
Thanks for the update.

Did you alter the gtk3 style as well?
Could you bisect if only one of them is affected?

I meant the below ;-)

@Hugo
the crash is a bug in OpenGL/Mesa, but it might hint a bug in the oxygen-gtk style (providing junk textures) since it does not seem caused by oxygen-qt