SMP 7.1 SP2 rollups break binary compatibility with Arellia

Background

Local Security Solution uses client tasks to perform management tasks on endpoints. In a hierarchy enabled environment these tasks are replicated to any Notification Servers that manage endpoints running the LSS agent.

For a complete list of LSS client tasks navigate to  Tasks > Jobs and Tasks > Arellia > Client Tasks  in the Arellia Security Manager console.

Security Analysis Solution and Local Security Solution both use client tasks that can be scheduled on the server.

Issue

Symantec Management Platform 7.1 SP2 rollups v2 and v3 introduce multiple binary compatibility breaks in the Altiris.TaskManagement assembly. (No issues exist with Rollup v4)

Break #1.

The first break is due to change of method signature by Symantec in the Task Management assembly.
This causes AccessViolation exceptions to occur on a child NS during replication of Arellia client tasks. When the error occurs a warning message is logged similar to:

Unable to import the specified object during replication (Type: Item,
  Xml: <item guid="{010c1bdb-d16d-4631-8a7f-50e0db6de0c1}" classGuid="{eac7265c-b4da-4aaa-84cc-0ce4390b3209}">
  ... ,
  Exception: Altiris.NS.Exceptions.AeXItemImportException:
  Item Import exception : 010c1bdb-d16d-4631-8a7f-50e0db6de0c1 =   Arellia.SMP.LocalSecurity.ClientTasks.LocalUserRandomPasswordTask(eac7265c-b4da-4aaa-84cc-0ce4390b3209) 
  ---> Altiris.NS.Exceptions.AeXException: An unexpected exception has occured in OnImport callback for Item "Arellia.SMP.LocalSecurity.ClientTasks.LocalUserRandomPasswordTask". 
  ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at System.Collections.Generic.Dictionary`2.ValueCollection.GetEnumerator()
   at Arellia.SMP.TaskManagement.ClientTasks.RemoteExecClientTask.ImportTaskInstanceData(ClientTaskInstanceReplicationDataCollection dataList)
   at Altiris.NS.ItemManagement.Item.Import(XmlNode itemNode)
   --- End of inner exception stack trace ---
   at Altiris.NS.ItemManagement.Item.Import(XmlNode itemNode)
   at Altiris.TaskManagement.VersionItem.Import(XmlNode itemNode)
   at Altiris.TaskManagement.ClientTask.BaseClientTask.Import(XmlNode itemNode)
   at Altiris.NS.ItemManagement.Item.ImportItem(XmlNode itemNode)
   --- End of inner exception stack trace ---
   at Altiris.NS.ItemManagement.Item.ImportItem(XmlNode itemNode)
   at Altiris.NS.ItemManagement.Item.ImportItem(String itemXml)
   at Altiris.NS.Replication.DestinationReplicationImportExportProvider.ImportObject(String type, String encoding)
   at Altiris.NS.Replication.DestinationReplicationImportExportProvider.<>c__DisplayClass6.<ImportObjects>b__0(IDatabaseContext retryCtx)
   at Altiris.Database.DatabaseContext`1.PerformWithDeadlockRetryHelper(Int32 retries, Boolean inTransaction, Getter`1 getContext, Action`1 action, Action`1 retry)
   at Altiris.Database.DatabaseContext`1.PerformWithDeadlockRetry(Int32 retries, Boolean startNewTransaction, IsolationLevel isolationLevel, Boolean independentContext, Action`1 action, Action`1 retry)
   at Altiris.Database.DatabaseContext`1.PerformWithDeadlockRetry(Int32 retries, Boolean startNewTransaction, Action`1 action, Action`1 retry)
   at Altiris.NS.ContextManagement.DatabaseContext.PerformWithDeadlockRetry(Int32 retries, Action`1 action, Action`1 retry)
   at Altiris.NS.Replication.DestinationReplicationImportExportProvider.ImportObjects(ReplicationJob jobItem, String jobId, String operationId, String type, ReplicationManifest manifest, Hashtable indexes)).

This error in the SMP replication provider prevents the Arellia client task from being imported on the child NS, resulting in a failed execution.

Break #2.

The second break is caused by Symantec removing the method DeleteHierarchyReplicatedInstance() from the Task Management assembly.
This has the effect of preventing any scheduled Arellia client tasks from executing correctly.

When the schedule fires the following error will be recorded in the SMP logs:

Unable to begin running an instance of the task {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

( Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
   at Arellia.SMP.TaskManagement.ClientTasks.ClientTaskExecutionInstance.AssignResources(DatabaseContext ctx)
   at Arellia.SMP.TaskManagement.ClientTasks.ClientTaskExecutionInstance.OnCreate(DatabaseContext ctx)
   at Altiris.TaskManagement.Data.TaskExecutionInstance.<OnCreate>b__e(DatabaseContext ctx, Object state)
   at Altiris.TaskManagement.Data.AltirisSqlHelper.RepeatForDeadlocks(Int32 retries, Int32 sleep, Object state, RepeatForDeadlocksDelegate func)
   at Altiris.TaskManagement.ClientTask.Data.ClientTaskExecutionInstance.OnCreate()
   at Altiris.TaskManagement.ClientTask.Data.ClientTaskExecutionInstance.Create()
   at (Object )
   at Arellia.SMP.TaskManagement.ClientTasks.RemoteExecClientTask.CreateTaskInstance(String name, String executedBy, Guid parentTaskInstanceGuid, JobNodeGuid jobNodeGuid, ParameterValueCollection inputParameterValues, IList`1 userRoles)
   at Altiris.TaskManagement.BaseTask.ExecuteTask(TaskVersionGuid taskVersionGuid, String name, String executedBy, Guid parentTaskInstanceGuid, JobNodeGuid jobNodeGuid, ParameterValueCollection inputParameterValues, IList`1 userRoles)
   at Altiris.TaskManagement.UI.TaskSchedule.ExecuteTaskInstance()
   at Altiris.TaskManagement.UI.TaskSchedule.OnSchedule(String identifier) )

The missing method causes the new task instance Create() to fail when a scheduled client task fires.

Resolution

Symantec have released a hotfix that addresses both breaks, targeted at v2 and v3 of the SMP 7.1 SP2 rollup.
Symantec KB article links:

Alternatively you can install Rollup v4.