Bug 105772

Summary: Knotify takes 100% CPU and all free memory (including swap)
Product: [openSUSE] SUSE LINUX 10.0 Reporter: A Nagappan <anagappan>
Component: KDEAssignee: Adrian Schröter <adrian.schroeter>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Blocker    
Priority: P5 - None CC: jnelson-suse, tiwai
Version: Beta 2   
Target Milestone: ---   
Hardware: i386   
OS: SUSE Other   
Whiteboard:
Found By: Component Test Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: gdb trace - but not useful as I don't have debuginfo package installed
knotify strace output
After installing kdemultimedia3 (only) package knotify crashed

Description A Nagappan 2005-08-19 09:11:17 UTC
If I run konsole or yast, knotify started running. This happens with any user
and the CPU utilization goes to 100% continously. It comes down, only when I
explicitly kill it. Moreover all the free memory started gradually utilized by
knotify. I'm always able to reproduce this. Do you need any other info ? Please
let me know the steps to get them. I will try to provide them.
Comment 1 Adrian Schröter 2005-08-19 09:30:55 UTC
doesn't happen here, can you provide some strace logs and gdb backtraces ? 
Comment 2 A Nagappan 2005-08-19 09:50:59 UTC
Created attachment 46663 [details]
gdb trace - but not useful as I don't have debuginfo package installed

Unable to use strace. When I start with strace, it exits from strace and then
it goes to background. Please let me know, If I can provide any other info.

I have installed only default GNOME. When I open konsole and press tab two
times for autocompletion, with this scenarios I'm able to reproduce this bug.
Comment 3 Adrian Schröter 2005-08-19 09:57:43 UTC
either  
 
strace -f knotify 
 
or 
 
strace knotify --nofork  
 
please. 
Comment 4 A Nagappan 2005-08-19 10:33:33 UTC
Created attachment 46671 [details]
knotify strace output

Started strace knotify --nofork in Shell 1 of konsole and opened Shell 2. Then
pressed 2 tabs in Shell 2 of konsole, CPU goes to 100% and lot of ioctl, read
calls started printing in Shell 1 konsole. Attached is console log info of
strace knotify. Please let me know If you need any other info.
Comment 5 Stephan Kulow 2005-08-19 11:56:20 UTC
ok, after some debuginfo installing it's very clear what the problem is: 
kdemultimedia3 isn't installed with "default GNOME". As such knotify has no 
idea how to play sounds on errors - and as such it gives an error - and then 
it doesn't know how to play sounds - and as such .... 
Comment 6 Stephan Kulow 2005-08-19 11:56:54 UTC
Adrian will fix that 
Comment 7 Adrian Schröter 2005-08-19 12:16:19 UTC
done 
Comment 8 A Nagappan 2005-08-19 12:18:18 UTC
Adrian: Will this be available with Beta 3 ?
Comment 9 Adrian Schröter 2005-08-19 12:26:20 UTC
yes 
 
you can install "kdemultimedia3" for now as workaround. 
Comment 10 A Nagappan 2005-08-19 13:09:25 UTC
Created attachment 46687 [details]
After installing kdemultimedia3 (only) package knotify crashed

Attached trace from kde crash handler application.

Started knotify as
strace knotify --nofork
Comment 11 A Nagappan 2005-08-19 13:13:47 UTC
Adrian: Strace info - only snip of the complete console message, If you require
additional info please let me know. I'm always able to reproduce this crash.

connect(15, {sa_family=AF_FILE, path="/tmp/alsa-dmix-18233-1124456960-482961"},
40) = 0
recvmsg(15, {msg_name(0)=NULL, msg_iov(1)=[{"\233", 1}], msg_controllen=0,
msg_flags=0}, 0) = 0
close(15)                               = 0
semop(229378, 0xbf9e9898, 2)            = 0
ioctl(-1, AGPIOC_ACQUIRE or APM_IOC_STANDBY, 0xbf9e96ac) = -1 EBADF (Bad file
descriptor)
close(-1)                               = -1 EBADF (Bad file descriptor)
write(2, "ALSA lib pcm_direct.c:984:(snd_p"..., 65ALSA lib
pcm_direct.c:984:(snd_pcm_direct_open_secondary_client) ) = 65
write(2, "unable to open hardware", 23unable to open hardware) = 23
write(2, "\n", 1
)                       = 1
shmdt(0)                                = -1 EINVAL (Invalid argument)
shmdt(0x416f5000)                       = 0
shmctl(4915214, IPC_64|IPC_STAT, 0xbf9e984c) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
rt_sigaction(SIGALRM, {SIG_DFL}, {SIG_DFL}, 8) = 0
alarm(3)                                = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
close(3)                                = 0
close(4)                                = 0
close(5)                                = 0
close(6)                                = 0
close(7)                                = 0
close(8)                                = 0
close(9)                                = 0
close(10)                               = 0
close(11)                               = 0
close(12)                               = 0
close(13)                               = 0
close(14)                               = 0
close(15)                               = -1 EBADF (Bad file descriptor)


Reopening the bug.
Comment 12 Adrian Schröter 2005-08-19 13:34:54 UTC
can you please make a gdb backtrace also ? 
Comment 13 A Nagappan 2005-08-19 14:19:18 UTC
Adrian: Few console messages in after running in gdb mode and also the traces
from gdb.

auto_sink: Could not load polyp
Cannot open client
akode: ALSA fragment-size: 1880
[New Thread 1102019504 (LWP 22072)]
[Thread 1102019504 (LWP 22072) exited]
[New Thread 1104120752 (LWP 22073)]
[Thread 1104120752 (LWP 22073) exited]
KNotify::playTimeout
auto_sink: Could not load polyp
Cannot open client
akode: ALSA fragment-size: 1880
[New Thread 1102019504 (LWP 22076)]
[Thread 1102019504 (LWP 22076) exited]
[New Thread 1106222000 (LWP 22077)]
[Thread 1106222000 (LWP 22077) exited]
auto_sink: Could not load polyp
Cannot open client

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1095157376 (LWP 22049)]
0x40007c5c in do_lookup_x () from /lib/ld-linux.so.2



Thread 1 (Thread 1095157376 (LWP 22049)):
#0  0x40007c5c in do_lookup_x () from /lib/ld-linux.so.2
#1  0x40007fd7 in _dl_lookup_symbol_x () from /lib/ld-linux.so.2
#2  0x4000b4f1 in fixup () from /lib/ld-linux.so.2
#3  0x4000b2c0 in _dl_runtime_resolve () from /lib/ld-linux.so.2
#4  0x417aab70 in snd_pcm_dmix_open () from /usr/lib/libasound.so.2
#5  0x417ab47e in _snd_pcm_dmix_open () from /usr/lib/libasound.so.2
#6  0x41772304 in snd_pcm_free () from /usr/lib/libasound.so.2
#7  0x417729b6 in snd_pcm_free () from /usr/lib/libasound.so.2
#8  0x41772c4b in snd_pcm_open_slave () from /usr/lib/libasound.so.2
#9  0x417b20cf in _snd_pcm_softvol_open () from /usr/lib/libasound.so.2
#10 0x41772304 in snd_pcm_free () from /usr/lib/libasound.so.2
#11 0x41772c73 in snd_pcm_open_slave () from /usr/lib/libasound.so.2
#12 0x41792b35 in _snd_pcm_plug_open () from /usr/lib/libasound.so.2
#13 0x41772304 in snd_pcm_free () from /usr/lib/libasound.so.2
#14 0x41772c73 in snd_pcm_open_slave () from /usr/lib/libasound.so.2
#15 0x417afb74 in _snd_pcm_asym_open () from /usr/lib/libasound.so.2
#16 0x41772304 in snd_pcm_free () from /usr/lib/libasound.so.2
#17 0x417729b6 in snd_pcm_free () from /usr/lib/libasound.so.2
#18 0x416df72e in aKode::ALSASink::open () from /opt/kde3/lib/libakode_alsa_sink.so
#19 0x41706da9 in aKode::AutoSink::open () from /opt/kde3/lib/libakode.so.1
#20 0x4170baa2 in aKode::Player::open () from /opt/kde3/lib/libakode.so.1
#21 0x416d8808 in KDE::Multimedia::aKodePlayer::aKodePlayer () from
/opt/kde3/lib/kde3/kdemm_akode.so
#22 0x416d942a in KDE::Multimedia::aKodeBackend::createPlayer () from
/opt/kde3/lib/kde3/kdemm_akode.so
#23 0x40047459 in KDE::Multimedia::Factory::createPlayer () from
/opt/kde3/lib/libkdemm.so.0
#24 0x400489b1 in KDE::Multimedia::SimplePlayer::SimplePlayer () from
/opt/kde3/lib/libkdemm.so.0
#25 0x400374be in ?? () from /opt/kde3/lib/libkdeinit_knotify.so
#26 0x08141820 in ?? ()
#27 0xbff35f84 in ?? ()
#28 0x00000000 in ?? ()
#29 0xbff35eec in ?? ()
#30 0x00147740 in ?? ()
#31 0x40f9dd10 in vtable for QGArray () from /usr/lib/qt3/lib/libqt-mt.so.3
#32 0x080fc268 in ?? ()
#33 0xbff35264 in ?? ()
#34 0xbff352a4 in ?? ()
#35 0xbff35264 in ?? ()
#36 0x00015278 in ?? ()
#37 0x40de4724 in QCString::toInt () from /usr/lib/qt3/lib/libqt-mt.so.3
#38 0x400395b0 in kdemain () from /opt/kde3/lib/libkdeinit_knotify.so
#39 0x4003a76c in kdemain () from /opt/kde3/lib/libkdeinit_knotify.so
#40 0x40820610 in DCOPClient::receive () from /opt/kde3/lib/libDCOP.so.4
#41 0x40821c10 in DCOPClient::find () from /opt/kde3/lib/libDCOP.so.4
#42 0x40822268 in DCOPClient::find () from /opt/kde3/lib/libDCOP.so.4
#43 0x4082f4ad in KDE_IceProcessMessages () from /opt/kde3/lib/libDCOP.so.4
#44 0x4081a2f9 in DCOPClient::processSocketData () from /opt/kde3/lib/libDCOP.so.4
#45 0x40822996 in DCOPClient::qt_invoke () from /opt/kde3/lib/libDCOP.so.4
#46 0x40b3cf19 in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3
#47 0x40b3d4f1 in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3
#48 0x40e7def0 in QSocketNotifier::activated () from /usr/lib/qt3/lib/libqt-mt.so.3
#49 0x40b5c1d0 in QSocketNotifier::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#50 0x40add881 in QApplication::internalNotify () from
/usr/lib/qt3/lib/libqt-mt.so.3
#51 0x40ade1f9 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#52 0x4076530e in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4
#53 0x40ad16ad in QEventLoop::activateSocketNotifiers () from
/usr/lib/qt3/lib/libqt-mt.so.3
#54 0x40a8bd63 in QEventLoop::processEvents () from /usr/lib/qt3/lib/libqt-mt.so.3
#55 0x40af4753 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
#56 0x40af4636 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#57 0x40add1cf in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#58 0x400381e4 in kdemain () from /opt/kde3/lib/libkdeinit_knotify.so
#59 0x4135fe60 in __libc_start_main () from /lib/tls/libc.so.6
#60 0x080485f1 in ?? ()
Comment 14 Dirk Mueller 2005-08-22 18:39:29 UTC
*** Bug 106255 has been marked as a duplicate of this bug. ***
Comment 15 Takashi Iwai 2005-08-31 12:44:13 UTC
I can confirm the crash of knotify on my machine, too.

It looks like the non-static functions in dl object disappears during a forked
dmix server is running.  Fairly complex case with a plugin in a plugin...

Comment 16 Takashi Iwai 2005-08-31 15:53:08 UTC
A fixed alsa package is on bari-tiwai-6.  Possible to try it out?
Comment 17 Adrian Schröter 2005-09-06 06:56:18 UTC
I am not able to reproduce this anymore, lets assume it got fixed by the 
fixes. 
Comment 18 A Nagappan 2005-09-06 07:08:15 UTC
With Beta 4, I'm not able to reproduce this bug.