Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deadlock in Go tests when Debug Server startup fails. #4316

Commits on Oct 1, 2024

  1. pillar/tests: Fix deadlock when Debug Server startup fails.

    In `startIntegratedPSICollectorAPI`, if the server does not start within
    10 seconds, the function returns an error without unlocking
    `psiServerMutex`. This oversight leads to a deadlock in subsequent tests
    that attempt to acquire the same mutex.
    
    This commit adds `psiServerMutex.Unlock()` before returning the error to
    ensure that the mutex is properly released even when the server fails to
    start.
    
    Signed-off-by: Nikolay Martyanov <nikolay@zededa.com>
    OhmSpectator committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    e4cd602 View commit details
    Browse the repository at this point in the history