Bug 81300 - KDevelop consumes 100% of CPU
Summary: KDevelop consumes 100% of CPU
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: 3.0.3
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-11 07:42 UTC by Nick Savoiu
Modified: 2004-12-12 16:07 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 Nick Savoiu 2004-05-11 07:42:06 UTC
Version:           3.0.3 (using KDE KDE 3.2.2)
Installed from:    Compiled From Sources
Compiler:          gcc3.2 
OS:                Linux

From time to time after using KDevelop for a while it will wind up consuming all the CPU cycles. Unfortunately I do not have a reproducible way of making this happen. It does seem to happen most often after using autocompletion.

Does anyone know how can I identify the KDevelop thread that is causing this?
Comment 1 Jens Dagerbo 2004-05-12 18:14:35 UTC
Does KDevelop stop working, or is just the CPU load high?
Comment 2 Jens Dagerbo 2004-05-13 08:38:25 UTC
There is nothing in the bug report that suggests a crash. Please don't change severity without a note why you do so. 

I'm changing severity back to normal.

Also, this thread seems related: http://www.kdevelop.org/forum/read.php?f=2&i=12011&t=12011
Comment 3 Nick Savoiu 2004-05-13 09:02:25 UTC
Not sure how the severity of the bug changed :)

KDevelop still works but sometimes the thread causes a slowdown (even though I have a dual CPU machine) when typing. I basically takes 1 second for each typed character to show up in the editor.

Upon further investigation it seems that it could be caused by either a zombie GDB process or the source reformatting. In the first case closing and reopening the project brings the CPU usage back down. In the latter closing the editor panes seems to do the trick.

I've also noticed that there are several cases (opening a project being one) where KDevelop's interface hangs for a long while (30 secs or more) while its CPU usage is relatively low (~10%).

BTW, what kind of information would be helpful for debug once this situation repeats?

Nick
Comment 4 Jens Dagerbo 2004-05-14 21:53:57 UTC
Not sure, but if you attach gdb to KDevelop when the cpu usage is high, chances are you can break it somewhere in the offending code.

(This report now mentions four different problems, none of which is easily reproduced. It'll be open forever...)
Comment 5 Nick Savoiu 2004-05-16 07:34:35 UTC
I managed to attach GDB to KDevelop. I've stopped it in a few places. I'm not familiar with KDevelop's innards so I wasn't quite sure what to do at this point :)

Nick

Program received signal SIGINT, Interrupt.
0x420dd2a1 in select () from /lib/i686/libc.so.6
(gdb) backtrace
#0  0x420dd2a1 in select () from /lib/i686/libc.so.6
#1  0x415e0930 in ?? () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#2  0x0000001a in ?? ()
#3  0x00000019 in ?? ()
#4  0x00000000 in ?? ()
#5  0x40fd687b in QEventLoop::processEvents () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#6  0x4103b133 in QEventLoop::enterLoop () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#7  0x4103aff0 in QEventLoop::exec () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#8  0x4102b264 in QApplication::exec () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#9  0x08062792 in main ()
(gdb) c
Continuing.

Program received signal SIGINT, Interrupt.
0x420dca14 in ioctl () from /lib/i686/libc.so.6
(gdb) backtrace
#0  0x420dca14 in ioctl () from /lib/i686/libc.so.6
#1  0x4177f812 in _X11TransSocketBytesReadable () from /usr/X11R6/lib/libX11.so.6
#2  0x41780446 in _X11TransBytesReadable () from /usr/X11R6/lib/libX11.so.6
#3  0x41764440 in _XEventsQueued () from /usr/X11R6/lib/libX11.so.6
#4  0x417589fb in XPending () from /usr/X11R6/lib/libX11.so.6
#5  0x40fd6e69 in QEventLoop::processEvents () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#6  0x4103b133 in QEventLoop::enterLoop () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#7  0x4103aff0 in QEventLoop::exec () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#8  0x4102b264 in QApplication::exec () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#9  0x08062792 in main ()
(gdb) c
Continuing.

Program received signal SIGINT, Interrupt.
0x420dd2a1 in select () from /lib/i686/libc.so.6
(gdb) backtrace
#0  0x420dd2a1 in select () from /lib/i686/libc.so.6
#1  0x415e0930 in ?? () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#2  0x0000001a in ?? ()
#3  0x00000019 in ?? ()
#4  0x00000000 in ?? ()
#5  0x40fd687b in QEventLoop::processEvents () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#6  0x4103b133 in QEventLoop::enterLoop () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#7  0x4103aff0 in QEventLoop::exec () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#8  0x4102b264 in QApplication::exec () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#9  0x08062792 in main ()
(gdb) c
Continuing.

Program received signal SIGINT, Interrupt.
0x413515a1 in QGList::first () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
(gdb) backtrace
#0  0x413515a1 in QGList::first () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#1  0x41019926 in QEventLoop::setSocketNotifierPending () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#2  0x40fd6a81 in QEventLoop::processEvents () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#3  0x4103b133 in QEventLoop::enterLoop () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#4  0x4103aff0 in QEventLoop::exec () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#5  0x4102b264 in QApplication::exec () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#6  0x08062792 in main ()
(gdb) c
Continuing.

Program received signal SIGINT, Interrupt.
0x4135234d in QGListIterator::operator++ () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
(gdb) c
Continuing.

Program received signal SIGINT, Interrupt.
0x4181a9cb in read () from /lib/i686/libpthread.so.0
(gdb) c
Continuing.

Program received signal SIGINT, Interrupt.
0x420dca14 in ioctl () from /lib/i686/libc.so.6
(gdb) c
Continuing.

Program received signal SIGINT, Interrupt.
0x41764391 in _XEventsQueued () from /usr/X11R6/lib/libX11.so.6
(gdb) backtrace
#0  0x41764391 in _XEventsQueued () from /usr/X11R6/lib/libX11.so.6
#1  0x417589fb in XPending () from /usr/X11R6/lib/libX11.so.6
#2  0x40fd6e69 in QEventLoop::processEvents () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#3  0x4103b133 in QEventLoop::enterLoop () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#4  0x4103aff0 in QEventLoop::exec () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#5  0x4102b264 in QApplication::exec () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#6  0x08062792 in main ()
(gdb) c
Continuing.

Program received signal SIGINT, Interrupt.
0x41815cf5 in pthread_mutex_lock () from /lib/i686/libpthread.so.0
(gdb) backtrace
#0  0x41815cf5 in pthread_mutex_lock () from /lib/i686/libpthread.so.0
#1  0x4202b68f in random () from /lib/i686/libc.so.6
#2  0x4202bac9 in rand () from /lib/i686/libc.so.6
#3  0x41019987 in QEventLoop::setSocketNotifierPending () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#4  0x40fd6a81 in QEventLoop::processEvents () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#5  0x4103b133 in QEventLoop::enterLoop () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#6  0x4103aff0 in QEventLoop::exec () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#7  0x4102b264 in QApplication::exec () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#8  0x08062792 in main ()
(gdb) c
Continuing.

Program received signal SIGINT, Interrupt.
0x418191f5 in sem_unlink () from /lib/i686/libpthread.so.0
(gdb) c
Continuing.

Program received signal SIGINT, Interrupt.
0x40fd6a34 in QEventLoop::processEvents () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
(gdb) c
Continuing.

Program received signal SIGINT, Interrupt.
0x418190f8 in sem_unlink () from /lib/i686/libpthread.so.0
(gdb) backtrace
#0  0x418190f8 in sem_unlink () from /lib/i686/libpthread.so.0
#1  0x41815f2c in pthread_mutex_unlock () from /lib/i686/libpthread.so.0
#2  0x41334e78 in QRecursiveMutexPrivate::lock () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#3  0x41335282 in QMutex::lock () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#4  0x40fd68a6 in QEventLoop::processEvents () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#5  0x4103b133 in QEventLoop::enterLoop () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#6  0x4103aff0 in QEventLoop::exec () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#7  0x4102b264 in QApplication::exec () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#8  0x08062792 in main ()
(gdb) c
Continuing.

Program received signal SIGINT, Interrupt.
0x40d53bc3 in malloc () from /home/nsavoiu/apps/kde/lib/libkdecore.so.4
(gdb) backtrace
#0  0x40d53bc3 in malloc () from /home/nsavoiu/apps/kde/lib/libkdecore.so.4
#1  0x419032fe in operator new (sz=12) at ../../../../libstdc++-v3/libsupc++/new_op.cc:48
#2  0x41350d0f in QGList::prepend () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#3  0x41350ef8 in QGList::insertAt () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#4  0x410199ab in QEventLoop::setSocketNotifierPending () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#5  0x40fd6a81 in QEventLoop::processEvents () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#6  0x4103b133 in QEventLoop::enterLoop () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#7  0x4103aff0 in QEventLoop::exec () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#8  0x4102b264 in QApplication::exec () from /home/nsavoiu/apps/qt/lib/libqt-mt.so.3
#9  0x08062792 in main ()
Comment 6 Matt Rogers 2004-12-12 06:01:16 UTC
all of those are just traces from Qt running it's event loop. If you can provide an exact set of instructions on how to reproduce, we might be able to nail it down.
Comment 7 Nick Savoiu 2004-12-12 09:52:39 UTC
I have not seen this happen lately so perhaps whatever the problem was it was fixed. Feel free to close the bug for now. If the problem reappears and I can replicate it I'll update the bug.
Comment 8 Matt Rogers 2004-12-12 16:07:54 UTC
ok, thanks. :)