Skip to content

Add logging to track down why Calamari hangs when running clean packages - #2156

Open
LukeButters wants to merge 2 commits into
mainfrom
luke/verbose-logging-for-clean-packages
Open

LukeButters wants to merge 2 commits into
mainfrom
luke/verbose-logging-for-clean-packages

Conversation

@LukeButters

@LukeButters LukeButters commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Add logging to find out why Calamari hangs:

                    |       Running: Clean packages
....
11:36:42   Verbose  |         TempDirectory: C:\Windows\SystemTemp\
11:36:42   Verbose  |         HostProcess: Calamari (16972) << Hangs here! WHY?
                    |       
                    |     Running: 9405229FR20230525.CH-SECLIN-_LILLE_.H1SEC59471

Fixes: LEV-1887
Fixes: LEV-829

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Two unresolved diagnostic logging issues remain in SystemSemaphoreManager.cs.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds verbose diagnostics to investigate Calamari hangs during package cleanup.

Changes:

  • Logs package-retention progress.
  • Logs semaphore access-control operations.
  • Logs script-isolation lock creation inputs.
File summaries
File Summary Review notes
source/Calamari/Deployment/PackageRetention/Model/PackageJournal.cs Adds retention progress logging.
source/Calamari.Common/Features/Processes/Semaphores/SystemSemaphoreManager.cs Adds semaphore ACL diagnostics. Two nit findings: prevent success logging after ACL failure (3 votes), and align the logged semaphore name with the actual object (1 vote).
source/Calamari.Common/Features/Processes/ScriptIsolation/LockOptionsResolver.cs Logs lock creation inputs.
Review details

Suppressed comments (1)

source/Calamari.Common/Features/Processes/Semaphores/SystemSemaphoreManager.cs:114

  • The added message identifies the semaphore as Global\\{name}, but AcquireSemaphore constructs it with the unqualified name before passing globalName here. This makes the new diagnostic refer to a different Windows namespace than the object being configured; either log the actual object name or change the construction consistently with the intended scope.
            log.Verbose($"Setting full control for all users on semaphore '{name}'");
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

log.Verbose($"Failed to set access controls on semaphore '{name}': {e.PrettyPrint()}");
}

log.Verbose($"Set full control for all users on semaphore '{name}'");
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.

3 participants