Warning at kernel/sched/core.c:5509 in preempt_count_sub() after scheduling while atomic

Solution Verified - Updated -

Issue

  • The following messages are logged during boot:
 BUG: scheduling while atomic: bash/84429/0x00000002
 Preemption disabled at:
 [<ffffffffb1c310e6>] fpu_clone+0xc6/0x3b0
 CPU: 64 PID: 84429 Comm: bash Kdump: loaded Tainted: G           OE    --------- ---  5.14.0-70.13.1.rt21.83.el9_0.x86_64 #1
 Hardware name: Dell Inc. PowerEdge R760/05P22R, BIOS 0.3.0 11/08/2022
 Call Trace:
  dump_stack_lvl+0x34/0x44
  __schedule_bug.cold+0x7d/0x8b
  __schedule+0x439/0x5b0
  schedule_rtlock+0x1e/0x40
  rtlock_slowlock_locked+0xf1/0x260
  rt_spin_lock+0x41/0x60
  fpu_clone+0x33f/0x3b0
  copy_thread+0xe8/0x250
  copy_process+0x9f3/0x16a0
  kernel_clone+0x97/0x400
  __do_sys_clone+0x60/0x80
  do_syscall_64+0x38/0x90
[---]
 DEBUG_LOCKS_WARN_ON(val > preempt_count())
 WARNING: CPU: 64 PID: 84429 at kernel/sched/core.c:5509 preempt_count_sub+0x5a/0x90
 CPU: 64 PID: 84429 Comm: bash Kdump: loaded Tainted: G        W  OE    --------- ---  5.14.0-70.13.1.rt21.83.el9_0.x86_64 #1
 Hardware name: Dell Inc. PowerEdge R760/05P22R, BIOS 0.3.0 11/08/2022
 RIP: 0010:preempt_count_sub+0x5a/0x90
[--]
 Call Trace:
  fpu_clone+0xf9/0x3b0
  copy_thread+0xe8/0x250
  copy_process+0x9f3/0x16a0
  kernel_clone+0x97/0x400
  __do_sys_clone+0x60/0x80
  do_syscall_64+0x38/0x90
[--]

Environment

  • Red Hat Enterprise Linux 8.6, 8.7 for Realtime
  • Red Hat Enterprise Linux 9.0, 9.1 for Realtime
  • Intel Sapphire Rapids CPU

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content