You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Saladin Sharif <al...@yahoo.com> on 2007/09/26 02:38:22 UTC

Re: ant script just hang when checking out of CVS [Similar problem with cvstagdiff]

--- Robert Clark <ro...@quest.com> wrote:
>
> Setting up SSH so that it does not require a
> password, yet is still 
> secure.

I just found out from my system admin that I cannot
setup private/public key for my machine to connect to
the CVS server, due to internal security policies.

But anyway, it just occured to me and I am wondering
whether the problem that I am having with cvstagdiff
has anything to do with ssh waiting for the password.

After all I am perfectly able to execute the following
from my ANT script:

<cvs package="myProject" dest="${basedir}/temp" />

The above command works and it is able to successfully
checkout the myProject package into the temp folder.

On the other hand, executing the cvstagdiff in the
same ANT script does not work and it just hangs:

<cvstagdiff 
    destfile="${basedir}/temp/tagdiff.xml"
    package="myProject"
    startDate="09/15/2007"
    endDate="09/24/2007"
    failonerror="true"
    quiet="false"
/>

Recall from my previous e-mail that I am setting the
username and password in the CVSROOT environment
variable:

CVSROOT=:ssh;username=MyUserName;password=MyPassword;hostname=some.servername.com:/opt/cvs

So I don't understand why the cvs and the cvstagdiff
tags act differently.  Why does the cvs tag work with
the password being set in the CVSROOT environment
variable, while the cvstagdiff tag doesn't???

-Saladin


--- Saladin Sharif <al...@yahoo.com> wrote:

> 
> I am actually having a similar problem; when I try
> to
> use the cvstagdiff tag in my ANT script it hangs.
> 
> <cvstagdiff 
>     destfile="${basedir}/temp/tagdiff.xml"
>     package="myProject"
>     startDate="09/15/2007"
>     endDate="09/24/2007"
>     failonerror="true"
>     quiet="false"
> />
> 
> NOTE: my CVSROOT is set as an environment variable
> as
> such
> 
> set
>
CVSROOT=:ssh;username=MyUserName;password=MyPassword;hostname=some.servername.com:/opt/cvs
> 
> I have tried running my ant script in verbose mode;
> it
> gives me the following output before it hangs
> 
> cvs:
> [cvstagdiff] Executing 'cvs' with arguments:
> [cvstagdiff] 'rdiff'
> [cvstagdiff] '-s'
> [cvstagdiff] '-D'
> [cvstagdiff] '09/15/2007'
> [cvstagdiff] '-D'
> [cvstagdiff] '09/24/2007'
> [cvstagdiff] 'myProject'
> [cvstagdiff] 
> [cvstagdiff] The ' characters around the executable
> and arguments are
> [cvstagdiff] not part of the command.
> 
> 
> I've also tried executing the equivalent cvs command
> directly from the command prompt, and it works just
> fine:
> 
> cvs rdiff -s -D 09/15/2007 -D 09/24/2007 myProject
> 
> 
> But when I execute the cvstagdiff from my ANT script
> it just hangs.
> 
> Any ideas on how to get the cvstagdiff to work?
> 
> Thanks in advance,
> 
> -Saladin
> 





**********************************************************
* Saladin Sharif
* e-mail:  al_zawiah@yahoo.com
* Visit homepage @ http://gaia.ecs.csus.edu/~sharifs
**********************************************************


       
____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: ant script just hang when checking out of CVS [Similar problem with cvstagdiff]

Posted by Dominique Devienne <dd...@gmail.com>.
On 9/26/07, Saladin Sharif <al...@yahoo.com> wrote:
> triggered a JVM thread dump on the hanging Ant
> process.  I have copied and pasted the thread dump at
> the end of this e-mail message.

Nothing that looks unusual there. The cvs command was forked, and the
stream pumper on another thread is reading the output of the command.

In the past (months? years?), some people complained cvstagdiff was
taking an inordinate amount of time compared to the same command on
the command line. You haven't said anything on how long the command
takes on the CLI, and whether this time changes or not with <exec>.
You could try testing on a smaller repo or inside a subset of your
repo.

If someone the command slows down, how long have you waited before
asserting it hangs? Doing the test on a very small repo might allow it
to complete in a "reasonnable" time.

Also, try thread dumps at different times, to see if you can get a
different stack-trace.

> > 2) Provide relevant information: version of CVS
> > client? version of CVS
> > server? JVM? Ant version? OS? etc...
>
> * CVS client version:
>
> Concurrent Versions System (CVS) 1.11.22 (client)

