Whenever using alsa-lib 1.0.9_rc2 artsd(KDE) start using 50 to 70% of CPU even when no sound is being played. Using alsa-lib 1.0.8 does fix the problem. Reproducible: Sometimes Steps to Reproduce: 1. Start an audio application that uses arts 2. Wait until the CPU consumption goes from 2% to 40 or more % 3. Actual Results: using top, arts was consuming 40% of the CPU. Expected Results: CPU sonsumption between 1-5% Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3-20050110, glibc-2.3.4.20050125-r1, 2.6.11-gentoo-r5 x86_64) ================================================================= System uname: 2.6.11-gentoo-r5 x86_64 AMD Athlon(tm) 64 Processor 3000+ Gentoo Base System version 1.6.10 Python: dev-lang/python-2.3.5 [2.3.5 (#1, Feb 18 2005, 08:18:27)] distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] dev-lang/python: 2.3.5 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.7.9-r1, 1.5, 1.9.5, 1.6.3, 1.8.5-r3, 1.4_p6 sys-devel/binutils: 2.15.92.0.2-r8 sys-devel/libtool: 1.5.14 virtual/os-headers: 2.6.11 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CFLAGS="-march=athlon64 -O2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/afs/C /etc/afs/afsws /etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-march=athlon64 -O2" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" LANG="en_US.ISO8859-1" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X Xaw3d aalib acl acpi alsa arts audiofile avi berkdb bitmap-fonts bzlib cdr cross crypt cscope ctype cups curl curlwrappers dbm divx4linux doc dvd dvdr encode esd ethereal fam flac font-server fortran gd gdbm gif gpm gtk gtk2 gtkhtml guile iconv icq imagemagick imap imlib innodb ipv6 jabber java joystick jp2 jpeg junit kde ldap lesstif libg++ libwww lzw lzw-tiff mad mcal mikmod mime mmap mng motif mp3 mpeg mysql ncurses nls ofx ogg oggvorbis openal opengl oss pam pda pdflib perl php pic png postgres python qt quicktime readline recode samba sdl session shared sharedmem slang sndfile snmp soap sockets spell ssl tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts usb userlocales vorbis xine xml xml2 xmms xpm xrandr xsl xv xvid zlib" Unset: ASFLAGS, CBUILD, CTARGET, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
alsa-lib-1.0.9_rc2 is no longer in portage. Does this bug apply to 1.0.9_rc2-r1?
Are you seeing oopses or nullpointers on dmesg? Are you using in-kernel drivers, or alsa-drivers ones? If you are using in-kernel drivers (or alsa-drivers 1.0.8) and you are seeing oopses or nullpointers on dmesg, the bug is probably related to the conflict between them. You should use alsa-drivers and alsa-lib 1.0.9 together.
Yes. I tested it on the 1.0.9_rc2-r1 version. I corrected the Summary. No oopes or nullpointers, just high CPU usage, and seems to be related to the timer, by looking at a strace at the arts project a lot of activity occurs at the /dev/timer even when no sound is being played any more. I am using the in kernel drivers. My MB is a MSI K8N Neo Platinum, but I have been able to reproduce the same effect at an Chaintech VNF3-250.
Don't use in-kernel drivers, as they are 1.0.8 and alsa-lib 1.0.9 isn't compatible with them. Follow the alsa guide and use alsa-driver (1.0.9). If it's still an issue after that, feel free to reopen the bug.
Created attachment 57079 [details] Lsof output of the artsd process when the problem is occuring
Created attachment 57080 [details] Strace of the artsd proccess when it is consuming CPU and no sound is being reproduced
Changed the alsa-driver to 1.0.9_rc2 and alsa-lib to 1.0.9_rc2-r1 and the problem still occurs. Below is a top snapshot of my machine after the problem appears and nos sound is begin reproduced. top - 06:53:29 up 1:19, 6 users, load average: 0.95, 0.97, 0.95 Tasks: 92 total, 2 running, 90 sleeping, 0 stopped, 0 zombie Cpu(s): 9.9% us, 15.9% sy, 0.4% ni, 72.2% id, 1.4% wa, 0.2% hi, 0.0% si Mem: 1025536k total, 813600k used, 211936k free, 29836k buffers Swap: 1004052k total, 0k used, 1004052k free, 306152k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 8534 alexandr 15 0 53648 11m 7612 R 39.3 1.1 15:27.29 artsd 1 root 16 0 2548 520 444 S 0.0 0.1 0:01.07 init 2 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0 3 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0 4 root 10 -5 0 0 0 S 0.0 0.0 0:00.01 events/0 5 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 khelper 10 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 kthread 21 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid 148 root 10 -5 0 0 0 S 0.0 0.0 0:00.06 kblockd/0 161 root 15 0 0 0 0 S 0.0 0.0 0:00.00 khubd 230 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pdflush
Please report this to tha alsa developers upstream as I don't want to even begin trying to mess with arts.