NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 982 - Problem starting validator after build from source (Solaris)
Problem starting validator after build from source (Solaris)
Status: RESOLVED FIXED
Product: Validator.nu
Classification: Unclassified
Component: RELAX NG back end
HEAD
All All
: P2 normal
Assigned To: Nobody
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-22 14:10 CET by Des
Modified: 2015-03-31 03:04 CEST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Des 2013-11-22 14:10:18 CET
Hi
I've just tried to build validator.nu from source based on instructions that I found here. 
http://about.validator.nu/#src
I did a test build on an OSX machine, which worked fine. However, I need to try to run it on our Solaris 5.10 / sparc server.
Downloading the dependencies and building all seems to go fine. It's the step where the schemas load that go wrong. 
This test fails:
"java" ....... tests/messages.json
with this error
Exception in thread "main" java.lang.StackOverflowError
        at com.thaiopensource.relaxng.impl.ChoicePattern.expand(Unknown Source)
.. repeats lots of similar lines
Then when jetty actually tries to start I get a similar error. 
java .....  nu.validator.servlet.Main 8888
nu.validator.servlet.VerifierServletTransaction - Will load schema: http://s.validator.nu/html5-all.rnc
Exception in thread "main" java.lang.StackOverflowError
        at com.thaiopensource.relaxng.impl.ChoicePattern.expand(Unknown Source)
.. repeats lots of similar lines.

My version of java is 
-bash-3.00$ java -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) Server VM (build 23.21-b01, mixed mode)

I know you only list it as tested on Ubuntu and OSX. Would you expect it to work on Solaris? If so I'd really appreciate any help.
Comment 1 Henri Sivonen 2013-11-27 09:11:06 CET
Does the problem go away if you edit the java invocations in build.py to use a larger stack size per http://stackoverflow.com/questions/887935/stackoverflowerror-on-solaris-but-not-on-linux-windows ?
Comment 2 Des 2013-11-27 14:03:42 CET
Thanks for looking at this Henri
Yes, you are exactly right. I made the following edits to the build.py file:
Line 612 in getRunArgs(), I changed '-Xss512k', to '-Xss1024k',
That got the validator running.
To get the tests running I altered line 961 in runTests()
I changed
runCmd('"%s" -classpath %s %s %s' % (javaCmd, classPath, className, args))
to 
runCmd('"%s" -Xss1024k -classpath %s %s %s' % (javaCmd, classPath, className, args))
Our validation server is up and running now
Thanks again.
Comment 3 Michael[tm] Smith 2015-03-31 03:04:10 CEST
resolving per comment 2

I believe we've since dropped the hardcoded values here and made it all user configurable through command-line options for the build script.