Re: Need Help Using Hudson Build System

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Need Help Using Hudson Build System

Kohsuke Kawaguchi-2
Kundan Kumar wrote:
> Hi Hudson Member,
>
> I am trying to use Hudson build system but not able to generate the
> required result(Actually not able to hit the ant target).

OK.

> Here is the list of operation that i am performing to create a complete build.
>
> 1. Create a new job.
> 2. pass the cvs connection information and module name.
> 3. in build section select  "Invoke top-level Ant targets"  and passing the target name.
> 4. save the information.

Sounds correct to me so far.

> In next step when i am clicking on build now then it checkout all the
> content from the cvs that i am able to view in workspace.Next in
> progress bar it showing buildHIstory bar but it's never completed(saying
> started 30 mins ago) nor even there is an error trace on console output.
> The problem that i think is that the target name that i am passing to
> the field not able to hit it.

Sounds like somehow the build is hanging, but the question is where it's
hanging.

I think it's unlikely that it is because it can't find the target,
because if so Ant would report an error and the build will be over.

Please send us last 20 or so lines of the console output, so that we can
see where your build is hanging.


--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Need Help Using Hudson Build System

Kohsuke Kawaguchi-2
Kundan Kumar wrote:
> Hi Kohsuke,
>
> Please see the Console output which is showing only a single line :
>  
> started
>
> [BuildUsingHudson] $ cvs -Q -z9 -d :pserver:kundan@india:/cvs/cvsroot co -d workspace -D Friday, January 5, 2007 1:41:32 PM UTC HRMS

OK, so it must be that this cvs command is hanging. First thing you want
to check is to go into the server and run the exact same command, and
see how it behaves.

I also just added a debug switch to have Hudson run cvs with "-t",
instead of "-Q". You can get the snapshot build of #1895 or later, and
from the scripting console, please execute:

   hudson.scm.CVSSCM.debugLogging = true

When you run a build after this, you should see a lot more output.
Please send it to us.

And thanks for the thorough information. Really appreciated.

> The jdk and other details that i am using to make the build are :
> 1. Tomcat version :           5.0.28
> 2. jdk version :                  jdk1.5.0_09 also try using jdk version  j2sdk1.4.2_02
> 3. Apache Ant version  :   1.6.3
> 4. Hudson build system war file  :  1.69 also try 1.64 and 1.68
>
>  Here is the workspache directory structure that i am able to view after starting the build.
>
>      WebRoot
>      src/com/yasutech/appraisalsystem
>      .classpath 505  
>      .mymetadata 288  
>      .project 1344  
>      build.xml 2851  
>
>
> Also attaching the tomcat's console screen and  build.xml file which contains target called makewar which i'm calling during creation of the project.There is no exception in tomcat's log file.
>
> Please let me know if you need any other information.
>
> Regards,
> Kundan
>
> ----- Original Message -----
> From: "Kohsuke Kawaguchi" <[hidden email]>
> To: "Kundan Kumar" <[hidden email]>
> Cc: <[hidden email]>; "'Satish Bihari '" <[hidden email]>; <[hidden email]>
> Sent: Thursday, January 04, 2007 11:24 PM
> Subject: Re: Need Help Using Hudson Build System
>
>
>> Kundan Kumar wrote:
>> > Hi Hudson Member,
>> >
>> > I am trying to use Hudson build system but not able to generate the
>> > required result(Actually not able to hit the ant target).
>>
>> OK.
>>
>> > Here is the list of operation that i am performing to create a complete build.
>> >
>> > 1. Create a new job.
>> > 2. pass the cvs connection information and module name.
>> > 3. in build section select  "Invoke top-level Ant targets"  and passing the target name.
>> > 4. save the information.
>>
>> Sounds correct to me so far.
>>
>> > In next step when i am clicking on build now then it checkout all the
>> > content from the cvs that i am able to view in workspace.Next in
>> > progress bar it showing buildHIstory bar but it's never completed(saying
>> > started 30 mins ago) nor even there is an error trace on console output.
>> > The problem that i think is that the target name that i am passing to
>> > the field not able to hit it.
>>
>> Sounds like somehow the build is hanging, but the question is where it's
>> hanging.
>>
>> I think it's unlikely that it is because it can't find the target,
>> because if so Ant would report an error and the build will be over.
>>
>> Please send us last 20 or so lines of the console output, so that we can
>> see where your build is hanging.
>>
>>
>> --
>> Kohsuke Kawaguchi
>> Sun Microsystems                   [hidden email]
>>
>

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Need Help Using Hudson Build System

Kohsuke Kawaguchi-2
In reply to this post by Kohsuke Kawaguchi-2
Thanks for the log. It looks like CVS is not really hanging, so I'm
puzzled. I'd really like to understand where the thread is hanging.

Would it be possible for you to send us the stack trace dump when the
hang happens?

On Unix, you can have JVM dump this information by sending SIGQUIT to
JVM process. On Windows, on the command window where the JVM runs, you
can type Ctrl+BREAK to do the same.

Kundan Kumar wrote:

> Hi Kohsuke,
> Please see the console output after running the build with hudson.scm.CVSSCM.debugLogging = true
>
> started
> [HRMS] $ cvs -t -z9 -d :pserver:kundan@india:/cvs/cvsroot co -d workspace -D Sunday, January 7, 2007 9:05:58 AM UTC HRMS
> cvs checkout: notice: main loop with CVSROOT=:pserver:kundan@india:/cvs/cvsroot
> S-> do_module (HRMS, Updating, , )
> S-> do_module (HRMS, Updating, workspace, )
> S-> Create_Admin (., workspace, /cvs/cvsroot/HRMS, , 2007.01.07.09.05.58, 0, 0)
> cvs checkout: in directory workspace:
> cvs checkout: cannot open CVS/Entries for reading: No such file or directory
> cvs checkout: cannot open CVS/Tag: No such file or directory
  ...

> -> Register(ExcelInputSourceReaderWithPoi.java, 1.2, Tue Nov 14 09:50:56 2006, ,  2007.01.07.09.05.58)
> S-> checkout (/cvs/cvsroot/HRMS/src/com/yasutech/appraisalsystem/util/PropertyLoader.java,v, 1.1, , (function))
> S-> server_register(PropertyLoader.java, 1.1, , , , 2007.01.07.09.05.58, )
> S-> Register(PropertyLoader.java, 1.1, , ,  2007.01.07.09.05.58)
> U workspace/src/com/yasutech/appraisalsystem/util/PropertyLoader.java
>
>
> Looking for your response.
> Really appreciated your guidence so far.


--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Need Help Using Hudson Build System

Kohsuke Kawaguchi-2
In reply to this post by Kohsuke Kawaguchi-2
Kundan Kumar wrote:
> Hi Kohsuke,
> The problem in not with CVS that i am sure. I think the problem is that
> your application not able to identify the build.xml file which contains
> the various targets.

In some sense, anything is a possibility, but I think this is highly
unlikely. If Hudson passes a wrong build.xml path to Ant, it will fail
right away, and it won't hang.

 > I don't know how hudson internally works. But one
> thing i am sure that some where inside your application you must trying
> to invoke the build.xml file.

Correct.

 > i also put some echo inside my build.xml.
> But the problem is that your application not able to find the build.xml
> file. After checkout the CVS responsibility  is finished.Now it is the
> Hudson responsibility to identify the build.xml relative to hudson
> workspace. I tried various combination like after checkout i close the
> tomcat server and manually using the ant i try to run my build.xml file.
>  It's working fine .Since ant is able to find build file. But inside
> Hudson after Clicking on build now button he is not able to find
> build.xml file.

Let me see the stack trace dump that you sent us.

> Please provide some solution so that i can start working on it.I also
> went through Hudson forum but no one ever encountered such problem.

Yes, this is the first time someone reported a problem like this.

> i am also sending you the  JVM dump related to  window system.

Thanks. The following three threads are related to this. One waits for
the completion of cvs, the other two are used to pump stdout/stderr from
cvs. stdin is closed very early in the process.

What this tells us is that cvs process is not completed yet, for
whatever reason. So Hudson keeps waiting on it.

Probably you've told me already, but what is the OS of this system, and
what's the version of cvs? When you run the same command from shell,
does it work correctly without a hang?

> Full thread dump Java HotSpot(TM) Client VM (1.5.0_09-b01 mixed mode, sharing):
>
> "cvs -Q -z9 -d :pserver:kundan@india:/cvs/cvsroot co -d workspace -D Tuesday, Ja
> nuary 9, 2007 10:13:39 AM UTC HRMS: stderr copier" prio=6 tid=0x035f2ae0 nid=0x7
> b8 runnable [0x04cdf000..0x04cdfa64]
>         at java.io.FileInputStream.readBytes(Native Method)
>         at java.io.FileInputStream.read(FileInputStream.java:177)
>         at hudson.Util.copyStream(Util.java:195)
>         at hudson.util.StreamCopyThread.run(StreamCopyThread.java:26)
>
> "cvs -Q -z9 -d :pserver:kundan@india:/cvs/cvsroot co -d workspace -D Tuesday, Ja
> nuary 9, 2007 10:13:39 AM UTC HRMS: stdout copier" prio=6 tid=0x0307d5d0 nid=0xb
> 7c runnable [0x04c9f000..0x04c9fae4]
>         at java.io.FileInputStream.readBytes(Native Method)
>         at java.io.FileInputStream.read(FileInputStream.java:194)
>         at java.io.BufferedInputStream.read1(BufferedInputStream.java:254)
>         at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
>         - locked <0x23d27a40> (a java.io.BufferedInputStream)
>         at java.io.FilterInputStream.read(FilterInputStream.java:90)
>         at hudson.Util.copyStream(Util.java:195)
>         at hudson.util.StreamCopyThread.run(StreamCopyThread.java:26)
>
> "Executor #1 for null" prio=6 tid=0x02d421c0 nid=0x9f4 in Object.wait() [0x0441f
> 000..0x0441fc64]
>         at java.lang.Object.wait(Native Method)
>         - waiting on <0x23d259b8> (a hudson.util.StreamCopyThread)
>         at java.lang.Thread.join(Thread.java:1095)
>         - locked <0x23d259b8> (a hudson.util.StreamCopyThread)
>         at java.lang.Thread.join(Thread.java:1148)
>         at hudson.Proc$LocalProc.join(Proc.java:101)
>         at hudson.scm.AbstractCVSFamilySCM.run(AbstractCVSFamilySCM.java:35)
>         at hudson.scm.AbstractCVSFamilySCM.run(AbstractCVSFamilySCM.java:43)
>         at hudson.scm.CVSSCM.checkout(CVSSCM.java:189)
>         at hudson.model.AbstractProject.checkout(AbstractProject.java:245)
>         at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:101)
>
>         at hudson.model.Run.run(Run.java:528)
>         at hudson.model.Build.run(Build.java:266)
>         at hudson.model.Executor.run(Executor.java:61)


--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Need Help Using Hudson Build System

Kohsuke Kawaguchi-2
In reply to this post by Kohsuke Kawaguchi-2
Kundan Kumar wrote:
> Hi Kohsuke,
>
> I resolve the issue. The problem was due to CVS version 1.10.5. I think
> this version is not supported by Hudson. One more thing was interesting.
> During the checkout you are passing the date in some format which is
> also not accepted by any CVS version. Hence CVS was getting hanged. So i  
> replace that version with 1.11. Now it's working fine.  

Good to hear that you resolved the problem. Thank you for your patience.

But I'm curious, I'd understand if CVS failed complaining that it didn't
understand the date format. But instead it just hanged? Hmm.

Anyway, if you find any other issues in Hudson, let me know.

>
> Thanks for your guidence.
>
> Regards,
> Kundan
>
>
>
>
> Kundan Kumar wrote:
>> Hi Kohsuke,
>> The problem in not with CVS that i am sure. I think the problem is that
>> your application not able to identify the build.xml file which contains
>> the various targets.
>
> In some sense, anything is a possibility, but I think this is highly
> unlikely. If Hudson passes a wrong build.xml path to Ant, it will fail
> right away, and it won't hang.
>
>  > I don't know how hudson internally works. But one
>> thing i am sure that some where inside your application you must trying
>> to invoke the build.xml file.
>
> Correct.
>
>  > i also put some echo inside my build.xml.
>> But the problem is that your application not able to find the build.xml
>> file. After checkout the CVS responsibility  is finished.Now it is the
>> Hudson responsibility to identify the build.xml relative to hudson
>> workspace. I tried various combination like after checkout i close the
>> tomcat server and manually using the ant i try to run my build.xml file.
>>  It's working fine .Since ant is able to find build file. But inside
>> Hudson after Clicking on build now button he is not able to find
>> build.xml file.
>
> Let me see the stack trace dump that you sent us.
>
>> Please provide some solution so that i can start working on it.I also
>> went through Hudson forum but no one ever encountered such problem.
>
> Yes, this is the first time someone reported a problem like this.
>
>> i am also sending you the  JVM dump related to  window system.
>
> Thanks. The following three threads are related to this. One waits for
> the completion of cvs, the other two are used to pump stdout/stderr from
> cvs. stdin is closed very early in the process.
>
> What this tells us is that cvs process is not completed yet, for
> whatever reason. So Hudson keeps waiting on it.
>
> Probably you've told me already, but what is the OS of this system, and
> what's the version of cvs? When you run the same command from shell,
> does it work correctly without a hang?
>
>> Full thread dump Java HotSpot(TM) Client VM (1.5.0_09-b01 mixed mode, sharing):
>>
>> "cvs -Q -z9 -d :pserver:kundan@india:/cvs/cvsroot co -d workspace -D Tuesday, Ja
>> nuary 9, 2007 10:13:39 AM UTC HRMS: stderr copier" prio=6 tid=0x035f2ae0 nid=0x7
>> b8 runnable [0x04cdf000..0x04cdfa64]
>>         at java.io.FileInputStream.readBytes(Native Method)
>>         at java.io.FileInputStream.read(FileInputStream.java:177)
>>         at hudson.Util.copyStream(Util.java:195)
>>         at hudson.util.StreamCopyThread.run(StreamCopyThread.java:26)
>>
>> "cvs -Q -z9 -d :pserver:kundan@india:/cvs/cvsroot co -d workspace -D Tuesday, Ja
>> nuary 9, 2007 10:13:39 AM UTC HRMS: stdout copier" prio=6 tid=0x0307d5d0 nid=0xb
>> 7c runnable [0x04c9f000..0x04c9fae4]
>>         at java.io.FileInputStream.readBytes(Native Method)
>>         at java.io.FileInputStream.read(FileInputStream.java:194)
>>         at java.io.BufferedInputStream.read1(BufferedInputStream.java:254)
>>         at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
>>         - locked <0x23d27a40> (a java.io.BufferedInputStream)
>>         at java.io.FilterInputStream.read(FilterInputStream.java:90)
>>         at hudson.Util.copyStream(Util.java:195)
>>         at hudson.util.StreamCopyThread.run(StreamCopyThread.java:26)
>>
>> "Executor #1 for null" prio=6 tid=0x02d421c0 nid=0x9f4 in Object.wait() [0x0441f
>> 000..0x0441fc64]
>>         at java.lang.Object.wait(Native Method)
>>         - waiting on <0x23d259b8> (a hudson.util.StreamCopyThread)
>>         at java.lang.Thread.join(Thread.java:1095)
>>         - locked <0x23d259b8> (a hudson.util.StreamCopyThread)
>>         at java.lang.Thread.join(Thread.java:1148)
>>         at hudson.Proc$LocalProc.join(Proc.java:101)
>>         at hudson.scm.AbstractCVSFamilySCM.run(AbstractCVSFamilySCM.java:35)
>>         at hudson.scm.AbstractCVSFamilySCM.run(AbstractCVSFamilySCM.java:43)
>>         at hudson.scm.CVSSCM.checkout(CVSSCM.java:189)
>>         at hudson.model.AbstractProject.checkout(AbstractProject.java:245)
>>         at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:101)
>>
>>         at hudson.model.Run.run(Run.java:528)
>>         at hudson.model.Build.run(Build.java:266)
>>         at hudson.model.Executor.run(Executor.java:61)
>
>
>

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment