Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6976938

StackOverflowError by com.sun.xml.stream.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next

    XMLWordPrintable

    Details

      Backports

        Description

        Operating System
        ----------------------
        SPARC Solaris 10 (but reproduceible at any OS)
        Due to bigger Solaris OS default of pagesize(1) of 8k, the issue is
        faster reproduceible at sparc architecture.

        StAX Version
        ----------------------
        issue persist at any StAX (eg.lastest JDK6 or Glassfish or latest StAX 1.0.2 from dev.java.net)

        Description
        ----------------------
        Customer is running StAX at Application Server to read XML files.
        Quite similar to CR#6440214 the StAX scanner produce a java.lang.StackOverflowError while
        reading valid XML files, in case the text content of a XML element contains many lines like "< ... >".
        As more new lines with "< ... >" will be added, as bigger java stack is consumed, caused by the StAX scanner.
        However the given workaround from CR#6440214 to set "IS_COALESCING, Boolean.FALSE" do not work
        in our test case. The seen error message is additional a bit different which is the reason for another bugreport.
        Setting IS_COALESCING to FALSE cause only a very small effect to reduce the amound of
        used stack size by just a few bytes.

        Testcase attached
        ----------------------
        - sample XML file which cause the issue
        - the runnable testcase

        Howto run the testcase
        ----------------------
        - download and extract latest ant if you dont have ant installed
        - Please unzip the test case and run on sparc to reproduce the error
        $ ant -Dplatform.home=/your/path/to/jdk1.5.0_xx -Drun.jvmargs="-server" clean test

        - Please run on sparc this command to prevent the error
        $ ant -Dplatform.home=/your/path/to/jdk1.5.0_xx -Drun.jvmargs="-server -Xss800k" clean test

        - To simulate the error with Solaris x86, use ppgsz(1)
        call pagesize -a and pickup a valid pagesize bigger then 8k and call the ant command at x86 like this
        $ ppgsz -o stack=2097152 ant -Dplatform.home=/opt/jdk1.5.0_22-32 -Drun.jvmargs="-server" clean test

        Error Messages
        -----------------------
        java.lang.StackOverflowError
        at com.sun.xml.stream.XMLEntityReaderImpl.scanName(XMLEntityReaderImpl.java:700)
        at com.sun.xml.stream.XMLDocumentFragmentScannerImpl.scanEntityReference(XMLDocumentFragmentScannerImpl.java:1723)
        at com.sun.xml.stream.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2936)
        at com.sun.xml.stream.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2819)
        at com.sun.xml.stream.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2962)
        at com.sun.xml.stream.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2819)
        at com.sun.xml.stream.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2962)
        at com.sun.xml.stream.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2819)
        at com.sun.xml.stream.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2962)
        at com.sun.xml.stream.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2819)
        at com.sun.xml.stream.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2962)
        ...
        ...

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                skoppar Sunita Koppar (Inactive)
                Reporter:
                arieck Andreas Rieck (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: