Re-running a build

HI All,

I have a TeamCity 4 running in MACOSX 10.5 machine. My CVS is perforce. I configured continous Integration and everything was running fine for a few days. For the last 3-4 days i am noticing a wierd problem. Whenever a build is triggered, either manually or through changes in the CVS, the status bar shows results from previous run and contionues from there.

Say, if i have 10 tests run the first time, during the next run the status starts with tests run as 10 and continues from there and total number of test run is shown as 20 instead of the actual 10. Once the build is complete i no longer find it in the history(even if i include cancelled builds). If I start build again status starts from 20 rather than 0.

I also see a warning message saying that the build is outdated.

Has anyone seen this error before or am i doing something wrong?

Thanks,
Saravanaprakash

8 comments
Comment actions Permalink

Hi Saravanaprakash,

  I suppose you have a non-finished build in TeamCity, which periodically runs another bunch of tests.

  The question is what kind of build runner do you use? Did you try to stop that obsolete build? What kind of checkout mode do you use?


Kind regards,
KIR

0
Comment actions Permalink

HI Kirill,

It is true about the unfinished build. The build machine was accidentally powered off once. When I started teamcity again, I saw this problem. But I am not able to get rid of the unfinished build. When I tried to stop through UI I got a "cannot stop" message.
I tried restarting teamcity agent/server, again I face the same problem. I even tried creating a new build configuration, even there i see the same problem.

Checkout mode: Automatically on Server
Build Runner:ANT

Thanks,
Saravanaprakash

0
Comment actions Permalink

Hello,

  Could you try taking a thread dump for the build? There is a corresponding link on the build page.
  This may clarify what's going on with the build.

  Regards,
  KIR

0
Comment actions Permalink

Hi Kirill,

Process ID (PID): 37773

Process command line

/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java -Dmasterconfig=/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/inputs/configs/acceptance.base.env.test.xml -Djava.library.path=/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/built/client/lib -Djava.io.tmpdir=/tmp -Didea.build.server.build.id=4 -Dteamcity.buildType.id=bt2 -Didea.build.agent.port=9090 -Dagent.classpath=/Users/ucfacs/Downloads/TeamCity/buildAgent/lib/xstream-1.2.1.jar:/Users/ucfacs/Downloads/TeamCity/buildAgent/lib/xmlrpc-2.0.1.jar:/Users/ucfacs/Downloads/TeamCity/buildAgent/lib/commons-codec-1.3.jar:/Users/ucfacs/Downloads/TeamCity/buildAgent/plugins/coveragePlugin/lib/coverageAgentRuntime.jar:/Users/ucfacs/Downloads/TeamCity/buildAgent/lib/xpp3_min-1.1.3.4.M.jar:/Users/ucfacs/Downloads/TeamCity/buildAgent/plugins/coveragePlugin/lib/emma.jar:/Users/ucfacs/Downloads/TeamCity/buildAgent/plugins/testNGPlugin/lib/testNGAntExtension.jar:/Users/ucfacs/Downloads/TeamCity/buildAgent/plugins/antPlugin/lib/buildServerAntServerLogging.jar:/Users/ucfacs/Downloads/TeamCity/buildAgent/lib/server-logging.jar:/Users/ucfacs/Downloads/TeamCity/buildAgent/lib/common-api.jar -Dteamcity.build.checkoutDir=/Users/ucfacs/UCFMacCI -Dteamcity.build.workingDir=/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test -Dagent.work.dir=/Users/ucfacs/Downloads/TeamCity/buildAgent/work -Dant.task.extensions=jetbrains.buildServer.agent.ant.CompilerAntExtension,jetbrains.buildServer.agent.ant.EchoAntExtension,jetbrains.buildServer.agent.ant.JUnitFirstTestsToRunExtension,jetbrains.buildServer.coverage.AntCoverageAdapter,jetbrains.buildServer.testng.TestNGTaskExtension,jetbrains.buildServer.testng.TestNGFirstTestsToRunExtension, -Dagent.name=Default agent -Dagent.home.dir=/Users/ucfacs/Downloads/TeamCity/buildAgent -Dagent.flow=1233332658710914000 -classpath /Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/inputs/configs:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/inputs/data:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/build/ucf-client-tests.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/build/ucf-server-tests.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/built/client/lib/ucf-client-api.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/built/client/lib/ucf-client-impl.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/built/client/lib/ucf-ca-office-auto.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/built/client/lib/jacob.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/built/server/ucf/WEB-INF/lib/ucf-server-api.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/built/server/ucf/WEB-INF/lib/ucf-server-impl.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/built/server/ucf/WEB-INF/lib/xml-ca.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/built/server/ucf/WEB-INF/lib/ucf-installer.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Built/lib/j2ee.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Built/lib/mac_utilities.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Built/lib/MacOSXForker.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Built/lib/log4j.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/built/client/checksum:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/dfc/All-MB.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/dfc/activation.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/dfc/aspectjrt.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/dfc/certjFIPS.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/dfc/configservice-api.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/dfc/configservice-impl.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/dfc/dms-client-api.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/dfc/jaxb-api.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/dfc/jaxb-impl.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/dfc/jsafeFIPS.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/dfc/jsr173_api.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/dfc/log4j.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/dfc/xtrim-api.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/dfc/xtrim-server.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Built/lib/dfc.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/test/Tidy.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/test/cglib-nodep-2.1_3.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/test/commons-cli-1.0.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/test/commons-codec-1.3.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/test/commons-logging-api.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/test/easymock.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/test/easymockclassextension.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/test/httpunit.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/test/js.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/test/junit-4.4.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/test/junit.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/test/nekohtml.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/test/org.mortbay.jetty.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/test/qa-tools.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/test/qa-utils.jar:/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/libs/test/xercesImpl.jar:/Users/ucfacs/Downloads/TeamCity/buildAgent/lib/runtime-util.jar:/Users/ucfacs/Downloads/TeamCity/buildAgent/plugins/antPlugin/lib/buildServerAntRuntime.jar:/Users/ucfacs/Library/apache-ant-1.7.0/lib/ant-launcher.jar:/Users/ucfacs/Library/apache-ant-1.7.0/lib/ant.jar:/Users/ucfacs/Library/apache-ant-1.7.0/lib/ant-junit.jar org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner com.documentum.qa.tools.testdriver.TDfTestSuite filtertrace=true haltOnError=false haltOnFailure=false formatter=org.apache.tools.ant.taskdefs.optional.junit.SummaryJUnitResultFormatter showoutput=false outputtoformatters=true logtestlistenerevents=true formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter,/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/outputs.txt formatter=jetbrains.buildServer.agent.ant.AgentJUnitFormatter formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/outputs.xml crashfile=/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/junitvmwatcher1514178111.properties propsfile=/Users/ucfacs/UCFMacCI/Platform/DistributedContent/UCF/Main/Projects/Test/junit456108618.properties

Error output:Attaching to process ID 37773, please wait...
attach: task_for_pid(37773) failed (5)
Error attaching to process: Error attaching to process, or no such process




THis is what I see on the thread dump.

Thanks,
Saravanaprakash

0
Comment actions Permalink

Hello,

  Could you please attach (or send directly via e-mail to kir # jetbrains.com) archives with logs from buildAgent/log directory and TeamCity/log directory.
  Thanks!

   KIR

0
Comment actions Permalink


Hi Kirill,
I am attaching the teamcity and buildagent logs. The logs may contain a few exceptions with fileNotfound for CPDresults.zip, TestResults.zip etc(I use these as artifacts to display test results) You can safely ignore any corresponding failures.
Please let me know if you need any other info.
Thanks,
Saravanaprakash





Attachment(s):
logs.zip
0
Comment actions Permalink

Hello Saravanaprakash,

   As I can see from the logs, you got database data corrupted (I suppose because of the reboot problem).
  I would suggest to perform full cleanup (build settings will remain, but build history and users will disappear):

   1. Shutdown TeamCity
   2. Remove directory <TC_DATA_DIR>/system
   3. Start TeamCity again.
  
  And please, use Mysql DB for production to ensure better data integrity.

  Hope this helps,
  KIR

0
Comment actions Permalink

Hi Kirill,

Thanks for your suggestions. It did solve the problem and my teamcity is working fine now.

Thanks,
Saravanaprakash

0

Please sign in to leave a comment.