You are not logged in.

#1 2019-02-14 19:20:42

lazydog
Member
Registered: 2019-02-14
Posts: 2

powertop crashes with general protection fault

Hi everyone,

powertop-2.10-1-x86_64 crashed with a general protection fault after upgrading to kernel 4.20.8.arch1-1-x86_64

After I downgraded to kernel 4.20.4.arch1-1 the issue is gone, and powertop works as expected. I couldn't find anything about this problem in the official bugtracker, so I ask here if anyone else has similar problems with the newest kernel (or powertop-2.10)?

My platform is an Asus Zenbook UX410UAR with a Core i5-8250U CPU.

Last edited by lazydog (2019-02-14 19:21:19)

Offline

#2 2019-02-14 20:56:30

bashnev
Member
Registered: 2012-06-11
Posts: 24

Re: powertop crashes with general protection fault

I believe I have the similar issue. With the update to kernel 4.20.8.arch1_1-x86_64 I noticed my laptop fans were on high next boot. I found the powertop autotune service had failed. Running sudo powertop appeared to hang but eventually produced a segmentation fault. If I cancel the process before that point with ctrl-c powertop produces

modprobe cpufreq_stats failedLoaded 29 prior measurements
Cannot load from file /var/cache/powertop/saved_parameters.powertop
File will be loaded after taking minimum number of measurement(s) with battery only 
RAPL device for cpu 0
RAPL Using PowerCap Sysfs : Domain Mask f
RAPL device for cpu 0
RAPL Using PowerCap Sysfs : Domain Mask f
Devfreq not enabled
glob returned GLOB_ABORTED
Cannot load from file /var/cache/powertop/saved_parameters.powertop
File will be loaded after taking minimum number of measurement(s) with battery only 
To show power estimates do 235 measurement(s) connected to battery only

I haven't tried to downgrade to an earlier kernel. Laptop is a Clevo P950ER with Intel i7-8750H, and  GeForce GTX 1070

Offline

#3 2019-02-14 23:22:58

bashnev
Member
Registered: 2012-06-11
Posts: 24

Re: powertop crashes with general protection fault

Some info from the powertop mailing list:

https://lists.01.org/pipermail/powertop … 02029.html

So if this is the same issue it looks like downgrading the kernel until the patch is merged is the easiest option.

Offline

#4 2019-02-14 23:34:52

bashnev
Member
Registered: 2012-06-11
Posts: 24

Re: powertop crashes with general protection fault

Just confirming that downgrading to  kernel  and headers 4.20.7-arch1-1 allows powertop to run as normal on my laptop.

Offline

#5 2019-02-15 08:29:15

loqs
Member
Registered: 2014-03-06
Posts: 17,323

Re: powertop crashes with general protection fault

@bashnev that commit is in 4.20.8 as c2df99efd03e8255a127e685bd6c8b584d8c1dd8 cherry-picked from 9dff0aa95a324e262ffb03f425d00e4751f3294e in mainline.
Edit:
Oops sorry that is the causal commit the fix is in https://git.kernel.org/pub/scm/linux/ke … a003dc1614

Last edited by loqs (2019-02-15 08:41:15)

Offline

#6 2019-02-19 10:07:53

bashnev
Member
Registered: 2012-06-11
Posts: 24

Re: powertop crashes with general protection fault

I've just upgraded to 4.20.10-arch1-1-ARCH and the issue is still present.

Offline

#7 2019-02-20 02:00:23

madscience
Member
From: Ontario, Canada
Registered: 2014-02-11
Posts: 82
Website

Re: powertop crashes with general protection fault

https://bugs.archlinux.org/task/61767?s … &closedto=

It's happening on both 4.20.10 and 4.19.23 for me  (I have both the standard and LTS kernels installed)

Offline

#8 2019-02-20 15:42:11

geolimber
Member
From: Chile
Registered: 2019-02-20
Posts: 6

Re: powertop crashes with general protection fault

Get same problem after kernel upgrade from 4.20.8 to 4.20.10. Also the battery won't charge more than 96%.

Offline

#9 2019-02-22 00:15:32

keineeile
Member
Registered: 2012-03-03
Posts: 41

Re: powertop crashes with general protection fault

Update of kernel to 4.20.11 fixes the issue for me.

Offline

#10 2019-02-22 11:20:52

hh3k0
Member
From: Berlin
Registered: 2017-10-20
Posts: 1

Re: powertop crashes with general protection fault

keineeile wrote:

Update of kernel to 4.20.11 fixes the issue for me.

The kernel update fixed the issue for me, too.

Offline

#11 2019-02-22 22:26:15

bashnev
Member
Registered: 2012-06-11
Posts: 24

Re: powertop crashes with general protection fault

Fixed for me too with kernel 4.20.11.

Offline

#12 2019-04-24 08:58:33

b1tninja
Member
Registered: 2015-01-30
Posts: 2

Re: powertop crashes with general protection fault

The segfault happens becuase the perf_event::performance code checks perf_fd < 0, but when the perf event is being created, the fd is set prior to mmap attempt, and is not cleared on failure. Here are two different patches, both seem to fix the seg fault, which then handles the mmap failure without crashing.

Better solution, but probably less stable without further review:
https://gist.github.com/b1tninja/445b48 … 1eb9947818

Safest solution:
https://gist.github.com/b1tninja/445b48 … 8b5cba316b

Honestly I have no idea where to report this upstream, but that code in general is scary looking

Last edited by b1tninja (2019-04-24 09:00:16)

Offline

Board footer

Powered by FluxBB