Closed Bug 494886 Opened 16 years ago Closed 16 years ago

Build system should have a "clean" phase

Categories

(Tamarin Graveyard :: Build Config, defect, P4)

defect

Tracking

(Not tracked)

VERIFIED FIXED
flash10.1

People

(Reporter: brbaker, Assigned: brbaker)

Details

Attachments

(3 files)

There should be a "clean" phase that cleans up the build directory and prepares the system for the next build. Should make sure that: 1) there are no zombie process still running - avmshell* - ceremote* - emulators? 2) clean up (aka delete) the source directory and the "builds" directory This phase should happen no matter what previous phases state is. Must always run if everything passes or anything fails. This should make sure that we do not see builds fail because a previous build hung and was killed by buildbot but a zombie process still exists and is still holding onto a handle to the source directory causing deletes to fail.
Flags: flashplayer-qrb?
The performance machines already run a sweep of the processes to make sure that there are no zombie processes running: http://hg.mozilla.org/tamarin-redux/file/tip/build/buildbot/slaves/mac-performance/scripts/run-performance-pre.sh
This could be accomplished by adding a "clean" step to the end of each phase (compile, smoke, test). The script would be passed the status of the build and the script would determine whether it should run or not based on the value. If the status is "FAILURE" then run the clean task, otherwise just return. The "compile" and "smoke" phase would pass the actual status of the build (SUCCESS|FAILURE). Since with these phases we do NOT want to run the clean if they have passed because there are downstream phases that require the source tree to be there. Only clean if the build is NOT going to continue to the next phase. The "test" phase would always pass a hard coded status of "FAILURE" to the clean step since this is the end of the line and we want it to run the clean step no matter what the status of the build is.
Status: NEW → ASSIGNED
Flags: flashplayer-qrb? → flashplayer-qrb+
Priority: -- → P4
Target Milestone: --- → flash10.x
Assignee: nobody → brbaker
Flags: flashplayer-triage+
+ look for zombie processes at the start and end of each test script (acceptance, code coverage, selftest, etc) + look for and kill any zombie processes at the end of the "smoke" and "test" phase The only time that we have come across zombie processes is when they shell hangs and buildbot ends up stopping the build step, leaving the shell running. By running the check at the start and end of each test script, we are ensuring that the system is in a known state (no extra shells running). List of processes that should NOT be running are defined by ${proc_name} in the environment.sh script. The mac64 intel and 10.5 build slaves need to override this variable and be a little sneaky about what it sets it to since these slaves actually run on the same machine and without this they see and kill each others processes as it sees them as zombies. Patch tested successfully in the sandbox.
Attachment #380206 - Flags: review?(dschaffe)
Comment on attachment 380206 [details] [diff] [review] Kill zombie processes r+, tested on mac and was able to kill avmshell processes - why is the run-performance-pre.sh removed in the patch?
Attachment #380206 - Flags: review?(dschaffe) → review+
windows/scripts/run-performance-pre.sh was removed because it should not exist here, that is supposed to be in the <platform>-performance/scripts, was checked into this location by mistake.
Pushed 1967:19f6405ad1c8
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Found an issue with running this on windows64, the ps in cygwin does not retrieve the name of the process if it is 64bit, it displays the process as "***uknown***" so this patch does not function properly on win64.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Cygwin on windows 64 is not able to get the process name for 64bit processes. This patch uses plist http://technet.microsoft.com/en-us/sysinternals/bb896682.aspx to get the running processes on win64 to make sure that there are no left over avmshell processes.
Attachment #382112 - Flags: review?(dschaffe)
Attachment #382112 - Flags: review?(dschaffe) → review+
Pushed 1989:f145db8fffca
Status: REOPENED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
changeset: 2135:01f45568295c tag: tip user: Brent Baker <brbaker@adobe.com> date: Wed Jul 15 07:56:38 2009 -0400 Bug #494886: the 'process clean' script was not displaying the zombied process properly on mac 10.4, removed the unsupported -f swtich to the ps call
Attachment #390201 - Flags: review?(dschaffe)
Comment on attachment 390201 [details] [diff] [review] Clean process util added to performance scripts Pushed patch as 2220:33266b3cd59d
Attachment #390201 - Flags: review?(dschaffe)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: