Bug 432913 - CPU can not do hotplug when one task set affinity to it.
CPU can not do hotplug when one task set affinity to it.
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
9
i386 Linux
low Severity low
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-14 22:47 EST by Song, Youquan
Modified: 2009-07-14 11:42 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-14 11:42:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
CPU can not do hotplug when one task set affinity to it. (45.01 KB, image/png)
2008-02-27 04:18 EST, Song, Youquan
no flags Details
Alt-Sysrq-t log after run the script (119.48 KB, text/plain)
2008-02-27 05:02 EST, Song, Youquan
no flags Details

  None (edit)
Description Song, Youquan 2008-02-14 22:47:50 EST
Description of problem:

Install Fedora 9 (sorry, I can not find the entry for F9 bug report). 
Set one task affinity to one CPU core, then set offline the CPU core. After that
we can not set online the CPU core again.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.  run the test.sh script:   test.sh 1  ( 1 is the logical CPU )
test.sh script:
 
#!/bin/bash

main(){

    typeset -i CPU=$1
    ./task.sh > /dev/null&
    PID=$!

    if [ `cat /sys/devices/system/cpu/cpu${CPU}/online` = "0" ]; then
        echo "1" > /sys/devices/system/cpu/cpu${CPU}/online
    fi

    MASK=$((1<<${CPU}))

    `taskset -p ${MASK} ${PID} > /dev/null 2>&1`

    echo "0" > /sys/devices/system/cpu/cpu${CPU}/online

    echo "1" > /sys/devices/system/cpu/cpu${CPU}/online

    disown $PID
    kill -9 $PID > /dev/null 2>&1

    echo "PASS\n"

}

typeset -i TEST_CPU=$1
main $TEST_CPU

2. task.sh script as following

#!/bin/bash

while :
do
  NOOP=1
done

3.
  
Actual results:

The test.sh will block at set online the CPU ( echo "1" >
/sys/devices/system/cpu/cpu${CPU}/online ). 

Expected results:


Additional info:
Happened in Intel Bensley platform (2xXeon 2.83G Harpertown C0, chipset
Blackford G1, 160 SATA)
Comment 1 Bill Nottingham 2008-02-18 13:07:03 EST
Does this happen on the upstream kernel as well?
Comment 2 Song, Youquan 2008-02-21 03:59:48 EST
Yes. the kernel 2.6.24 to 2.6.25-rc2 also exit the bug. 
But the bug is not exit at kernel 2.6.18. 
Comment 3 Chuck Ebbert 2008-02-25 17:33:21 EST
Does the CPU mask of the running process get changed when the processor is offlined?

And can you get a system state (alt-sysrq-t) when the script hangs?
Comment 4 Song, Youquan 2008-02-27 04:15:50 EST
Yes, after I set offline the CPU, I use commands "taskset -p $PID and ps --
pid=$PID -o psr" to find that process CPU mask is change and process migrate 
to other CPU correctly.
Attachment is the Screenshot.png
Comment 5 Song, Youquan 2008-02-27 04:18:13 EST
Created attachment 296037 [details]
CPU can not  do hotplug when one task  set affinity to it.
Comment 6 Song, Youquan 2008-02-27 05:02:48 EST
Created attachment 296040 [details]
Alt-Sysrq-t log after run the script
Comment 7 Song, Youquan 2008-04-11 07:17:23 EDT
This bug is still exits on FC9 Beta.
Comment 8 Bug Zapper 2008-05-14 01:12:51 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 9 Bug Zapper 2009-06-09 19:34:04 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  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 '9'.

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 9'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 9 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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 10 Bug Zapper 2009-07-14 11:42:07 EDT
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 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.