cpu_offlining script doesn't work properly on ARM

Bug #1078897 reported by Jeff Lane 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox
Fix Released
Low
Jeff Lane 

Bug Description

Attempted to run the cpu_offlining script on the AC100 running the armhf image for Quantal. This is the result:
bladernr@mynock:/usr/share/checkbox/scripts$ sudo ./cpu_offlining
Beginning CPU Offlining Test
Offlining cpu0
./cpu_offlining: line 11: echo: write error: Operation not permitted
ERROR: Failed to offline cpu0
Offlining cpu1
Onlining cpu0
./cpu_offlining: line 25: echo: write error: Invalid argument
Onlining cpu1

it appears that the offlining and onlining of cpu1 is successful, but it attempts the same on cpu0 for some reason and gets a write error. The two lines in question are attempting to write bits into the online cpu hook in sys:

/sys/devices/system/cpu/$cpu_num/online

interestingly, on the AC100 at least, cpu0 has an online file... this is generally NOT present for cpu0 on x86/amd64

One solution woudl be to simply fix the script to skip processor 0 by default. However, it IS entirely possible, though rare, that cpu0 is not the primary core... there is always the possibility that CPU0 is Core X on the chip depending on how the chip was designed or which cores were cut during assembly and testing at the factory. Usually this is not an issue though, it's a very small corner case, IME.

Related branches

tags: added: server
Revision history for this message
Jeff Lane  (bladernr) wrote :

There was another bug 1053594 that dealt with this as well, and in the process of deleting my broken checkbox branch that addresses the issue, I seem to have deleted the bug itself :/

Luckily, that bug and this bug are essentially the same.

So the issue boils down to CPU0 being "special" for ARM, so to fix this, we'll just work around it by not trying to offline cpu0

Changed in checkbox:
status: New → In Progress
importance: Undecided → Low
assignee: nobody → Jeff Lane (bladernr)
Jeff Lane  (bladernr)
Changed in checkbox:
status: In Progress → Fix Committed
Changed in checkbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.