Skip to content

Fix hang issue in logging submodule #625

Merged
Binyang2014 merged 1 commit intomainfrom
binyli/lock
Sep 5, 2025
Merged

Fix hang issue in logging submodule #625
Binyang2014 merged 1 commit intomainfrom
binyli/lock

Conversation

@Binyang2014
Copy link
Contributor

Fix: #622, using std::recursive_mutex to allow acquiring lock reclusively in the same thread

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a hanging issue in the logging submodule by replacing pthread mutex with std::recursive_mutex to allow recursive lock acquisition in the same thread.

  • Replaces pthread_mutex_t with std::recursive_mutex for thread-safe logging
  • Uses RAII std::lock_guard for automatic lock management
  • Removes manual mutex lock/unlock calls that could lead to hanging
Comments suppressed due to low confidence (1)

src/debug.cc:1

  • Missing MIT license header. Please add the following license header at the top of the file: // Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.
// Copyright (c) 2016-2022, NVIDIA CORPORATION. All rights reserved.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Binyang2014
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@Binyang2014 Binyang2014 merged commit 4bbe16b into main Sep 5, 2025
19 of 29 checks passed
@Binyang2014 Binyang2014 deleted the binyli/lock branch September 5, 2025 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Hang in the logging submodule when providing env var

2 participants