Bug 830293 - cpupower set --perf-bias does not work
Summary: cpupower set --perf-bias does not work
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 16
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-08 18:47 UTC by Andrew J. Schorr
Modified: 2013-02-13 15:39 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-13 15:39:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Andrew J. Schorr 2012-06-08 18:47:30 UTC
Description of problem: When I run "cpupower set --perf-bias 0", there is a
segmentation fault, and it dumps core.


Version-Release number of selected component (if applicable):
cpupower 3.3.7-1.fc16.x86_64


How reproducible: Just run the command.


Steps to Reproduce:
1. Run "cpupower set --perf-bias 0"
2.
3.
  
Actual results: Segmentation fault (core dumped)


Expected results: Should change the CPU performance bias.


Additional info: Here is a gdb backtrace:
bash$ gdb /usr/bin/cpupower                                                     GNU gdb (GDB) Fedora (7.3.50.20110722-13.fc16)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/cpupower...(no debugging symbols found)...done.
Missing separate debuginfos, use: debuginfo-install kernel-tools-3.3.7-1.fc16.x86_64
(gdb) run set --perf-bias 0
Starting program: /usr/bin/cpupower set --perf-bias 0
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7445cf4 in ____strtoll_l_internal () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff7445cf4 in ____strtoll_l_internal () from /lib64/libc.so.6
#1  0x0000000000408752 in ?? ()
#2  0x0000000000406af4 in ?? ()
#3  0x00007ffff742c69d in __libc_start_main () from /lib64/libc.so.6
#4  0x00000000004020c9 in ?? ()
#5  0x00007fffffffdc18 in ?? ()
#6  0x000000000000001c in ?? ()
#7  0x0000000000000004 in ?? ()
#8  0x00007fffffffe002 in ?? ()
#9  0x00007fffffffe014 in ?? ()
#10 0x00007fffffffe018 in ?? ()
#11 0x00007fffffffe024 in ?? ()
#12 0x0000000000000000 in ?? ()

Comment 1 Andrew J. Schorr 2012-06-09 02:49:49 UTC
I just realized that the short option (-b) works.  In cpupower-set.c,
getopt_long is called like so:

        while ((ret = getopt_long(argc, argv, "m:s:b:",
                                                set_opts, NULL)) != -1) {

And set_opts is defined like this:

static struct option set_opts[] = {
        { .name = "perf-bias",  .has_arg = optional_argument,   .flag = NULL,   
.val = 'b'},
        { .name = "sched-mc",   .has_arg = optional_argument,   .flag = NULL,   
.val = 'm'},
        { .name = "sched-smt",  .has_arg = optional_argument,   .flag = NULL,   
.val = 's'},
        { },
};


Shouldn't has_arg be "required_argument", not "optional_argument"?  I think
that may be causing the problem.

Regards,
Andy

Comment 2 Dave Jones 2012-06-11 14:38:01 UTC
reported to upstream maintainer.

Comment 3 Dave Jones 2012-10-23 15:26:33 UTC
# Mass update to all open bugs.

Kernel 3.6.2-1.fc16 has just been pushed to updates.
This update is a significant rebase from the previous version.

Please retest with this kernel, and let us know if your problem has been fixed.

In the event that you have upgraded to a newer release and the bug you reported
is still present, please change the version field to the newest release you have
encountered the issue with.  Before doing so, please ensure you are testing the
latest kernel update in that release and attach any new and relevant information
you may have gathered.

If you are not the original bug reporter and you still experience this bug,
please file a new report, as it is possible that you may be seeing a
different problem. 
(Please don't clone this bug, a fresh bug referencing this bug in the comment is sufficient).

Comment 4 Andrew J. Schorr 2012-10-25 14:12:54 UTC
I retested. This bug is still present in kernel-tools-3.6.2-1.fc16.x86_64.

Regards,
Andy

Comment 5 Fedora End Of Life 2013-01-16 14:33:23 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Fedora End Of Life 2013-02-13 15:39:57 UTC
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


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