Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 180390 - sys-power/powernowd-0.97 - freeze with powernowd on AMD X2 (kernel's fault?)
Summary: sys-power/powernowd-0.97 - freeze with powernowd on AMD X2 (kernel's fault?)
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Mobile Herd (OBSOLETE)
Depends on:
Reported: 2007-05-30 20:14 UTC by Michael Mauch
Modified: 2009-10-16 23:29 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

dmesg output (dmesg.txt,100.47 KB, text/plain)
2007-05-31 16:49 UTC, Michael Mauch
kernel config (config.txt,55.65 KB, text/plain)
2007-05-31 16:51 UTC, Michael Mauch
/proc/cpuinfo (cpuinfo.txt,1.13 KB, text/plain)
2007-05-31 18:28 UTC, Michael Mauch

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Mauch 2007-05-30 20:14:54 UTC

I was getting complete system freezes for a long time now, since I upgraded to an AMD X2 (even no Alt+SysRq+s/u/b). I happened only sometimes - sometimes after many hours, sometimes a few minutes after a boot. Netconsole didn't log anything about that. Lastly I found that it had to be powernowd, because it didn't happen without powernowd.

Now I found a way to reproduce it in a few seconds, without powernowd.

Reproducible: Always

Steps to Reproduce:
In one window:

cd /sys/devices/system/cpu/cpu0/cpufreq
while :; do echo 1000000 >scaling_setspeed ; echo 2200000 >scaling_setspeed ; done

In another window:

cd /sys/devices/system/cpu/cpu1/cpufreq
while :; do echo 1800000 >scaling_setspeed ; echo 2000000 >scaling_setspeed ; done

Actual Results:  
Complete freeze. No graphics update, no ssh login, no NumLock LED update. And no info from netconsole.

Expected Results:  
No freeze. Not with my "brute force" method above, and especially not with powernowd alone.

I'm now on gentoo-sources-2.6.21-r2, but it also happened with 2.6.20* and 2.6.18 (that's when I got the X2). I didn't try any vanilla-sources yet.

powernowd 0.97, which has the encouraging words "Lets try to make SMP work right this time" on its web page. IMHO it's the kernel's fault, because it certainly shouldn't crash just because powernowd writes something funny into scaling_setspeed.

The problem also goes away if I use maxcpus=1 on the kernel command line.

dmesg output and config.gz is in <>.

Portage (default-linux/x86/2007.0/desktop, gcc-3.4.6, glibc-2.3.6-r5, 2.6.21-gentoo-r2 i686)
System uname: 2.6.21-gentoo-r2 i686 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
Gentoo Base System release 1.12.9
Timestamp of tree: Wed, 30 May 2007 16:20:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-java/java-config: 1.3.7, 2.0.32
dev-lang/python:     2.3.5-r3, 2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  0.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
CFLAGS="-march=athlon64 -msse3 -O2 -pipe -g"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/vdr/record /usr/share/vdr/sysinfo"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=athlon64 -msse3 -O2 -pipe -g"
FEATURES="ccache distlocks fixpackages parallel-fetch sandbox sfperms splitdebug strict userfetch"
LINGUAS="en de en_GB fa ru"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTDIR_OVERLAY="/usr/local/overlays/g-cpan /usr/portage/local/layman/gentoo-de /usr/portage/local/layman/sunrise /usr/local/overlays/kmediafactory/portage /usr/portage/local/layman/php-testing /usr/portage/local/layman/vdr-testing /usr/portage/local/layman/liquidx /usr/local/portage"
USE="3dnow X a52 aac ac3 acl acpi aiglx alsa ao apache2 arts asf audacious audiofile avi berkdb bitmap-fonts bluetooth bzip2 cairo cdr cli cracklib crypt css cups curl dbus dga djvu dmi doc dri dts dvb dvd dvdr dvdread dvi edl emacs emboss encode esd evo exif exiscan-acl fam fame fbcon fbsplash ffmpeg firefox flac foomaticdb freetype gcj gd gdbm ggi gif gimp gimpprint gnokii gnome gnutls gphoto2 gstreamer gtk gtk2 hal icecast iconv idn ieee1394 imagemagick imap innodb ipv6 irmc isdnlog jack java joystick jpeg kde kdeenablefinal kdepim kdexdeltas kerberos kqemu ladspa ldap libg++ libgda libsamplerate lirc live lm_sensors logitech-mouse lzo mad mailwrapper matroska mbox mcal memlimit midi mikmod mjpeg mmx mng mono motif mozbranding mozcalendar mozdevelop mozsvg mp3 mpeg mplayer mpm-prefork mudflap mule musicbrainz mysql ncurses network nfs nls nntp nptl nptlonly nsplugin objc oci8 oci8-instant-client odbc ogg oggvorbis opengl openmp oracle oss pam pcre pda pdf perl php pic png postgres ppds pppd pulseaudio python qt3 qt3support qt4 quicktime rdesktop readline real reflection rtc rtsp samba scanner sdl session skins slp sndfile spl sqlite sse sse2 ssl subtitles svg sysfs t1lib tcpd theora tidy tiff truetype truetype-fonts type1-fonts unicode usb utempter v4l v4l2 vcd vdr vdr-net vorbis wifi win32codecs wmf x86 xemacs xext xine xinerama xinetd xml xml2 xorg xosd xprint xscreensaver xv xvid zlib" ALSA_CARDS="cmipci via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" CAMERAS="all" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de en_GB fa ru" LIRC_DEVICES="irdeo inputlirc" USERLAND="GNU" VIDEO_CARDS="ati vesa fbdev radeon v4l"
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-05-31 11:03:51 UTC
(In reply to comment #0)
> dmesg output and config.gz is in <>.

Please, attach it here (preferably as plaintext, not gzip-ed) and reopen this bug then.
Comment 2 Michael Mauch 2007-05-31 16:49:22 UTC
Created attachment 120788 [details]
dmesg output
Comment 3 Michael Mauch 2007-05-31 16:51:26 UTC
Created attachment 120790 [details]
kernel config

Oops, sorry - I forgot that attachments are possible.
Comment 4 Michael Mauch 2007-05-31 16:53:18 UTC
dmesg output and kernel .config as requested. I'm sorry, I forgot that attachments are possible here.
Comment 5 Michael Mauch 2007-05-31 18:28:13 UTC
I just read that there are AMD X2 CPUs that can have different speeds on their two cores. Mine is an older socket 939 X2, which can change the frequencies only for both cores together. The cpufreq directories are symlinked:

total 0
drwxr-xr-x 5 root root 0 May 31 18:21 .
drwxr-xr-x 4 root root 0 May 31 18:21 ..
drwxr-xr-x 5 root root 0 May 31 18:21 cache
drwxr-xr-x 3 root root 0 May 31 20:23 cpufreq
drwxr-xr-x 2 root root 0 May 31 20:23 topology

total 0
drwxr-xr-x 4 root root    0 May 31 20:23 .
drwxr-xr-x 4 root root    0 May 31 18:21 ..
drwxr-xr-x 5 root root    0 May 31 18:21 cache
lrwxrwxrwx 1 root root    0 May 31 20:23 cpufreq -> ../../../../devices/system/cpu/cpu0/cpufreq
-rw------- 1 root root 4096 May 31 20:23 online
drwxr-xr-x 2 root root    0 May 31 20:23 topology
Comment 6 Michael Mauch 2007-05-31 18:28:56 UTC
Created attachment 120805 [details]
Comment 7 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-10-16 21:02:41 UTC
powernowd-1.00 has been comitted to the tree. please reopen if the problem is also seen there.
thanks for the report - sorry for the delay.

kind regards
Comment 8 Michael Mauch 2009-10-16 23:29:16 UTC
Thank you for closing that bug. I'm still running the same old powernowd-0.97 since March 2007 and now with the 2.6.30-gentoo-r6 kernel (and probably a long time before) on the same machine I didn't get these freezes. 

I tried to reproduce the problem with the lines that I wrote back then, but nothing bad happened, not even a noticeable lag.