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

Parser hangs and consumes >90% CPU

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 1.1.3
    • 1.4.1
    • xml
    • b01
    • generic
    • generic

    Backports

      Description



        Name: krC82822 Date: 08/09/2001


        java version "1.3.0" (with JAXP 1.1)
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
        Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
        and
        java version "1.4.0-beta" (with its built-in XML-related classes) [per user, via email]
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
        Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)
        and
        java version "1.4.0-beta_refresh" [here at Sun]
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta_refresh-b74)
        Java HotSpot(TM) Client VM (build 1.4.0-beta_refresh-b74, mixed mode)
        -------------

        When the XML parser tries to parse a particular XML file against our DTD file,
        it hangs and consumes >90% of the CPU. If I add one space character in a
        particular location in the file, it works fine. The problem occurs no matter
        whether I use SAX or DOM parsing.

        ------

        9 Aug 2001, eval1127@eng -- received test case from user.

        The location is in question is just before a new (opening) <table ...
        tag. Putting the space in front of it lets the parsing complete OK.
        Removing it causes parsing to hang, and continue to chew CPU time.

        Testing with build 74 of merlin:
        java version "1.4.0-beta_refresh"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta_refresh-b74)
        Java HotSpot(TM) Client VM (build 1.4.0-beta_refresh-b74, mixed mode)

        % jar xvf XML*zip
        extracted: Echo.java
        extracted: Echo.class
        extracted: not_work.XML
        extracted: work.XML
        extracted: quote.dtd

        % diff work.XML not_work.XML
        182c182
        < <table id="Table" width="650" cellpadding ="7" cellspacing ="0">
        ---
        > <table id="Table" width="650" cellpadding ="7" cellspacing ="0">

        [difference is that the "working" one has a leading space at beginning of line]

        ----------------
        (Review ID: 129325)
        ======================================================================

        Attachments

          Issue Links

            Activity

              People

                egoei Edwin Goei (Inactive)
                kryansunw Kevin Ryan (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: