Bug 29198 - Crash of powertop if Java is running at same time
Summary: Crash of powertop if Java is running at same time
Status: UPSTREAM
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: All Packagers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-01 13:16 CEST by Marc Krämer
Modified: 2021-07-09 21:50 CEST (History)
1 user (show)

See Also:
Source RPM: powertop-2.13-1.mga8.src.rpm
CVE:
Status comment:


Attachments

Description Marc Krämer 2021-07-01 13:16:25 CEST
starting powertop gives:
modprobe cpufreq_stats failed750 geladene vorherige Messungen
RAPL device for cpu 0
RAPL device for cpu 0
Devfreq not enabled
glob returned GLOB_ABORTED

then get an empty screen and finally:
*** stack smashing detected ***: terminated
                                           Abgebrochen (Speicherabzug geschrieben)
Comment 1 Lewis Smith 2021-07-01 21:07:07 CEST
Thank you for the report, Marc.
It is not black-&-white. I just installed powertop on my M8 desktop box (LXDE), and it worked fine. The only glitch was needing to <Esc> twice to end it - when it output almost the same as you report:
"modprobe cpufreq_stats failedLoaded 0 prior measurements
 RAPL device for cpu 0
 RAPL device for cpu 0
 Devfreq not enabled
 glob returned GLOB_ABORTED
 Leaving PowerTOP"

Can you post the O/P of:
 $ inxi -MS[B]          the B only if you have a battery powered laptop.
And also say whether what you describe happens immediately, with powertop not displaying anything at all beforehand.

Ever confirmed: 1 => 0
CC: (none) => lewyssmith
Status: NEW => UNCONFIRMED

Comment 2 Marc Krämer 2021-07-02 17:30:01 CEST
inxi -MSB
System:    Host: lap01.aldente Kernel: 5.10.46-desktop-1.mga8 x86_64 bits: 64 Desktop: MATE 1.24.2 Distro: Mageia 8 mga8 
Machine:   Type: Laptop System: LENOVO product: 43843DG v: ThinkPad T510 serial: R80GZ69 
           Mobo: LENOVO model: 43843DG serial: 1ZHVB06L48A BIOS: LENOVO v: 6MET61WW (1.24 ) date: 06/07/2010 
Battery:   ID-1: BAT0 charge: 21.3 Wh condition: 78.6/93.6 Wh (84%) 


It worked before, I can't say when it stopped working, but I think 2 weeks ago all was ok.

It happens before any results are displayed - I'd say in the moment it tries to display.


strace output shows this:
openat(AT_FDCWD, "/proc/9696/cmdline", O_RDONLY) = 63
                                                                                                                     read(63, "/usr/lib/jvm/java-11-openjdk-11."..., 8191) = 4217
         close(63)                               = 0
writev(2, [{iov_base="*** ", iov_len=4}, {iov_base="stack smashing detected", iov_len=23}, {iov_base=" ***: terminated\n", iov_len=17}], 3*** stack smashing detected ***: terminated
                                                                 ) = 44

it might be sth. in combination of java-11? But I didn't expect powertop to crash because of a certain process running....
Comment 3 Lewis Smith 2021-07-02 22:04:03 CEST
> It worked before, I can't say when it stopped working,
> but I think 2 weeks ago all was ok.
Java 11 looks a possible cause, because it seems it was updated recently; on my system (where powertop works):
 $ rpm -q --last java-11-openjdk
 java-11-openjdk-11.0.11.0.9-0.1.mga8.x86_64   Tue Jun 29  2021
 $ rpm -q --last java-11-openjdk-headless
 java-11-openjdk-headless-11.0.11.0.9-0.1.mga8.x86_64 Tue Jun 29  2021

Can you confirm your Java version? Is it possible that the fault arose with this very recent latest one?
Comment 4 Marc Krämer 2021-07-04 09:56:39 CEST
I've got those versions:
java-11-openjdk-11.0.11.0.9-0.1.mga8.x86_64
java-11-openjdk-headless-11.0.11.0.9-0.1.mga8.x86_64
java-latest-openjdk-16.0.0.0.36-0.rolling.1.mga8.x86_64
java-latest-openjdk-headless-16.0.0.0.36-0.rolling.1.mga8.x86_64

When java is not running, powertop works :)

Still, it looks like a major problem, if a user process is crashing this tool.
Comment 5 Dave Hodgins 2021-07-04 20:25:03 CEST
Is this a regression from the prior version of powertop?

What do you mean by when java is running? What is running under java and is it
running as root or as the user?

CC: (none) => davidwhodgins

Comment 6 Marc Krämer 2021-07-05 11:13:45 CEST
I'm not sure if it is a regression of java or powertop - but powertop should just not fail because of a user running java. And AFAIK this was introduced by the latest java release.

I have these processes:
ps aux|grep java
marc        2724  0.0  0.0  22352  3264 ?        S    11:05   0:00 /bin/bash /opt/netbeans/platform/lib/nbexec --userdir /home/marc/.netbeans/12.4 --cachedir /home/marc/.cache/netbeans/12.4 --jdkhome  --branding nb --clusters /opt/netbeans/nb:/opt/netbeans/ergonomics:/opt/netbeans/ide:/opt/netbeans/extide:/opt/netbeans/java:/opt/netbeans/apisupport:/opt/netbeans/webcommon:/opt/netbeans/websvccommon:/opt/netbeans/enterprise:/opt/netbeans/mobility:/opt/netbeans/profiler:/opt/netbeans/python:/opt/netbeans/php:/opt/netbeans/identity:/opt/netbeans/harness:/opt/netbeans/cnd:/opt/netbeans/cndext:/opt/netbeans/cpplite:/opt/netbeans/dlight:/opt/netbeans/groovy:/opt/netbeans/extra:/opt/netbeans/javacard:/opt/netbeans/javafx: -J-Dnetbeans.importclass=org.netbeans.upgrade.AutoUpgrade -J-XX:+UseStringDeduplication -J-Xss2m -J-Djdk.gtk.version=2.2 -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dsun.zip.disableMemoryMapping=true -J-Dplugin.manager.check.updates=false -J-Dnetbeans.extbrowser.manual_chrome_plugin_install=yes -J--add-opens=java.base/java.net=ALL-UNNAMED -J--add-opens=java.base/java.lang.ref=ALL-UNNAMED -J--add-opens=java.base/java.lang=ALL-UNNAMED -J--add-opens=java.base/java.security=ALL-UNNAMED -J--add-opens=java.base/java.util=ALL-UNNAMED -J--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED -J--add-opens=java.desktop/javax.swing.text=ALL-UNNAMED -J--add-opens=java.desktop/javax.swing=ALL-UNNAMED -J--add-opens=java.desktop/java.awt=ALL-UNNAMED -J--add-opens=java.desktop/java.awt.event=ALL-UNNAMED -J--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED -J--add-opens=jdk.jshell/jdk.jshell=ALL-UNNAMED -J--add-modules=jdk.jshell -J--add-exports=java.desktop/sun.awt=ALL-UNNAMED -J--add-exports=java.desktop/java.awt.peer=ALL-UNNAMED -J--add-exports=java.desktop/com.sun.beans.editors=ALL-UNNAMED -J--add-exports=java.desktop/sun.swing=ALL-UNNAMED -J--add-exports=java.desktop/sun.awt.im=ALL-UNNAMED -J--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED -J--add-exports=java.management/sun.management=ALL-UNNAMED -J--add-exports=java.base/sun.reflect.annotation=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED -J--add-exports=jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED -J--add-exports=jdk.jdeps/com.sun.tools.javap=ALL-UNNAMED -J--add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED -J-XX:+IgnoreUnrecognizedVMOptions
marc        2958  100 10.5 5911504 837636 ?      Sl   11:05   3:39 /usr/lib/jvm/java-11-openjdk-11.0.11.0.9-0.1.mga8.x86_64/bin/java -Djdk.home=/usr/lib/jvm/java-11-openjdk-11.0.11.0.9-0.1.mga8.x86_64 -classpath /opt/netbeans/platform/lib/boot.jar:/opt/netbeans/platform/lib/org-openide-modules.jar:/opt/netbeans/platform/lib/org-openide-util.jar:/opt/netbeans/platform/lib/org-openide-util-lookup.jar:/opt/netbeans/platform/lib/org-openide-util-ui.jar -Dnetbeans.default_userdir_root=/home/marc/.netbeans -Dnetbeans.dirs=/opt/netbeans/nb:/opt/netbeans/ergonomics:/opt/netbeans/ide:/opt/netbeans/extide:/opt/netbeans/java:/opt/netbeans/apisupport:/opt/netbeans/webcommon:/opt/netbeans/websvccommon:/opt/netbeans/enterprise:/opt/netbeans/mobility:/opt/netbeans/profiler:/opt/netbeans/python:/opt/netbeans/php:/opt/netbeans/identity:/opt/netbeans/harness:/opt/netbeans/cnd:/opt/netbeans/cndext:/opt/netbeans/cpplite:/opt/netbeans/dlight:/opt/netbeans/groovy:/opt/netbeans/extra:/opt/netbeans/javacard:/opt/netbeans/javafx: -Dnetbeans.home=/opt/netbeans/platform -Dnetbeans.importclass=org.netbeans.upgrade.AutoUpgrade -XX:+UseStringDeduplication -Xss2m -Djdk.gtk.version=2.2 -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.java2d.noddraw=true -Dsun.java2d.dpiaware=true -Dsun.zip.disableMemoryMapping=true -Dplugin.manager.check.updates=false -Dnetbeans.extbrowser.manual_chrome_plugin_install=yes --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.lang.ref=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text=ALL-UNNAMED --add-opens=java.desktop/javax.swing=ALL-UNNAMED --add-opens=java.desktop/java.awt=ALL-UNNAMED --add-opens=java.desktop/java.awt.event=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=jdk.jshell/jdk.jshell=ALL-UNNAMED --add-modules=jdk.jshell --add-exports=java.desktop/sun.awt=ALL-UNNAMED --add-exports=java.desktop/java.awt.peer=ALL-UNNAMED --add-exports=java.desktop/com.sun.beans.editors=ALL-UNNAMED --add-exports=java.desktop/sun.swing=ALL-UNNAMED --add-exports=java.desktop/sun.awt.im=ALL-UNNAMED --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED --add-exports=java.management/sun.management=ALL-UNNAMED --add-exports=java.base/sun.reflect.annotation=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-exports=jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED --add-exports=jdk.jdeps/com.sun.tools.javap=ALL-UNNAMED --add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED -XX:+IgnoreUnrecognizedVMOptions -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/marc/.netbeans/12.4/var/log/heapdump.hprof org.netbeans.Main --cachedir /home/marc/.cache/netbeans/12.4 --userdir /home/marc/.netbeans/12.4 --branding nb
root        3499  0.0  0.0  21920   760 pts/1    S+   11:09   0:00 grep --color java


This is just netbeans running. powertop is ok, if netbeans is not running, but it crashes while netbeans (java) is running.
Comment 7 Dave Hodgins 2021-07-05 18:13:20 CEST
I suspect it's due to netbeans rather then java itself. Both netbeans and
powertop intercept other applications to monitor/profile their execution.

Are you sure you previously ran powertop with netbeans running with the
prior version of java?

I agree it should not crash and is a bug that needs to be fixed, just want
to be sure if it's a regression caused by the latest java or an already
existing problem.
Comment 8 Dave Hodgins 2021-07-05 18:14:26 CEST
Assigning to all packagers as there is no registered maintainer for powertop.

Assignee: bugsquad => pkg-bugs

Comment 9 Marc Krämer 2021-07-06 14:26:37 CEST
Since powertop is run as root, I assume "stack smashing" due to a user process should be noted upstream - this may have a serious problem.
Comment 10 Lewis Smith 2021-07-07 09:24:25 CEST
 https://01.org/powertop
is a good page, with links to a PDF user guide, Bugzilla, and
 https://01.org/community
which has other links to for example IRC and mailList. Can you poke there? If you end up raising a bug, pleas put its reference in this bug's URL field, and set the status to UPSTREAM until it is resolved.

Ever confirmed: 0 => 1
Summary: Crash of powertop => Crash of powertop if Java is running at same time
Status: UNCONFIRMED => NEW

Comment 11 Dave Hodgins 2021-07-08 02:27:32 CEST
I have recreated the problem and have opened
https://github.com/fenrus75/powertop/issues/88
with a backtrace attached.

Status: NEW => UPSTREAM

Comment 12 Marc Krämer 2021-07-08 13:23:41 CEST
thx Dave.
Lewis Smith 2021-07-09 21:50:25 CEST

CC: lewyssmith => (none)


Note You need to log in before you can comment on or make changes to this bug.