I'd try CVSNT. I've always used it on Windows, and used to do
cvstagdiff with it (a long time ago). I get it from TortoiseCVS,
rather than the CVSNT stand-alone install.

> Thanks for the suggestions,

I'm running out of ideas. If nothing works, modify cvstagdiff to work
off a cvs diff file output separately by a different command, and
combine it with an <exec>.

There's a remote possibility that your server outputs something that
throws off the parsing code of cvstagdiff, but the thread dump does
not point to such an issue. --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: ant script just hang when checking out of CVS [Similar problem with cvstagdiff]

Posted by Saladin Sharif <al...@yahoo.com>.
--- Dominique Devienne <dd...@gmail.com> wrote:

> In general, people will help right away
> if they know the answer
> already, or can find it out easily. If
> not, which should someone else
> invest time in helping you for free? 
> Sometimes some question simply
> don't interest the community too... --DD

Very true. Thanks for the reminder.


> 
> "Request a fix" won't get you anywhere. There are a
> few things you can explore on your own:
> 1) Where does it hang? Google how to trigger a
> thread dump of your JVM
> and post it. If there's really a hang, that may give
> so clues.

That's an excellent suggestion.  I went ahead and
triggered a JVM thread dump on the hanging Ant
process.  I have copied and pasted the thread dump at
the end of this e-mail message.


> 2) Provide relevant information: version of CVS
> client? version of CVS
> server? JVM? Ant version? OS? etc...

* CVS client version:

Concurrent Versions System (CVS) 1.11.22 (client)

* JVM version:

java version "1.5.0_11"
Java(TM) 2 Runtime Environment, Standard Edition
(build 1.5.0_11-b03)
Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed
mode, sharing)

* Ant version:
Apache Ant version 1.7.0 compiled on December 13 2006

* OS:
Microsoft Windows XP Professional


> 3) Try the same command line (a) at the command
> line,
I've already tried this, as I've already indicated in
my previous e-mail.  It works perfectly from the
command line.

> then (b) in Ant,
> in <exec>, to see if  the <exec> version, which uses
> Ant, somehow works when <cvstagdiff> doesn't.

Thanks for the suggestion. I tried this. It works from
the <exec>.


> 4) Show that you've done some research on your own.
> Google is your friend.
No need to remind a programmer.  Google is the first
place that I consult even before posting to the
mailing list.  It is much easier to search google than
it is to compose a detailed message explaining a
problem, then posting it to the mailing list.

Thanks for the suggestions,

-Saladin


P.S. I ran the my ant script in verbose mode, and then
I triggered a thread dump.  Here is the output:

Apache Ant version 1.7.0 compiled on December 13 2006
Buildfile: ..\test\ant\build.xml
Detected Java version: 1.5 in: C:\jdk1.5.0_11_w32\jre
Detected OS: Windows 2003
parsing buildfile
C:\projects\myProject\test\ant\build.xml with URI =
file:/C:/projec
ts/myProject/test/ant/build.xml
Project base dir set to: C:\projects\myProject
[antlib:org.apache.tools.ant] Could not load
definitions from resource org/apach
e/tools/ant/antlib.xml. It could not be found.
 [property] Loading Environment env.
Build sequence for target(s) `cvs' is [cvs]
Complete build sequence is [cvs, init, test,
test-reports, javadoc, email, ]

cvs:
[cvstagdiff] Executing 'cvs' with arguments:
[cvstagdiff] 'rdiff'
[cvstagdiff] '-s'
[cvstagdiff] '-D'
[cvstagdiff] '09/15/2007'
[cvstagdiff] '-D'
[cvstagdiff] '09/24/2007'
[cvstagdiff] 'myProject'
[cvstagdiff]
[cvstagdiff] The ' characters around the executable
and arguments are
[cvstagdiff] not part of the command.
Full thread dump Java HotSpot(TM) Client VM
(1.5.0_11-b03 mixed mode, sharing):

"Thread-3" daemon prio=6 tid=0x042e9028 nid=0x29c
runnable [0x043ef000..0x043ef9
ec]
        at java.io.FileInputStream.readBytes(Native
Method)
        at
java.io.FileInputStream.read(FileInputStream.java:177)
        at
org.apache.tools.ant.taskdefs.StreamPumper.run(StreamPumper.java:92)
        at java.lang.Thread.run(Thread.java:595)

"Thread-2" daemon prio=6 tid=0x04283ac0 nid=0x55c
runnable [0x0436f000..0x0436fa
6c]
        at java.io.FileInputStream.readBytes(Native
Method)
        at
java.io.FileInputStream.read(FileInputStream.java:194)
        at
java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
        at
java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
        at
java.io.BufferedInputStream.read(BufferedInputStream.java:313)
        - locked <0x23dd58c0> (a
java.io.BufferedInputStream)
        at
java.io.FilterInputStream.read(FilterInputStream.java:90)
        at
org.apache.tools.ant.taskdefs.StreamPumper.run(StreamPumper.java:92)
        at java.lang.Thread.run(Thread.java:595)

"Low Memory Detector" daemon prio=6 tid=0x01d41a90
nid=0x474 runnable [0x0000000
0..0x00000000]

"CompilerThread0" daemon prio=10 tid=0x01d407a0
nid=0x123c waiting on condition
[0x00000000..0x03fefa4c]

"Signal Dispatcher" daemon prio=10 tid=0x01d3fb10
nid=0x10cc waiting on conditio
n [0x00000000..0x00000000]

"Finalizer" daemon prio=8 tid=0x01d12200 nid=0x10d8 in
Object.wait() [0x03eef000
..0x03eefa6c]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x2428c308> (a
java.lang.ref.ReferenceQueue$Lock)
        at
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
        - locked <0x2428c308> (a
java.lang.ref.ReferenceQueue$Lock)
        at
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
        at
java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0x0003fb30
nid=0x7f0 in Object.wait() [0x
03e6f000..0x03e6faec]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x2428c388> (a
java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Object.java:474)
        at
java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
        - locked <0x2428c388> (a
java.lang.ref.Reference$Lock)

"main" prio=6 tid=0x00036698 nid=0x11d0 runnable
[0x0015f000..0x0015fc3c]
        at java.lang.ProcessImpl.waitFor(Native
Method)
        at
org.apache.tools.ant.taskdefs.Execute.waitFor(Execute.java:549)
        at
org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:480)
        at
org.apache.tools.ant.taskdefs.AbstractCvsTask.runCommand(AbstractCvsT
ask.java:338)
        at
org.apache.tools.ant.taskdefs.AbstractCvsTask.execute(AbstractCvsTask
.java:395)
        at
org.apache.tools.ant.taskdefs.cvslib.CvsTagDiff.execute(CvsTagDiff.ja
va:232)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at
java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:105)
        at
org.apache.tools.ant.Task.perform(Task.java:348)
        at
org.apache.tools.ant.Target.execute(Target.java:357)
        at
org.apache.tools.ant.Target.performTasks(Target.java:385)
        at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at
org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
        at
org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at
org.apache.tools.ant.Main.runBuild(Main.java:698)
        at
org.apache.tools.ant.Main.startAnt(Main.java:199)
        at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

"VM Thread" prio=10 tid=0x01d10b90 nid=0xc74 runnable

"VM Periodic Task Thread" prio=10 tid=0x01d3fa68
nid=0x10f0 waiting on condition



**********************************************************
* Saladin Sharif
* e-mail:  al_zawiah@yahoo.com
* Visit homepage @ http://gaia.ecs.csus.edu/~sharifs
**********************************************************


      ____________________________________________________________________________________
Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: ant script just hang when checking out of CVS [Similar problem with cvstagdiff]

Posted by Dominique Devienne <dd...@gmail.com>.
On 9/26/07, Saladin Sharif <al...@yahoo.com> wrote:
> So far I have not received any responses to my
> question.  Was my question too difficult to answer?

Sarcasm really gets you anywhere with people that help other for free.

> Why does the cvstagdiff Ant task NOT work when I have
> the CVSROOT environment variable set with the
> password?  Is this a bug in Ant?  Should I request a
> fix for it?

"Request a fix" won't get you anywhere. There are a few things you can
explore on your own:
1) Where does it hang? Google how to trigger a thread dump of your JVM
and post it. If there's really a hang, that may give so clues.
2) Provide relevant information: version of CVS client? version of CVS
server? JVM? Ant version? OS? etc...This may not get you an answer
still, but at least you're willing to give enough details for someone
to help you.
3) Try the same command line (a) at the command line, then (b) in Ant,
in <exec>, to see if  the <exec> version, which uses Ant, somehow
works when <cvstagdiff> doesn't.
4) Show that you've done some research on your own. Google is your friend.

In general, people will help right away if they know the answer
already, or can find it out easily. If not, which should someone else
invest time in helping you for free? Sometimes some question simply
don't interest the community too... --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: ant script just hang when checking out of CVS [Similar problem with cvstagdiff]

Posted by Saladin Sharif <al...@yahoo.com>.
So far I have not received any responses to my
question.  Was my question too difficult to answer? 
Let me try to re-phrase my question.

Why does the cvstagdiff Ant task NOT work when I have
the CVSROOT environment variable set with the
password?  Is this a bug in Ant?  Should I request a
fix for it?

Regards,

-Saladin


--- Saladin Sharif <al...@yahoo.com> wrote:

> 
> But anyway, it just occured to me and I am wondering
> whether the problem that I am having with cvstagdiff
> has anything to do with ssh waiting for the
> password.
> 
> After all I am perfectly able to execute the
> following
> from my ANT script:
> 
> <cvs package="myProject" dest="${basedir}/temp" />
> 
> The above command works and it is able to
> successfully
> checkout the myProject package into the temp folder.
> 
> On the other hand, executing the cvstagdiff in the
> same ANT script does not work and it just hangs:
> 
> <cvstagdiff 
>     destfile="${basedir}/temp/tagdiff.xml"
>     package="myProject"
>     startDate="09/15/2007"
>     endDate="09/24/2007"
>     failonerror="true"
>     quiet="false"
> />
> 
> Recall from my previous e-mail that I am setting the
> username and password in the CVSROOT environment
> variable:
> 
>
CVSROOT=:ssh;username=MyUserName;password=MyPassword;hostname=some.servername.com:/opt/cvs
> 
> So I don't understand why the cvs and the cvstagdiff
> tags act differently.  Why does the cvs tag work
> with
> the password being set in the CVSROOT environment
> variable, while the cvstagdiff tag doesn't???
> 
> -Saladin
> 
> 
> --- Saladin Sharif <al...@yahoo.com> wrote:
> 
> > 
> > I am actually having a similar problem; when I try
> > to
> > use the cvstagdiff tag in my ANT script it hangs.
> > 
> > <cvstagdiff 
> >     destfile="${basedir}/temp/tagdiff.xml"
> >     package="myProject"
> >     startDate="09/15/2007"
> >     endDate="09/24/2007"
> >     failonerror="true"
> >     quiet="false"
> > />
> > 
> > NOTE: my CVSROOT is set as an environment variable
> > as
> > such
> > 
> > set
> >
>
CVSROOT=:ssh;username=MyUserName;password=MyPassword;hostname=some.servername.com:/opt/cvs
> > 
> > I have tried running my ant script in verbose
> mode;
> > it
> > gives me the following output before it hangs
> > 
> > cvs:
> > [cvstagdiff] Executing 'cvs' with arguments:
> > [cvstagdiff] 'rdiff'
> > [cvstagdiff] '-s'
> > [cvstagdiff] '-D'
> > [cvstagdiff] '09/15/2007'
> > [cvstagdiff] '-D'
> > [cvstagdiff] '09/24/2007'
> > [cvstagdiff] 'myProject'
> > [cvstagdiff] 
> > [cvstagdiff] The ' characters around the
> executable
> > and arguments are
> > [cvstagdiff] not part of the command.
> > 
> > 
> > I've also tried executing the equivalent cvs
> command
> > directly from the command prompt, and it works
> just
> > fine:
> > 
> > cvs rdiff -s -D 09/15/2007 -D 09/24/2007 myProject
> > 
> > 
> > But when I execute the cvstagdiff from my ANT
> script
> > it just hangs.
> > 
> > Any ideas on how to get the cvstagdiff to work?
> > 
> > Thanks in advance,
> > 
> > -Saladin
> > 
> 
> 
> 
> 
> 
>
**********************************************************
> * Saladin Sharif
> * e-mail:  al_zawiah@yahoo.com
> * Visit homepage @ http://gaia.ecs.csus.edu/~sharifs
>
**********************************************************
> 
> 
>        
>
____________________________________________________________________________________
> Boardwalk for $500? In 2007? Ha! Play Monopoly Here
> and Now (it's updated for today's economy) at Yahoo!
> Games.
>
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow
>  
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 


**********************************************************
* Saladin Sharif
* e-mail:  al_zawiah@yahoo.com
* Visit homepage @ http://gaia.ecs.csus.edu/~sharifs
**********************************************************


       
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
http://farechase.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org