1

I have a batch script that calls cleartool to execute the lsactivity command after being triggered by a checkin operation. Results from the call are written to an output file. The line in my batch is:

cleartool lsactivity -long "%ACTIVITY%">streaminfo_%timestamp%.txt

where %timestamp% is a variable that contains the date and time, making each call unique.

98% of the time I have no problems. The remaining 2%, however, is when cleartool crashes leaving a locked 0KB file that causes the CMD script to hang until closed using Sysinternals Process Explorer.

After browsing through the OS (Win 2003 Server) system event viewer, I found this message that corresponds to the timestamp given to the blocked file, and is classified as Information and not Error:

Application popup: Microsoft Visual C++ Runtime Library : Runtime Error!

Program C:\Program Files\Rational\ClearCase\bin\cleartool.exe

This application has requested the Runtime to terminate it in an unusual way.

Has anybody else encountered this issue before or have any suggestions to solve or as to why it happens?

This thread on an IBM forum is about the same issue, but it has not been answered.

Any feedback would be much appreciated.

Thank you!

Andrew
  • 293
  • 6
  • 14
  • Your cc projects aren't linked to Clearcquest, are they? (as in http://www-01.ibm.com/support/docview.wss?uid=swg21321509) – VonC Feb 27 '13 at 11:32
  • @VonC Yes, it is linked to ClearQuest. The problem in the link is not the same as what I am experiencing, but I'll take a look. – Andrew Feb 27 '13 at 11:34
  • Are you using the CC version same as server? Are you able to recreate the error running directly from command line? Is Jenkins running as a service? If so, is it running as admin with access to CC? – Eldad Assis Feb 27 '13 at 12:06
  • @EldadAK The CC versions are all compatible, yes. I have not managed to recreate the error directly from command line, no, even though I tried. I do not have Jenkins installed, no. – Andrew Feb 27 '13 at 13:16

1 Answers1

0

Pending a definitive answer for the root cause of the cleartool crash (like this cc-cq link), I would set a Windows job which would:

  • monitor for any 0kb file in the directory used by your trigger script to write its files
  • kill the trigger process and relaunch it.
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Would this be possible with dynamic variables? The trigger creates directories and files based on the environment variables being set during execution of the trigger such as `%ACTIVITY%` and `%CLEARCASE_PN%`. Even if I was able to monitor with a Windows job, how would I re-launch the trigger again and ensure that the same variables are passed? – Andrew Feb 27 '13 at 13:19
  • @Andrew you would need to write down the parameter for each trigger instance (and delete that parameter file after the successful completion of the `cleartool` command). If that parameter file remains, it means `cleartool` has failed, and the job can read said file in order to launch again the same script with the same parameters. – VonC Feb 27 '13 at 14:16