Forum Bugs

Mercury runtime error on OSX (10.5.6) using Java connector

ebellinger
I've been getting a Murcury runtime error running on two separate Mac Minis. Both are on 10.5.6, one is a 1.83GHz Core 2 Duo, and the other is 2.0GHz Core 2 Duo. Both have Prince 6.0r8, and Java 1.5.0_16. We use Prince via the java connector (prince-java-r4) running through JBoss 4.0.5. I do not get this error on a MacBook Pro (10.5.6, 1.83GHz Core 2 Duo).

The most frustrating thing about this error is that Prince actually works for a while and then starts bombing out... anywhere from 10 minutes to 3 hours later. All I'd get in the Prince log was:
Thu Mar 12 20:11:46 2009: ---- begin
Thu Mar 12 20:11:47 2009: ---- begin
Thu Mar 12 20:11:49 2009: ---- begin

Wondering where the rest of my log message went, I modified the java connector code to print out more information (specifially the "unknown messages") which finally gave me the following output in the java log:
[Prince] converting InputStream to OutputStream.
[Prince] cmdline options: [/usr/local/bin/prince, --input=html, --baseurl=http://localhost:8888, --log=/usr/local/tomcat/prince-output/prince.log, --verbose]
[Prince] closing InputStream
[Prince] closing OutputStream.
[Prince] unknown message: Mercury runtime: caught bus error ***
[Prince] unknown message: e: non-existent physical address
[Prince] unknown message: ess involved: 0x0
[Prince] unknown message:  may have been caused by a stack overflow, due to unbounded recursion.
[Prince] unknown message: ing from signal handler

I've created a very simple version of the webapp that will run on Tomcat 5.5 and will eventually start to fail the same way as the JBoss version. So it's not just our JBoss configuration. Any ideas would be greatly appreciated.
mikeday
Is it failing on the same input? ie. can you make it fail after a while by feeding it the same input document repeatedly? (That shouldn't happen, as it should be starting with a fresh environment each time).
ebellinger
It fails regardless of the input, but the tests I did used the same input over and over again.
mikeday
That's bad. It seems most likely that this is caused by a bug in the runtime library that we are using for garbage collection on MacOS X. Hopefully we can get this fixed for the next release, but I'm afraid I don't think that there is an immediate short-term workaround. :(
ebellinger
I can send you the source of the small webapp if that will help with testing.
mikeday
Thanks, but I think we've identified the issue, it's now just a matter of fixing it.
ebellinger
Excellent. Looking forward to a fix.
rolandw
Is there a fix for this yet? We keep on having this problem and are wondering if we should just jump to v7.0b1? Our setup is very similar but we are using Tomcat rather than JBoss on a Mac Mini running 10.5.7.
mikeday
If you can easily reproduce the problem, it would be great if you could try it with the beta of Prince 7.0.