Powertop segfaults zsh


Since the most recent update (2019/02/19) running sudo powertop results in a segfault in zsh (zsh: segmentation fault sudo powertop). This is the KDE Edition.

richard@andromeda-ascendant ~
 >>> zsh --version                                                                                                 [139]
zsh 5.7.1 (x86_64-pc-linux-gnu)
                               %                                                                                        richard@andromeda-ascendant ~
>>> powertop --version                                                                                                 
PowerTOP version v2.10

Operating System: Manjaro Linux 
KDE Plasma Version: 5.15.0
KDE Frameworks Version: 5.55.0
Qt Version: 5.12.1
Kernel Version: 4.20.10-1-MANJARO
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-8559U CPU @ 2.70GHz
Memory: 15.5 GiB of RAM


I can confirm the segfault (in a VM though).

Interestingly, I get the same error message as when trying to run sudo perf top, i.e. mmap problem:

powertop: failed to mmap with 12 (Cannot allocate memory)
perf top: Failed to mmap with 12 (Cannot allocate memory)

With perf, I can work around that by specifying a smaller mmap page value, i.e. sudo perf top -m 4.
For powertop, no idea…

Also reported on Arch bugtracker:

Should be fixed with 4.19.24+.