Skip to content

scheduler: is_current_idle_thread/try_schedule acquire SCHEDULER with interrupts enabled (latent self-deadlock; #789 producer) #790

Description

@ryanbreen

Mechanism: Scheduler::is_current_idle_thread and the dead Scheduler::try_schedule acquire the global SCHEDULER spin lock with interrupts enabled. If an EL1 IRQ lands while the same CPU holds that lock, the IRQ reschedule path reaches lock_for_context_switch and blocks on SCHEDULER.lock(), self-deadlocking the holder; peer vCPUs then pile onto the same lock, while the watchdog is structurally silent because its host timer interrupt is masked on the spinning CPU.

Status on main: latent. is_current_idle_thread has zero callers on main, and try_schedule is dead code, so main does not currently expose the producer through a live caller.

Repaired by slice 2 branch fix/789-sched-lock-irq-shape.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions