Uploading software to the Software Library is very slow
search cancel

Uploading software to the Software Library is very slow

book

Article ID: 281897

calendar_today

Updated On:

Products

Client Management Suite IT Management Suite

Issue/Introduction

You are trying to upload a new software package to your Software Library:

  1. In the Console, go to Manage>Software
  2. Click on the "Add Software" button (in yellow below on the right panel) and choose "Import Package", then you will see the following:



  3. Then click on the "Add file" button (highlighted in orange above). A Windows "File Explorer" box will pop up for you to browse to the location of the software executable and click "Next". The upload will then start.
  4. At this point, you may see that the upload takes a very long time. Also, you may see a dialog box that pops up that reads:

    An error has occurred during upload of files to server. Check server logs for details.

  5. You may also see the following error message in the SMP logs:

    WebApi Controller failure.

The process cannot access the file '\\[Notification Server Name]\d$\AltirisSoftwareLibrary\########-9e89-4527-####-########b3e6\[Executable File Name].EXE' because it is being used by another process.
   [System.IO.IOException @ mscorlib]
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at Altiris.SoftwareManagement.WebApi.Controllers.PackageFileUpload.<Upload>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Altiris.SoftwareManagement.WebApi.Controllers.PackageController.<UploadFile>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()

Exception logged from: 
   at Altiris.SoftwareManagement.WebApi.ApiControllerExceptionHandlerAttribute.OnException(System.Web.Http.Filters.HttpActionExecutedContext)
   at System.Web.Http.Filters.ExceptionFilterAttribute.OnExceptionAsync(System.Web.Http.Filters.HttpActionExecutedContext, System.Threading.CancellationToken)
   at System.Web.Http.Filters.ExceptionFilterAttribute+<ExecuteExceptionFilterAsyncCore>d__3.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start<TStateMachine>(TStateMachine&)
   at System.Web.Http.Filters.ExceptionFilterAttribute.ExecuteExceptionFilterAsyncCore(System.Web.Http.Filters.HttpActionExecutedContext, System.Threading.CancellationToken)
   at System.Web.Http.Filters.ExceptionFilterAttribute.System.Web.Http.Filters.IExceptionFilter.ExecuteExceptionFilterAsync(System.Web.Http.Filters.HttpActionExecutedContext, System.Threading.CancellationToken)
   at System.Web.Http.Controllers.ExceptionFilterResult+<ExecuteAsync>d__6.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder<TResult>.Start<TStateMachine>(TStateMachine&)
   at System.Web.Http.Controllers.ExceptionFilterResult.ExecuteAsync(System.Threading.CancellationToken)
   at System.Web.Http.ApiController.ExecuteAsync(System.Web.Http.Controllers.HttpControllerContext, System.Threading.CancellationToken)
   at System.Web.Http.Dispatcher.HttpControllerDispatcher+<SendAsync>d__15.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder<TResult>.Start<TStateMachine>(TStateMachine&)
   at System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync(System.Net.Http.HttpRequestMessage, System.Threading.CancellationToken)
   at System.Net.Http.HttpMessageInvoker.SendAsync(System.Net.Http.HttpRequestMessage, System.Threading.CancellationToken)
   at System.Web.Http.Dispatcher.HttpRoutingDispatcher.SendAsync(System.Net.Http.HttpRequestMessage, System.Threading.CancellationToken)
   at System.Net.Http.DelegatingHandler.SendAsync(System.Net.Http.HttpRequestMessage, System.Threading.CancellationToken)
   at Altiris.SoftwareManagement.WebApi.ApiControllerAntiForgeryHandler.SendAsync(System.Net.Http.HttpRequestMessage, System.Threading.CancellationToken)
   at System.Net.Http.DelegatingHandler.SendAsync(System.Net.Http.HttpRequestMessage, System.Threading.CancellationToken)
   at System.Web.Http.HttpServer+<SendAsync>d__24.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder<TResult>.Start<TStateMachine>(TStateMachine&)
   at System.Web.Http.HttpServer.SendAsync(System.Net.Http.HttpRequestMessage, System.Threading.CancellationToken)
   at System.Net.Http.HttpMessageInvoker.SendAsync(System.Net.Http.HttpRequestMessage, System.Threading.CancellationToken)
   at System.Web.Http.WebHost.HttpControllerHandler+<ProcessRequestAsyncCore>d__12.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start<TStateMachine>(TStateMachine&)
   at System.Web.Http.WebHost.HttpControllerHandler.ProcessRequestAsyncCore(System.Web.HttpContextBase)
   at System.Web.TaskAsyncHelper.BeginTask(System.Func<System.Threading.Tasks.Task>, AsyncCallback, Object)
   at System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(System.Web.HttpApplication+IExecutionStep)
   at System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication+IExecutionStep, Boolean&)
   at System.Web.HttpApplication+PipelineStepManager.ResumeSteps(Exception)
   at System.Web.HttpApplication.BeginProcessRequestNotification(System.Web.HttpContext, AsyncCallback)
   at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest, System.Web.HttpContext)
   at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32)
   at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)

User [Username], Auth [User Name], AppDomain [/LM/W3SVC/1/ROOT/Altiris/SoftwareManagement/Api-13-133501611288771983]

HTTP [POST]: http://localhost/altiris/softwaremanagement/api/packages/########-9e89-4527-####-########b3e6/files
 ip: [::1]; languages: [en-US]; content-length: [1049162];
 timings: [[R] 00:00:00.0781510(W: 00:00:00)];
 response: [200 OK]; x-smp-nsversion: [8.6.4286.0];

-----------------------------------------------------------------------------------------------------
Date: 1/19/2024 12:10:57 PM, Tick Count: 219649531 (2.13:00:49.5310000), Host Name: [Notification Server Name], Size: 7.09 KB
Process: w3wp (27772), Thread ID: 398, Module: Altiris.SoftwareManagement.WebApi.dll
Priority: 1, Source: Altiris.SoftwareManagement.WebApi.ApiControllerExceptionHandlerAttribute.OnException

Environment

ITMS 8.x

Cause

In the error message above, we see "The process cannot access the file ... because it is being used by another process." This type of message is usually an indication that there is another application adding a hold to the file that is being uploaded.

In this particular case, the CrowdStrike software was interfering into a regular FileClose() operation.

 

Resolution

The following steps are provided as a guidance on how to narrow down what application could be the one blocking the file during the upload process:

  1. Launch Procmon on the Notification Server.

  2. Make sure events capturing is ON before you start uploading (search icon is not crossed out) as seen here:

          
  3. From a command prompt (as Administrator) run the following command format:

    Copy [location on HDD]\[Executable File Name.EXE  \\[Notification Server Name]\[[Drive Letter]$\[Software Library directory name]

    In this example, let's say that the Software Library is located on D: drive, that we are uploading a file called "filename.exe", and that the Software directory is called "SoftwareLibrary". The command would read:

    Copy D:\filename.exe //D$/SoftwareLibrary.

  4. As you see from the following image, the CrowdStrike software interferes into a regular FileClose() operation.

         

In this particular case, after uninstalling Crowdstrike, you should run the same test as above. The file will upload significantly faster.

To avoid interference with Altiris processes, Broadcom recommends creating exclusion rules for any software (not just Crowdstrike) that would scan the following directories:

  1. [Installation Drive]:\program files\Altiris\   
    --(In this example D:)
  2. C:\ProgramData\Symantec
  3. \\[Notification Server Name\[share drive letter@\[Software Library Name]   
    --(In this example  [Notification Server Name]d$\SoftwareLibrary)
  4. [Software Library HDD Letter]:\[Software Library Name]   
    --(In this example, D:\Software Library)