BZ #175: dacapo tomcat causes endless recursion

Status fields:

creation_ts:2013-01-06 22:55
component:vm
version:1.6.0
rep_platform:All
op_sys:All
bug_status:RESOLVED
resolution:INVALID
reporter:stefan@complang.tuwien.ac.at
$ java -jar dacapo-9.12-bach.jar tomcat

The stack trace looks something l ike this:

        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at
org.apache.tomcat.util.IntrospectionUtils.setProperty(IntrospectionUtils.java:354)
        at org.apache.tomcat.util.net.NioEndpoint.setProperty(NioEndpoint.java:539)
        at
org.apache.coyote.http11.Http11NioProtocol.setProperty(Http11NioProtocol.java:102)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at
org.apache.tomcat.util.IntrospectionUtils.setProperty(IntrospectionUtils.java:354)
        at org.apache.catalina.connector.Connector.setProperty(Connector.java:321)
        at org.apache.catalina.connector.Connector.setRedirectPort(Connector.java:799)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at
org.apache.tomcat.util.IntrospectionUtils.setProperty(IntrospectionUtils.java:331)
        at
org.apache.catalina.startup.SetAllPropertiesRule.begin(SetAllPropertiesRule.java:66)
        at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1358)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Abs
tractSAXParser.java:504)
        at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyEle
ment(AbstractXMLDocumentParser.java:182)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanSt
artElement(XMLDocumentFragmentScannerImpl.java:1320)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$Fragme
ntContentDriver.next(XMLDocumentFragmentScannerImpl.java:2732)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocume
ntScannerImpl.java:625)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDo
cument(XMLDocumentFragmentScannerImpl.java:488)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Conf
iguration.java:819)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Conf
iguration.java:748)
        at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSA
XParser.java:1208)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAX
ParserImpl.java:525)
        at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:521)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:555)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:405)
        at org.dacapo.tomcat.Control.exec(Control.java:55)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.dacapo.harness.Tomcat.prepare(Tomcat.java:67)
        at org.dacapo.harness.Benchmark.run(Benchmark.java:144)
        at org.dacapo.harness.TestHarness.runBenchmark(TestHarness.java:218)
        at org.dacapo.harness.TestHarness.main(TestHarness.java:171)
        at Harness.main(Harness.java:17)

Version used:
icedtea6 1.6.0_27-b27 (1.12pre)

Comment #1 by stefan@complang.tuwien.ac.at on 2013-01-07 00:12:39

Seriously, you must be kidding... The stack overflow happens "by design". The
StackOverflowError will be caught and silently ignored. Of course, CACAO does not throw
stack overflow :(.

Comment #2 by stefan@complang.tuwien.ac.at on 2013-01-14 22:49:55

Created an attachment (id=80)
Crude stackoverflow patch

I have a very crude patch working on x86_64 for the main thread only:

$ ~/staging/staging-build/icedtea6/openjdk.build/bin/java -Xmx1024m -jar
dacapo-9.12-bach.jar tomcat
Using scaled threading model. 24 processors detected, 24 threads used to drive the
workload, in a possible range of [1,64]
Server thread created
===== DaCapo 9.12 tomcat starting =====
Loading web application
Creating client threads
Waiting for clients to complete
Client threads complete ... unloading web application
===== DaCapo 9.12 tomcat PASSED in 5457 msec =====
Server stopped ... iteration complete

Comment #3 by stefan@complang.tuwien.ac.at on 2014-01-28 12:57:31

Not our bug.

Attachment id=80

date:2013-01-14 22:49
desc:Crude stackoverflow patch
type:text/plain
download:crude-patch