Powertop crashes with 'powertop --auto-tune'
Harvey
Hope I am right here:
On Archlinux 64bit as well as 32bit systems powertop 2.7 crashes reproducible like this when called with the parameter --auto-tune:
Steps to reproduce: Just try:
[root(a)teefax ~]# powertop --auto-tune
Loaded 0 prior measurements
Cannot load from file /var/cache/powertop/saved_parameters.powertop RAPL device for cpu 0
RAPL device for cpu 0
RAPL device for cpu 0
Devfreq not enabled
Cannot load from file /var/cache/powertop/saved_parameters.powertop unknown op '{'
Leaving PowerTOP
*** Error in `powertop': double free or corruption (!prev): 0x0975bc20 *** ======= Backtrace: ========= /usr/lib/libc.so.6(+0x6b5c9)[0xb74685c9] /usr/lib/libc.so.6(+0x71217)[0xb746e217] /usr/lib/libc.so.6(+0x719ed)[0xb746e9ed] /usr/lib/libc.so.6(closedir+0x23)[0xb74aafd3] powertop[0x806fb31]
powertop[0x805758a]
powertop[0x804d36e] /usr/lib/libc.so.6(__libc_start_main+0xde)[0xb7414e5e] powertop[0x804e39d]
======= Memory map: ========
08048000-080bb000 r-xp 00000000 08:13 129320 /usr/bin/powertop 080bb000-080bc000 r--p 00072000 08:13 129320 /usr/bin/powertop 080bc000-080bd000 rw-p 00073000 08:13 129320 /usr/bin/powertop 080bd000-080bf000 rw-p 00000000 00:00 0
09529000-09ae7000 rw-p 00000000 00:00 0 [heap] b73e1000-b73e4000 rw-p 00000000 00:00 0
b73e4000-b73f8000 r-xp 00000000 08:13 149123 /usr/lib/libresolv-2.20.so b73f8000-b73f9000 ---p 00014000 08:13 149123 /usr/lib/libresolv-2.20.so b73f9000-b73fa000 r--p 00014000 08:13 149123 /usr/lib/libresolv-2.20.so b73fa000-b73fb000 rw-p 00015000 08:13 149123 /usr/lib/libresolv-2.20.so b73fb000-b73fd000 rw-p 00000000 00:00 0
b73fd000-b75ae000 r-xp 00000000 08:13 149166 /usr/lib/libc-2.20.so b75ae000-b75b1000 r--p 001b0000 08:13 149166 /usr/lib/libc-2.20.so b75b1000-b75b3000 rw-p 001b3000 08:13 149166 /usr/lib/libc-2.20.so b75b3000-b75b5000 rw-p 00000000 00:00 0
b75b5000-b75d1000 r-xp 00000000 08:13 159577 /usr/lib/libgcc_s.so.1 b75d1000-b75d2000 rw-p 0001b000 08:13 159577 /usr/lib/libgcc_s.so.1 b75d2000-b761d000 r-xp 00000000 08:13 149165 /usr/lib/libm-2.20.so b761d000-b761e000 r--p 0004a000 08:13 149165 /usr/lib/libm-2.20.so b761e000-b761f000 rw-p 0004b000 08:13 149165 /usr/lib/libm-2.20.so b761f000-b7708000 r-xp 00000000 08:13 159583 /usr/lib/libstdc++.so.6.0.20 b7708000-b770c000 r--p 000e9000 08:13 159583 /usr/lib/libstdc++.so.6.0.20 b770c000-b770d000 rw-p 000ed000 08:13 159583 /usr/lib/libstdc++.so.6.0.20 b770d000-b7715000 rw-p 00000000 00:00 0
b7715000-b772d000 r-xp 00000000 08:13 149130 /usr/lib/libpthread-2.20.so b772d000-b772e000 r--p 00017000 08:13 149130 /usr/lib/libpthread-2.20.so b772e000-b772f000 rw-p 00018000 08:13 149130 /usr/lib/libpthread-2.20.so b772f000-b7731000 rw-p 00000000 00:00 0
b7731000-b773d000 r-xp 00000000 08:13 137914 /usr/lib/libpci.so.3.3.0 b773d000-b773e000 r--p 0000b000 08:13 137914 /usr/lib/libpci.so.3.3.0 b773e000-b773f000 rw-p 0000c000 08:13 137914 /usr/lib/libpci.so.3.3.0 b773f000-b77a1000 r-xp 00000000 08:13 132783 /usr/lib/libncursesw.so.5.9 b77a1000-b77a3000 r--p 00062000 08:13 132783 /usr/lib/libncursesw.so.5.9 b77a3000-b77a4000 rw-p 00064000 08:13 132783 /usr/lib/libncursesw.so.5.9 b77a4000-b77c2000 r-xp 00000000 08:13 149793 /usr/lib/libnl-3.so.200.20.0 b77c2000-b77c3000 r--p 0001d000 08:13 149793 /usr/lib/libnl-3.so.200.20.0 b77c3000-b77c4000 rw-p 0001e000 08:13 149793 /usr/lib/libnl-3.so.200.20.0 b77c4000-b77c9000 r-xp 00000000 08:13 149794 /usr/lib/libnl-genl-3.so.200.20.0
b77c9000-b77ca000 r--p 00004000 08:13 149794 /usr/lib/libnl-genl-3.so.200.20.0
b77ca000-b77cb000 rw-p 00005000 08:13 149794 /usr/lib/libnl-genl-3.so.200.20.0
b77d6000-b77d8000 rw-p 00000000 00:00 0
b77d8000-b77da000 r--p 00000000 00:00 0 [vvar] b77da000-b77db000 r-xp 00000000 00:00 0 [vdso] b77db000-b77fc000 r-xp 00000000 08:13 149126 /usr/lib/ld-2.20.so b77fc000-b77fd000 rw-p 00000000 00:00 0
b77fd000-b77fe000 r--p 00021000 08:13 149126 /usr/lib/ld-2.20.so b77fe000-b77ff000 rw-p 00022000 08:13 149126 /usr/lib/ld-2.20.so bfe80000-bfea1000 rw-p 00000000 00:00 0 [stack]
Aborted (core dumped)
See also Arch Bug report here:
https://bugs.archlinux.org/task/43150
They pointed me to this mailing list. Hope I am right here.
Harvey
Signature · 1 line
I am root. If you see me laughing, you'd better have a backup!
Sami Kerola
Quoted 4 lines · Harvey
Hope I am right here:
On Archlinux 64bit as well as 32bit systems powertop 2.7 crashes reproducible like this when called with the parameter --auto-tune:
Hi Harvey,
Rather strange. I have up to date archlinux and the same does not happen when I run --auto-tune.
I'm just a hobbyist contributor and I haven't cracked out how to know where in code 'double free or corruption (!prev): 0x0975bc20' issue happen. Could you compile the tool with debugging symbols, and recreate issue the way we could see backtrace? That would make fixing a lot easier.
cd /tmp
wget https://01.org/sites/default/files/downloads/powertop/powertop-2.7.tar.gz
tar xzf powertop-2.7.tar.gz
cd powertop-2.7
CXXLAGS="-O0 -g -ggdb -fno-omit-frame-pointer" ./configure
make -j3
sudo -i
cd /tmp/powertop-2.7
./src/powertop --auto-tune
[crash]
coredumpctl gdb
(gdb) bt full
<copy paste this output to reply>
Signature · 2 lines
Sami Kerola http://www.iki.fi/kerolasa/
Arjan van de Ven
Quoted 6 lines
I'm just a hobbyist contributor and I haven't cracked out how to know where in code 'double free or corruption (!prev):
0x0975bc20' issue happen. Could you compile the tool with debugging symbols, and recreate issue the way we could see backtrace? That would make fixing a lot easier.
Quoted 13 lines
cd /tmp
wget https://01.org/sites/default/files/downloads/powertop/powertop-2.7.tar.gz
tar xzf powertop-2.7.tar.gz
cd powertop-2.7
CXXLAGS="-O0 -g -ggdb -fno-omit-frame-pointer" ./configure
make -j3
sudo -i
cd/tmp/powertop-2.7
./src/powertop --auto-tune
[crash]
coredumpctl gdb
(gdb) bt full
<copy paste this output to reply>
this would indeed be very helpful
another helpful thing could be to run "strace" on powertop, and c-n-p the last 20 lines or so
Joerg Mayer
Quoted 20 lines · Arjan van de Ven
Quoted 6 lines
I'm just a hobbyist contributor and I haven't cracked out how to know where in code 'double free or corruption (!prev):
0x0975bc20' issue happen. Could you compile the tool with debugging symbols, and recreate issue the way we could see backtrace? That would make fixing a lot easier.Quoted 13 lines
cd /tmp
wget https://01.org/sites/default/files/downloads/powertop/powertop-2.7.tar.gz
tar xzf powertop-2.7.tar.gz
cd powertop-2.7
CXXLAGS="-O0 -g -ggdb -fno-omit-frame-pointer" ./configure
make -j3
sudo -i
cd/tmp/powertop-2.7
./src/powertop --auto-tune
[crash]
coredumpctl gdb
(gdb) bt full
<copy paste this output to reply>
Quoted 3 lines
this would indeed be very helpful
another helpful thing could be to run "strace" on powertop, and c-n-p the last 20 lines or so
The fun with global variables. The following patch fixed this form me.
src/devices/devfreq.cpp +1 -0
@@ -247,6 +247,7 @@ void create_all_devfreq_devices(void) fprintf(stderr, "Devfreq not enabled\n"); is_enabled = false; closedir(dir); + dir = NULL; return; }
Ciao
Jörg
Signature · 3 lines
Joerg Mayer <jmayer(a)loplof.de> We are stuck with technology when what we really want is just stuff that works. Some say that should read Microsoft instead of technology.
Harvey
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Arjan,
Quoted 2 lines
another helpful thing could be to run "strace" on powertop, and c-n-p the last 20 lines or so
I put a complete trace from an i686 system here:
http://pastebin.com/nxyR7FGr
Hope this helps
Harvey
- --
I am root. If you see me laughing, you'd better have a backup! -----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iEYEARECAAYFAlSYJr0ACgkQi5aqmLBUSgk/1wCeP/sBVGV/IAQd3FyazuYhkthD +xMAniSpY3+1mED+70JB+9ciTobso40G
=UzPq
-----END PGP SIGNATURE-----
Harvey
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Sami.
thank you for your answer.
Quoted 6 lines
Quoted 3 lines
On Archlinux 64bit as well as 32bit systems powertop 2.7 crashes reproducible like this when called with the parameter --auto-tune:
Rather strange. I have up to date archlinux and the same does not happen when I run --auto-tune.
As of today the crash is gone on my x86_64 system (all testing repos enabled). I guess you tried on x86_64, but not i686? Don't know why its gone in x86_64, but anyway, i686 still crashes. And the headless server I use powertop on to elegantly optimize power settings still crashes when using powertop --auto-tune. The funny thing is that the settings get optimized nevertheless as a call of powertop wihout
- --auto-tune parameter shows me.
Quoted 8 lines
I'm just a hobbyist contributor and I haven't cracked out how to know where in code 'double free or corruption (!prev):
0x0975bc20' issue happen. Could you compile the tool with debugging symbols, and recreate issue the way we could see backtrace? That would make fixing a lot easier.cd /tmp wget
https://01.org/sites/default/files/downloads/powertop/powertop-2.7.tar.gz
Quoted 2 lines
tar xzf powertop-2.7.tar.gz
Quoted 4 lines
cd powertop-2.7 CXXLAGS="-O0 -g -ggdb -fno-omit-frame-pointer" ./configure make -j3 sudo -i cd
/tmp/powertop-2.7./src/powertop --auto-tune [crash] coredumpctl gdb (gdb) bt full <copy paste this output to reply>
I tried this but there was no useful output due to missing debugging symbols, I guess what do I have to do to enable those?
Thank you
Harvey
- -- I am root. If you see me laughing, you'd better have a backup!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iEYEARECAAYFAlSYKiYACgkQi5aqmLBUSgmtzwCfXHzmcyZuES5OlqR4oq4eF6TZ QJQAn32UAso83cAUch03mNW1xWpIE7hc
=dV+X
-----END PGP SIGNATURE-----