An ECS instance crashes on startup with a RIP:get_target_pstate_use_performance division-by-zero error caused by the Intel pstate driver. Upgrade the kernel to 4.18 or later to fix this issue.
Problem
The ECS instance crashes on startup with a call stack similar to the following:
[ 1.076899] divide error: 0000 [#1] SMP
[ 1.077669] Modules linked in:
[ 1.078302] CPU: 4 PID: 9 Comm: rcu_sched Not tainted 3.10.0-1127.19.1.el7.x86_64 #1
[ 1.079519] Hardware name: Alibaba Cloud Alibaba Cloud ECS, BIOS 8f19b21 04/01/2014
[ 1.080724] task: ffff91c8fa111070 ti: ffff91c8fa11c000 task.ti: ffff91c8fa11c000
[ 1.081919] RIP: 0010:[<ffffffff85dc3089>] [<ffffffff85dc3089>] get_target_pstate_use_performance+0x29/0xc0
[ 1.083355] RSP: 0000:ffff91c8fa11fb40 EFLAGS: 00010006
[ 1.093192] Call Trace:
[ 1.093715] [<ffffffff85dc4081>] intel_pstate_update_util+0x161/0x310
[ 1.094550] [<ffffffff858e9523>] ? load_balance+0x1a3/0xa10
[ 1.095321] [<ffffffff858e4e87>] update_curr+0x127/0x1e0
[ 1.096123] [<ffffffff858e52a8>] dequeue_entity+0x28/0x5c0
[ 1.096894] [<ffffffff8586d3be>] ? kvm_sched_clock_read+0x1e/0x30
[ 1.097702] [<ffffffff858e5893>] dequeue_task_fair+0x53/0x660
[ 1.098490] [<ffffffff858debe5>] ? sched_clock_cpu+0x85/0xc0
[ 1.099266] [<ffffffff858d7a56>] deactivate_task+0x46/0xd0
Cause
On startup, the Intel pstate driver initializes the current_pstate frequency to 0. When a process switch triggers CPU performance adjustment, the driver divides by the zero-valued current_pstate, causing a division-by-zero error.
Solution
Important
Before you proceed, create snapshots to back up instance data to prevent data loss. See Create snapshot manually.
Upgrade the kernel to version 4.18 or later.