Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-111526

stalld: "No such process" error when calling sched_getattr() on a terminated task

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-9.8
    • stalld
    • None
    • No
    • Low
    • rhel-kernel-rts-time
    • 0
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      Problem Summary

      The stalld daemon logs a "get_current_policy: failed with error No such process" error when it attempts to call sched_getattr() on the PID of a process that has already been terminated.

      This appears to be a race condition where a boosted task is killed and its PID becomes stale before stalld can process its state change. While not critical, this generates noisy and misleading error messages in the logs.

      Steps to Reproduce

      1. Start stalld in verbose mode, monitoring CPU 1: 
        stalld -v -b queue_track -c 1 -a 0
      1. In a separate terminal, start two CPU-intensive processes on CPU 1, one with SCHED_NORMAL priority and another with SCHED_FIFO:
        taskset -c 1 bash -c 'while :; do :; done' &
        taskset -c 1 chrt -f 40 bash -c 'while :; do :; done' &
      1. Wait for the SCHED_NORMAL process to be boosted by stalld.
      2. Kill both processes:
        killall bash
      1. Immediately repeat step 2 to start new processes.

      Expected Result

      After the original processes are killed, stalld should detect that the PID of the boosted task is no longer valid and handle it gracefully without logging an error.

      Actual Result

      stalld attempts to call sched_getattr() on the stale PID of the recently killed (and boosted) process. The call fails, and the following error is logged:
      get_current_policy: failed with error No such process

              wandercosta Wander Costa
              wandercosta Wander Costa
              Wander Costa Wander Costa
              Chang Yin Chang Yin
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: