Public bug reported:

BugLink: https://bugs.launchpad.net/bugs/2166862

[ Impact ]

7.0 kernel introduced a bug where offlining enough of CPUs before s0i3
causes system hang. This is platform independent (it can reproduce in
QEMU for example).

To reproduce, on a ZBook Ultra G1a (with 32 cores), with
7.0.0-31-generic kernel, offlining processors:

$ printf '0\n' | sudo tee /sys/devices/system/cpu/cpu{8..31}/online

And let the system supend (e.g. systemctl suspend). Then after a resume,
the system would end up hang or extremely laggy.

[ Fix ]

Cherry-pick the following patch:

- [PATCH v4] lib/group_cpus: Snapshot cluster masks to keep grouping
hotplug invariant

Which is currently under upstream review. The hope would be for it to
land in one of the 7.3-rcX, or in 7.4.

[ Test plan ]

On the said platform, offline some processors, say:

$ printf '0\n' | sudo tee /sys/devices/system/cpu/cpu{8..31}/online

Suspend the system:

$ systemctl suspend

And resume. The system should resume normally.

[ Where problem could occur ]

From the discussion in the mail thread, this would be a general
scheduler code change. Ideally would need test coverage from other
platforms.

[ Additional information ]

The offending commit 89802ca36c96 ("lib/group_cpus: make group CPU
cluster aware") was included in 7.0 kernel, so older kernel shouldn't
get impacted.

[1]
https://lore.kernel.org/all/[email protected]/

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New

** Summary changed:

- [SRU] System hang after S0ix if CPUs are offlined
+ [SRU] System hang after S0ix if enough of CPUs are offlined beforehand

** Description changed:

  [ Impact ]
  
  7.0 kernel introduced a bug where offlining enough of CPUs before s0i3
  causes system hang. This is platform independent (it can reproduce in
  QEMU for example).
  
  To reproduce, on a ZBook Ultra G1a (with 32 cores), with
  7.0.0-31-generic kernel, offlining processors:
  
  $ printf '0\n' | sudo tee /sys/devices/system/cpu/cpu{8..31}/online
  
  And let the system supend (e.g. systemctl suspend). Then after a resume,
  the system would end up hang or extremely laggy.
  
  
  [ Fix ]
  
  Cherry-pick the following patch:
  
  - [PATCH v4] lib/group_cpus: Snapshot cluster masks to keep grouping
  hotplug invariant
  
  Which is currently under upstream review. The hope would be for it to
  land in one of the 7.3-rcX, or in 7.4.
  
  
  [ Test plan ]
  
  On the said platform, offline some processors, say:
  
  $ printf '0\n' | sudo tee /sys/devices/system/cpu/cpu{8..31}/online
  
  Suspend the system:
  
  $ systemctl suspend
  
  And resume. The system should resume normally.
  
  
+ [ Where problem could occur ]
+ 
+ From the discussion in the mail thread, this would be a general
+ scheduler code change. Ideally would need test coverage from other
+ platforms.
+ 
+ 
  [ Additional information ]
+ 
+ The offending commit 89802ca36c96 ("lib/group_cpus: make group CPU
+ cluster aware") was included in 7.0 kernel, so older kernel shouldn't
+ get impacted.
  
  [1]
  https://lore.kernel.org/all/[email protected]/

** Description changed:

+ BugLink: https://bugs.launchpad.net/bugs/2166862
+ 
  [ Impact ]
  
  7.0 kernel introduced a bug where offlining enough of CPUs before s0i3
  causes system hang. This is platform independent (it can reproduce in
  QEMU for example).
  
  To reproduce, on a ZBook Ultra G1a (with 32 cores), with
  7.0.0-31-generic kernel, offlining processors:
  
  $ printf '0\n' | sudo tee /sys/devices/system/cpu/cpu{8..31}/online
  
  And let the system supend (e.g. systemctl suspend). Then after a resume,
  the system would end up hang or extremely laggy.
  
- 
  [ Fix ]
  
  Cherry-pick the following patch:
  
  - [PATCH v4] lib/group_cpus: Snapshot cluster masks to keep grouping
  hotplug invariant
  
  Which is currently under upstream review. The hope would be for it to
  land in one of the 7.3-rcX, or in 7.4.
- 
  
  [ Test plan ]
  
  On the said platform, offline some processors, say:
  
  $ printf '0\n' | sudo tee /sys/devices/system/cpu/cpu{8..31}/online
  
  Suspend the system:
  
  $ systemctl suspend
  
  And resume. The system should resume normally.
  
- 
  [ Where problem could occur ]
  
  From the discussion in the mail thread, this would be a general
  scheduler code change. Ideally would need test coverage from other
  platforms.
- 
  
  [ Additional information ]
  
  The offending commit 89802ca36c96 ("lib/group_cpus: make group CPU
  cluster aware") was included in 7.0 kernel, so older kernel shouldn't
  get impacted.
  
  [1]
  https://lore.kernel.org/all/[email protected]/

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2166862

Title:
  [SRU] System hang after S0ix if enough of CPUs are offlined beforehand

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2166862/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to