Skip to content

[Bug] stopLlamaServer blocks indefinitely due to Promise.race logic flaw #149

Description

@akramcodez

Description

Promise.race([exited, escalation]) resolves when escalation finishes. However, it then immediately calls await exited. Since the child process might not instantly die when receiving SIGKILL (or might be a zombie), the function hangs synchronously forever instead of gracefully continuing.

Environment

  • macOS version: macOS 14.0
  • Apple Silicon: M2
  • Node version: v22.0.0
  • Python version: 3.12
  • Nanotune version: 1.7.0

Steps to Reproduce

  1. Trigger a fast shutdown while a heavy server load is occurring.
  2. The escalation promise resolves, but await exited stalls the shutdown.

Expected Behavior

The function should exit immediately after the SIGKILL is dispatched.

Actual Behavior

The function hangs indefinitely awaiting a process exit that may be delayed or stuck.

Logs/Screenshots

N/A

Additional Context

  • I have searched existing issues to ensure this is not a duplicate
  • I can reproduce this issue consistently
  • This issue occurs with the latest version of nanotune

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions