WinCC 6.2 SP3 CCHierarchySrv Process Hang: Diagnosis and Fix

David Krause12 min read
HMI / SCADASiemensTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Problem Description

On WinCC V6.2 SP3 stations, the HMI/SCADA Runtime can shut down unexpectedly. When the operator (or technician) attempts to deactivate Runtime from the WinCC Explorer, the supporting process WinCC.CCHierarchySrv.1 enters a non-responsive state. The Windows shutdown tracker raises a 2-minute "Application not responding" warning, and only a forced termination of the process returns control to the operator. The Runtime can then be restarted, but the failure repeats after a variable interval (typically minutes to hours).

This symptom set is a regression introduced when migrating from WinCC V6.2 SP2 to V6.2 SP3 on Windows XP SP3. Sites that ran the same project under SP2 on the same hardware and OS image report no failures. The fault therefore originates in the SP3 update of the WinCC COM/DCOM layer rather than in the user project itself.

Field note: The phrase "Runtime window closes" is used loosely in operator reports. The full sequence is normally: (1) Runtime deactivation is requested, (2) CCHierarchySrv.1 fails to release its COM references, (3) the WinCC Explorer status pane shows "Deactivating Runtime..." indefinitely, (4) the OS prompts the user to terminate the process, and (5) the WinCC Runtime window disappears with the kernel tearing down the child processes.

Environment and Affected Versions

The fault is observed under the following configuration matrix. Values not confirmed by the source are marked as "case to evaluate".

Component Confirmed value Case to evaluate
WinCC version V6.2 SP3 Earlier SPs, hotfix roll-ups
OS Windows XP SP3 Windows Server 2003 SP2 single-station
Project type Single-user / multi-user (client) Redundancy server pairs
Project source Upgraded from V6.2 SP2, possibly from V4/V6.0 via Project Migrator Native V6.2 SP3 build
Deactivation path WinCC Explorer "Deactivate Runtime" button Runtime internal deactivation (recommended workaround)

For projects originally authored under older WinCC releases, the Project Migrator path described in the Siemens migration documentation is a relevant diagnostic step. See the official PDF Migration of WinCC Projects from V4 to V6.2 SP3 for the upgrade flow and the location of the diagnostic file written by the migrator.

WinCC.CCHierarchySrv.1 Architecture Overview

WinCC Runtime is built as a set of cooperating COM/DCOM processes. WinCC.CCHierarchySrv.1 is the central component that owns the in-memory hierarchy of all WinCC objects: tag connections, alarm classes, archive configurations, picture tree, user archive structure, and the S7/MPI/TCP driver bindings. Other WinCC Runtime processes (Graphics Runtime, Alarm Logging, Tag Logging, User Archive, Report Designer) register their COM objects against the hierarchy server. When the hierarchy server cannot shut down cleanly, the dependent processes are also torn down by the OS, which is why the Runtime window disappears.

WinCC Explorer CCHierarchySrv.1 Graphics Runtime Alarm / Tag Logging S7 / TCP / OPC Channel deactivate release COM release COM

The component is registered as a Windows service. Its identity, launch permissions, and access permissions are stored in the registry and in the COM+ catalog. SP3 added stricter validation of these permissions and of the caller's authentication level, which is the proximate cause of the hang.

Root Cause Analysis

The hang is caused by a permission or authentication mismatch during COM object teardown. The SP3 installer refreshes the COM+ application registration for the WinCC components. When the WinCC Explorer issues the Deactivate Runtime command, the Explorer process and the CCHierarchySrv.1 process exchange a sequence of COM calls protected by Windows authentication. If the authentication level, identity, or launch/access ACL of either side was not refreshed to match the SP3 catalog, the call blocks on a security negotiation. Because the Explorer is waiting for the deactivation to complete, and the server is waiting for permission to release, the process appears frozen for the duration of the OS-defined timeout (default 120 s on Windows XP/Server 2003).

Common contributing factors confirmed by Siemens support patterns for WinCC 6.2 SP3:

  1. Service account password rotation. The WinCC services were originally installed under a domain or local user whose password was subsequently changed. The COM+ catalog still holds the old password.
  2. DCOM hardening applied by Windows XP SP3. The default DCOM authentication and encryption levels are stricter in XP SP3. The legacy WinCC components expect the pre-SP3 levels.
  3. Local security policy / UAC-equivalent restrictions. Group Policy that restricts "Log on as service" or "Log on as batch job" prevents the COM+ identity from starting.
  4. Antivirus / EDR file-locking on the project directory. Real-time scan holds an open handle on a project file; CCHierarchySrv.1 cannot flush and blocks on the file close.
  5. Corrupt or partial migration of the project tree. The Project Migrator diagnostic file lists the components it could not translate. A partial hierarchy causes the server to enter a recovery loop on shutdown.
  6. Operator discipline: deactivation requested from the WinCC Explorer rather than from within the running Runtime, which is the path the SP3 service expects.

Pre-Diagnostic Data Collection

Collect the following artefacts before changing configuration. This protects the option of opening a Siemens support ticket with full evidence.

Artefact Location Purpose
Windows Application event log eventvwr.msc → Application COM+ runtime errors, DCOM authentication failures
Windows System event log eventvwr.msc → System Service Control Manager errors for WinCC services
WinCC diagnostic file <Project>\<Computer>\<Computer>.log under the project root Runtime start/stop sequence, hierarchy server events
Project Migrator diagnostic file Output path defined in migrator; typically <Project>\MigratorDiag.log Lists components the migrator could not translate from V4/V6.0/V6.2 SP2
Process dump procdump -ma WinCC.CCHierarchySrv.1.exe CCHierarchy.dmp (Sysinternals) at the moment of the hang Stack trace of the blocked thread
DCOM config snapshot dcomcnfg → Component Services → Computers → My Computer → DCOM Config → WinCC.CCHierarchySrv.1 → Properties Identity, Security, Endpoints tabs
Service account snapshot services.msc → WinCC services → Log On tab Confirms the identity under which the service is registered
Project file ACL icacls "C:\WinCC\Projects\<Project>" /T > acl.txt Confirms the service account has full control

Resolution Procedure

Apply the steps in the listed order. Each step ends with a verification check; do not advance until the check passes.

Step 1 — Confirm a Clean Service Account

  1. Open services.msc and list every service whose name starts with WinCC or CC.
  2. For each entry, record the Log On As account. The account must be a known local or domain user with a non-expired password.
  3. If any account is LocalSystem and the project lives on a network share, change it to a domain user with Log on as service and Log on as batch job rights.
  4. Re-enter the password in the service properties even if it is unchanged, to refresh the LSA secret.
Field note: Rotating the password on the service account after the WinCC install, without updating the COM+ catalog, is the most common root cause. Always update the password in both the service and the COM+ application.

Step 2 — Re-align the COM+ Identity

  1. Open dcomcnfg → Component Services → Computers → My Computer → DCOM Config.
  2. Right-click WinCC.CCHierarchySrv.1 → Properties.
  3. On the Identity tab, select This user and enter the same user/password used in Step 1.
  4. On the Security tab, set Launch and Activation Permissions to Customize and grant the WinCC operator group both Local Launch, Remote Launch, Local Activation, and Remote Activation.
  5. Set Access Permissions to Customize and grant the same group Local and Remote Access.
  6. On the Endpoints tab, leave the default static endpoints; do not select Use any available port on a firewalled system.

Repeat the same identity/security configuration for every WinCC DCOM application, in particular:

  • WinCC.Picture
  • WinCC.AlarmLogging
  • WinCC.TagLogging
  • WinCC.UserArchive
  • WinCC.Connectivity (if used)

Step 3 — Restore the DCOM Authentication Level for the WinCC Components

  1. Still in dcomcnfg for WinCC.CCHierarchySrv.1, open the General tab.
  2. Note the AppID. It is a GUID of the form {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}.
  3. Close dcomcnfg.
  4. Open regedit and navigate to HKEY_CLASSES_ROOT\AppID\<AppID>.
  5. Create or modify the value AuthenticationLevel as DWORD = 0x00000002 (Connect) if it is not present, and confirm AccessPermission and LaunchPermission have non-null security descriptors.
Warning: Editing the registry affects all DCOM applications. Back up the AppID key with reg export before any change.

Step 4 — Verify and Re-apply Project File Permissions

  1. Open a command prompt as Administrator.
  2. Run icacls "C:\Siemens\WinCC\Projects\<ProjectName>" /T /C /Q > before.txt to capture the current ACL.
  3. Run the WinCC project editor's Project → Properties → Computer → Permissions dialog and re-grant the operator and service accounts. This rewrites the ACLs in the canonical form expected by the SP3 server.
  4. Re-run the icacls command to a new file and diff against the original.

Step 5 — Exclude the Project Path from Real-Time Antivirus

  1. Identify the antivirus or EDR product in use.
  2. Add the following paths to the real-time scan exclusion list, including the executable image files:
C:\Siemens\WinCC\bin\*.exe
C:\Siemens\WinCC\Projects\<ProjectName>\**\*
C:\Siemens\Automation\**\*.mdf
C:\Siemens\Automation\**\*.ldf
  1. Repeat the Runtime deactivation cycle five times to confirm the hang is no longer triggered by an AV lock.

Step 6 — Re-Register the Project Migrator Output (Projects Originating in V4 / V6.0 / SP2)

  1. Open the Project Migrator diagnostic file. For V4 → V6.2 SP3 the layout is described in the Siemens document Migration of WinCC Projects from V4 to V6.2 SP3.
  2. For every component listed as error or warning, open the affected object in the WinCC Explorer of the V6.2 SP3 project, re-save it, and let the hierarchy server re-cache it.
  3. Repeat the runtime cycle to confirm the CCHierarchySrv.1 process stops cleanly.

Step 7 — Use the Runtime Internal Deactivation Path

The WinCC SP3 service expects the deactivation request to originate from the running Runtime. The Explorer button is a convenience wrapper that, on some installations, does not propagate the correct COM apartment context.

  1. On a running Runtime, open the standard System picture (or the configured exit button).
  2. Trigger the configured exit function. The Runtime shuts down internally; CCHierarchySrv.1 is asked to release its COM objects in the correct order.
  3. Confirm the Runtime window closes within 10 seconds and the WinCC Explorer reports Runtime deactivated.

Step 8 — Process Priority and Memory Tuning

Setting Recommended Notes
WinCC.CCHierarchySrv.1 priority class Above Normal / High Set via SetPriority in the service properties, or with Sysinternals Process Explorer for testing
Working set minimum/maximum Min 256 MB / Max 1024 MB Set on the Recovery tab of the service or with Set-ProcessWorkingSet in PowerShell
Windows paging file 1.5 × installed RAM, fixed size XP SP3 default is system-managed; switch to fixed for the duration of the fault
Desktop Heap Default on XP, do not modify unless event log shows desktop heap exhausted Registry: HKLM\System\CurrentControlSet\Control\Session Manager\SubSystems\Windows SharedSection

Verification Procedure

After applying the resolution steps, execute the following verification matrix. The system is considered healthy only when every row passes.

# Test Pass criterion How to capture
1 Start Runtime from Explorer Runtime window opens within 30 s, no error in <Computer>.log WinCC Explorer → Activate
2 Deactivate Runtime from Runtime Window closes within 10 s, no DCOM warning System picture → Exit
3 Deactivate Runtime from Explorer No process hang within 2 min WinCC Explorer → Deactivate
4 Restart Runtime 5 times in 30 min All 5 cycles complete without intervention Manual or scheduled task
5 Force a service-account password rotation and re-test steps 1–4 All 5 cycles still pass Active Directory → Reset Password; re-enter in service and COM+
6 Review Application event log for COM+ error events Zero new events with Source = DCOM or COM+ in the 30 min window eventvwr.msc → filter by Source
7 Generate a process dump of CCHierarchySrv.1 after step 3 No blocked threads in ntdll!ZwWaitForSingleObject on a COM security call WinDbg !locks and kb on each thread

Escalation Path and Siemens Support

If the verification matrix still fails after applying all eight resolution steps, raise a Siemens support request. Provide the artefacts collected in the Pre-Diagnostic Data Collection section and quote:

  • WinCC build string (Help → About → Installed Software → SIMATIC WinCC → Version)
  • Service Pack level of Windows (e.g. Windows XP SP3, build 2600.x)
  • Project origin (native, migrated from V4, V6.0, V6.2 SP2)
  • The full Project Migrator diagnostic file if a migration was performed

Open the request via the Siemens Industry Online Support portal: https://support.industry.siemens.com. Cross-reference the WinCC V6.2 SP3 readme and the SP3 hotfix index from the same portal. The V4 → V6.2 SP3 migration PDF is also reachable from the portal at 44029132_wincc_upgrade_v4-v6.2_V2_3_en.pdf.

Troubleshooting Matrix

Symptom Likely cause First action
CCHierarchySrv.1 hangs for full 2 min on every Explorer deactivation COM+ identity password mismatch Step 1 + Step 2 of the resolution procedure
Hang occurs only when project is opened from a network share LocalSystem identity cannot reach UNC path Switch service and COM+ identity to a domain user
Hang started after a Windows XP SP3 install on a previously working SP2 system DCOM hardening tightened the default authentication level Step 3 of the resolution procedure
Hang coincides with antivirus signature update Real-time scan holding a file handle Step 5 of the resolution procedure
Hang is preceded by Project Migrator warnings in the diagnostic file Partial migration left a corrupt node in the hierarchy Step 6 of the resolution procedure
Hang only on Explorer deactivation, Runtime internal exit works Caller apartment context incompatibility Step 7 of the resolution procedure
CCHierarchySrv.1 uses 100 % CPU before hang Insufficient working set, paging thrash Step 8 of the resolution procedure

What is WinCC.CCHierarchySrv.1 and why does it block the Runtime shutdown?

It is the central COM server that owns the WinCC object hierarchy (tag connections, alarms, archives, picture tree). When the Explorer issues a deactivation, every dependent WinCC process is asked to release its COM references to the hierarchy server. If the security negotiation between the Explorer and the server fails, the release blocks and the Runtime appears frozen.

Why did the same project work on WinCC 6.2 SP2 but fail on SP3?

SP3 refreshes the COM+ catalog for the WinCC applications and tightens DCOM authentication. Sites that ran SP2 against the same OS image did not have the stricter security checks, so a latent account or ACL mismatch that SP3 enforces for the first time will not surface on SP2.

Is the deactivation workflow from the WinCC Explorer unsafe on SP3?

The Explorer button is supported but it has been observed to leave the COM apartment context inconsistent on some installations. The SP3-safe path is to trigger the exit function from the running Runtime, typically via a button in the System picture. Always retest with both paths after any change to the COM+ identity or the service account.

Where is the Project Migrator diagnostic file located?

The path is set in the Project Migrator tool. For a V4 → V6.2 SP3 upgrade, the file format and behaviour are described in the Siemens document Migration of WinCC Projects from V4 to V6.2 SP3. Use it to identify components that did not migrate cleanly and re-save them in the V6.2 SP3 editor.

How do I capture a process dump of the hung WinCC.CCHierarchySrv.1?

Use Sysinternals procdump -ma WinCC.CCHierarchySrv.1.exe CCHierarchy.dmp at the moment the 2-minute warning is shown. Open the dump in WinDbg and run !locks and kb on each thread to confirm whether a thread is blocked on a COM security call. Include the dump in the Siemens support request.

Back to blog