开发者

JUnit Ant task causes "Stack Size Too Small" error

Using the JUnit ant task to run my Unit Tests from CruiseControl on Centos 5.4

My jUnit Task forks to run the tests, the majority of which work ok, however I keep getting intermittent failures where the JVM crashes, always with the same error:

[junit] Fatal: Stack size too small. Use 'ulimit -s' to increase default stack size.

I've doubled the stack size using ulimit and the crashes continue to happen. The JUnit task runs about 100 different jUnit test classes and the JVM crash can happen in any of them, so I don't believe that the behaviour is due to any particular test.

ulimit -a tells me that the stack size is 32768 kb ( I've upped it a few times to get it to this point ), which seems huge to me.

Running the sun jdk 1.3

Anyone got any clues, or recommendations about what a sensible stack size might be.

There has never been any men开发者_StackOverflow中文版tion of increasing the java stack size ( -Xss ) - but I tried it anyway with the same result.

Dave


Did you add something like this:

<jvmarg line="-Xss512k"/> 

in the ant script or just increase the stack for the ant process itself (assuming, of course, that you are forkign the tests instead of running them inside the ant instance of the VM).


My thoughts on this matter are that somehow things aren't being popped off the internal stack, which I realize is obvious. Since you say it fails arbitrarily throughout the testing process it is a bit difficult to track down. How many of these test cases are recursive in nature? Also how many forks are being executed?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