Maven build freezes

1,035 views
Skip to first unread message

Saulius Pačekajus

unread,
Mar 5, 2012, 1:39:12 PM3/5/12
to eb...@googlegroups.com
Hi

Lately I cannot build Ebean from SVN as the build freezes. Here's what I do:

# svn co https://ebeanorm.svn.sourceforge.net/svnroot/ebeanorm/ebean/trun
# cd trunk
# mvn clean install

SVN checkout goes normally, but then mvn clean install freezes at some
point. Please see mvn.out attached. Where it get's to the point:

** WAIT **
** WAIT **
** WAIT **
** WAIT **
** WAIT **

The last ** WAIT ** takes a lot of time, like a few hours. And then
these connection closed warning come which I assume are not a sign of
success. This happens on Windows 7 64bit and Ubuntu 10.04 64bit machines.

I'm noob in Maven, but it looks like the problem is in testing phase.
How can I skip testing and just build snapshot jars?

BTW since I have Ebean project in Eclipse (with m2 installed), is it
possible to build (possibly skip testing) snapshot jars in Eclipse?


Regards

--

Saulius

svn.out
mvn.out

Rob Bygrave

unread,
Mar 5, 2012, 3:15:26 PM3/5/12
to eb...@googlegroups.com
//skip tests and install snapshot

mvn -Dmaven.test.skip=true clean install


// You might prefer this option ...
// skip tests and create the snapshot in target ... but not install the snapshot

mvn -Dmaven.test.skip=true clean package


>> WAIT ...

There is a relatively new test that fires up a lot of threads to test the thread safety of lazy loading (with those threads lazy loading on the same object graph).

So it sounds like a deadlock is occurring running that test in your environment. I can't remember how to get a thread dump but that would be good so that we can see what the threads are blocking on (if you can manage to get it).



2012/3/6 Saulius Pačekajus <sau...@pacekajus.lt>

Saulius Pačekajus

unread,
Mar 5, 2012, 4:55:54 PM3/5/12
to eb...@googlegroups.com

Well I've tried using jstack on Linux (error) and Windows (waits forever), but with no success. I think in both cases the problem is the same, as jstack complains on Linux:

# jstack 17278
17278: Unable to open socket file: target process not responding or HotSpot VM not loaded
The -F option can be used when the target process is not responding

-F option does not help a lot

# jstack -F 17278
Attaching to process ID 17278, please wait...
sun.jvm.hotspot.debugger.NoSuchSymbolException: Could not find symbol "gHotSpotVMTypeEntryTypeNameOffset" in any of the known library names (libjvm.so, libjvm_g.so, gamma_g)
        at sun.jvm.hotspot.HotSpotTypeDataBase.lookupInProcess(HotSpotTypeDataBase.java:388)
        at sun.jvm.hotspot.HotSpotTypeDataBase.getLongValueFromProcess(HotSpotTypeDataBase.java:369)
        at sun.jvm.hotspot.HotSpotTypeDataBase.readVMTypes(HotSpotTypeDataBase.java:102)
        at sun.jvm.hotspot.HotSpotTypeDataBase.<init>(HotSpotTypeDataBase.java:85)
        at sun.jvm.hotspot.bugspot.BugSpotAgent.setupVM(BugSpotAgent.java:568)
        at sun.jvm.hotspot.bugspot.BugSpotAgent.go(BugSpotAgent.java:494)
        at sun.jvm.hotspot.bugspot.BugSpotAgent.attach(BugSpotAgent.java:332)
        at sun.jvm.hotspot.tools.Tool.start(Tool.java:163)
        at sun.jvm.hotspot.tools.JStack.main(JStack.java:86)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at sun.tools.jstack.JStack.runJStackTool(JStack.java:118)
        at sun.tools.jstack.JStack.main(JStack.java:84)
Debugger attached successfully.
jstack requires a java VM process/core!

So unless there is some other way to get a thread dump of a process, I don't think this is going to work. I would suggest adding more verbose logging into the test in question - that could give some clues.

Saulius

Saulius Pačekajus

unread,
Mar 5, 2012, 5:13:01 PM3/5/12
to eb...@googlegroups.com
mvn -Dmaven.test.skip=true clean package

Fails with error (see mvn.out attached for full output):

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (enhance-test-classes) on project ebean: An Ant BuildException has occured: java.lang.RuntimeException: File not found D:\ebean\build2\trunk\target\test-classes/com/avaje/tests
[ERROR] around Ant part ...<ebeanEnhance classSource="D:\ebean\build2\trunk\target\test-classes" packages="com.avaje.tests.**" transformArgs="debug=1"/>... @ 8:128 in D:\ebean\build2\trunk\target\antrun\build-main.xml
[ERROR] -> [Help 1]

It seems that build.xml needs to be updated not to enhance test classes when tests are skipped.


Saulius

On 2012.03.05 22:15, Rob Bygrave wrote:
mvn.out

Mario Ivankovits

unread,
Mar 6, 2012, 12:39:15 AM3/6/12
to eb...@googlegroups.com

Just do let you know, I slightly changed the way how the thread syncronization works.

 

You should see a output something like this now -  And no, it should not take hours!

 

 

INFO: DataSourcePool [h2] grow; id[h2.1] busy[2] max[25]

** WAIT **

** WAIT **

** WAIT **

** WAIT **

** WAIT **

** WAIT **

** WAIT **

** WAIT **

** DO LAZY FETCH **

** DO LAZY FETCH **

** DO LAZY FETCH **

** DO LAZY FETCH **

** DO LAZY FETCH **

** DO LAZY FETCH **

** DO LAZY FETCH **

** DO LAZY FETCH **

 

 

 

Ciao,

Mario

Saulius

unread,
Mar 6, 2012, 9:47:32 AM3/6/12
to eb...@googlegroups.com

Well it looks like the problem is fixed - I can build the jars now and this particular test seems so pass.

Thank you!


Saulius

2012/3/6 Saulius Pačekajus

Hi

Mario Ivankovits

unread,
Mar 6, 2012, 9:55:34 AM3/6/12
to eb...@googlegroups.com

Great! :-)

Reply all
Reply to author
Forward
0 new messages