History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-663
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Steve Luo
Reporter: Ronald Brindl
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

junit TEST-*.xml files are locked by QB2 buildagent process

Created: 06/Oct/10 12:33 PM   Updated: 07/Dec/10 04:12 AM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 3.1.11

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. Java Archive File com.pmease.quickbuild.plugin.report.engine_2.1.21.jar (708 kb)

Image Attachments:

1. QB2StackScreenShot.jpg
(152 kb)
Environment:
Quickbuild version: 2.1.48 - Wed Jul 28 11:55:51 CEST 2010
Windows (windows server 2008SP2)


 Description  « Hide
During one step that is present in all our configuration (svn-clean, which deletes non-versioned files from the workspace), we get the following error on windows systems:

04:38:48,086 [clean-svn@lab18:8811] WARN - C:\qb2\workspace\trunk\all\integrationtests\osgi.integrationtest.test\report\TEST-com.dynatrace.diagnostics.integrationtest.memdump.rootPath.MemoryDumpRootPathTest$ComplexGraphRootPathInProcessCollectorTest.xml - The process cannot access the file because it is being used by another process.

svn-clean is a perl script, that triggers a "del" if svn status indicates a non-versioned file.

After adding some diagnostics functionality to this script to find out which process holds the handle to this files, we discovered that it is the QuickBuild Agent process. (to do this, we run sysinternals handle.exe in the case a file cannot be deleted. This shows the handles and the process id which holds the files open)
Since the svn-clean step is right at the beginning of each configuration, I suppose the files must be left open from a previously running configuration.

In many cases we have several builds that fail right behind each other because of this, and each of these builds show the same handle-ids and process ids of the files that are being held open by another process.
It has also been verified, that there are no 2 builds running in parallel on the same workspace, or other custom processes do so.

In our outer-most master step we configured simple logging to record start and stop times of builds. Using this log it could be shown, that the last build that was running without svn-clean problems finished successfully at 2010-10-04 13:27:10, without any problems or exceptions found in the respective logfile. The next build that was running on that same workspace failed in svn-clean at 2010-10-05 00:48:37.
Until 2010-10-06 00:25:06, all builds that ran against this workspace failed in svn-clean.
The next build, starting at 2010-10-06 00:25:08 was running successfully again, without any user interaction or whatsoever (after all, it was in the dead of night).
There are also no log entries that indicate any action regarding the files in question (or anything else).

Without doing further introspection, i would suppose this is a resource leak during junit-report generation.

 All   Comments   Work Log   Change History      Sort Order:
No work has yet been logged on this issue.