Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

XCOPY error 4 when checking out from File System Repository #150

drdt ·
I have a configuration which does the following:
- fetch source files from a Perforce repository
- fetch binaries produced by a different build process from a network drive
- perform operations on those files to generate new binaries
- publish the new binaries

The second step is set up using a File System repository defined as follows:
Repository type File system
Description ------
Source directory ${var["mirrorsite"]}\${var["mirrorname"]}\Current
Destination directory .\mirror
Extra Unix copy options ------
Revision log base build version ------
Quiet period 0
Login mapping ------

About a third of the time, the checkout from this repository fails with the following in the build log:
2006-12-26 13:42:32,597 [Thread-4526] WARN - Unknown error.
2006-12-26 13:42:32,597 [Thread-4526] WARN - Unable to create directory - D:\build\install\checkouts\mirror
2006-12-26 13:42:38,585 [Thread-4523] ERROR - ERROR: Failed to run command: Executing 'xcopy' with arguments:
'/Y' '/K' '/R' '/D' '/E' '/Q' '\re-archive\mirrors\r10\Current' 'D:\build\install\checkouts\mirror'

The ' characters around the executable and arguments are
not part of the command.
, returned code: 4

According to documentation, error code 4 from xcopy means:
'Initialization error occurred. There is not enough memory or disk space, or you entered an invalid drive name or invalid syntax on the command line.'
My syntax is correct, I have plenty of disk space on drive D, and the system has 4gb of memory. If I kick the same build off again, more than likely it succeeds. I run two of these automatically every night (in different child configurations), and almost every night one or the other fails in this fashion and has to be run manually in the morning.

Can you tell me what might be going wrong? Am I misconfiguring something? Or, is there an issue with File System repositories?
  • replies 7
  • views 7053
  • stars 0
robinshen ADMIN ·
Is it possible that the directory "D:\build\install\checkouts\mirror" (or its parent directory) is touching by other processes while xcopy starts to copy stuffs? Can you make a test to see if xcopy succeeds all the time by just leaving one configuration running at night?

Regards.
Robin
drdt ·
It isn't being touched by any processes not controlled by quickbuild. However, the step before my fetch is to delete the contents of D:\build\install\checkouts\mirror... perhaps the delete is not finishing?

The processes which may or may not fail are not running concurrently; each completes before the other starts.
robinshen ADMIN ·
It is quite strange. I would suggest below approaches to isolate problems:
1. Only leave one configuration running at night to see if xcopy succeeds all the time. This is to make sure that the process is not affected by multiple configurations. (Although they are not set to run concurrently).
2. Disable the deletion step temporarily to see if xcopy succeeds all the time.

Also can you backup your configuration to XML file (there is an option removing the password when do the backup) and send it my way (robin@pmease.com)? All your data will be kept secretly strictly and will only be used for diagnostics purpose.

Thanks.
Robin
drdt ·
I have modified my configuration so that three distinct fetches (one to .\mirror, one to .\build, and one to .) were happening in serial rather than parallel, and the problem has not recurred. Apparently there is a boundary issue between File System repositories.
robinshen ADMIN ·
I've made some tests by running several xcopy at the same time directly from windows command line, and found that if the destination directory is overlaped (in your case, "D:\build\install\checkouts" overlapes "D:\build\install\checkouts\mirror" and "D:\build\install\checkouts\build"), some xcopy is very likely to fail with the same error code. So I draw conclusion that it is a windows limitation.

For QuickBuild parallel composition step, its purpose is to run multiple steps in the same time, but the user should be very careful that what the step does should not affect each other if they are running at the same time.

In this case, apparently parallel composition for all of these steps is not appropriate. However you can arrange them copy files to "D:\build\install\checkouts" first, and then simultaneously copy files to "D:\build\install\checkouts\mirror" and "D:\build\install\checkouts\build".

Regards.
Robin
drdt ·
Or, I can fetch the files in ../checkouts to a third subdirectory.

Thanks!
robinshen ADMIN ·
That's absolutely right!

Thanks.
Robin