[xml/sgml-pkgs] Bug#596035: libxml2-utils: RelaxNG validation loops forever with max CPU consumption

Marc Cromme marc at ange.dk
Tue Sep 7 15:14:35 UTC 2010


Package: libxml2-utils
Version: 2.7.7.dfsg-4
Severity: normal
Tags: upstream


Running xmllint RelaxNG like this makes it busy loop forever

xmllint  --relaxng vessel_reports.rng vessel_reports.xml

Same validation goes fine with jing, rng file had been generated by trang from rnc file


The test files are:


*** vessel_reports.xml
<?xml version="1.0"?>
<!--Test XML data file-->
<!--Autogenerated from RelaxNG schema-->
<vessel_reports>
  <vessel_report _id="12345678901234567890" _created="2010-06-14T12:00:00Z" _user="tccfeed" vessel_id="NAD" port_from="USLAX" port_to="USLAX" report_number="3" PERIOD="P23H16M" voyage="0410" latitude="41 43 N" longitude="142 22 E" distance_sailed="462" remaining_distance="4500" eta_next_port="2010-06-14T13:00:00-05:00" used_hfo="65.4" rob_hfo="2131.3" used_mdo="0.0" rob_mdo="102.6" mean_draft="9.16" trim="-1.01" speed="20.1" rpm="86" mcr="52" relative_wind="010" beaufort="3" remarks="" x_id="ea3819c61ac23ccd408f5f82dbf535acaec903c2"/>
</vessel_reports>

*** vessel_reports.rng
<?xml version="1.0" encoding="UTF-8"?>
<!--
  http://www.relaxng.org/compact-tutorial-20030326.html
  http://relaxng.org/xsd.html
  master files are RelaxNG compact syntax files ending in *.rnc
  autogeneration of XML SCHEMA, EXCEL TEMPLATE and SQL TABLE definitions
  do not edit manually the following files in this directory - they will be overwritten: 
  *.rng , *.xsd , *.xlsx , *.sql
-->
<element name="vessel_reports" xmlns:a="http://www.ange.dk/relaxng/annotation" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <a:ano title="TCC VESSEL DEPARTURES SQL TABLE"/>
  <zeroOrMore>
    <element name="vessel_report">
      <a:ano title="TCC VESSEL DEPARTURE REPORT"/>
      <optional>
        <attribute name="_id">
          <a:ano title="ID" unit="" exa="12345678901234567890" sql="BIGINT NOT NULL REFERENCES _objects"/>
          <data type="integer"/>
        </attribute>
      </optional>
      <optional>
        <!-- sql="TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()"]] -->
        <attribute name="_created">
          <a:ano title="CREATED" unit="" exa="2010-06-14T12:00:00Z"/>
          <data type="dateTime"/>
        </attribute>
      </optional>
      <optional>
        <!-- sql="TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT '3000-01-01'"]] -->
        <attribute name="_deleted">
          <a:ano title="Deleted"/>
          <data type="dateTime"/>
        </attribute>
      </optional>
      <optional>
        <!-- sql="VARCHAR(32) NOT NULL"]] -->
        <attribute name="_user">
          <a:ano title="User" unit="" exa="tccfeed"/>
          <data type="string">
            <param name="minLength">1</param>
            <param name="maxLength">128</param>
          </data>
        </attribute>
      </optional>
      <attribute name="vessel_id">
        <a:ano title="VESSEL ID" unit="" exa="NAD" xls="true" sql="VARCHAR(32) NOT NULL"/>
        <data type="string">
          <param name="minLength">1</param>
          <param name="maxLength">128</param>
        </data>
      </attribute>
      <attribute name="port_from">
        <a:ano title="PORT FROM" unit="" exa="USLAX" xls="true" sql="VARCHAR(8) NOT NULL"/>
        <data type="string">
          <param name="minLength">5</param>
          <param name="maxLength">8</param>
        </data>
      </attribute>
      <attribute name="port_to">
        <a:ano title="PORT TO" unit="" exa="USLAX" xls="true" sql="VARCHAR(8) NOT NULL"/>
        <data type="string">
          <param name="minLength">5</param>
          <param name="maxLength">8</param>
        </data>
      </attribute>
      <optional>
        <attribute name="report_number">
          <a:ano title="REPORT NUMBER" unit="" exa="3" xls="true" sql="INTEGER NOT NULL"/>
          <data type="integer"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="PERIOD">
          <a:ano title="PERIOD" unit="h" exa="P23H16M" xls="true" sql="VARCHAR(32)"/>
          <data type="string"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="voyage">
          <a:ano title="VOYAGE" unit="" exa="0410" xls="true" sql="VARCHAR(32)"/>
          <data type="string">
            <param name="minLength">1</param>
            <param name="maxLength">32</param>
          </data>
        </attribute>
      </optional>
      <optional>
        <attribute name="latitude">
          <a:ano title="LATITUDE" unit="dd mm N/S" exa="41 43 N" xls="true" sql="VARCHAR(8)"/>
          <data type="string">
            <param name="minLength">6</param>
            <param name="maxLength">8</param>
          </data>
        </attribute>
      </optional>
      <optional>
        <attribute name="longitude">
          <a:ano title="LONGITUDE" unit="dd mm E/W" exa="142 22 E" xls="true" sql="VARCHAR(8)"/>
          <data type="string">
            <param name="minLength">6</param>
            <param name="maxLength">8</param>
          </data>
        </attribute>
      </optional>
      <optional>
        <attribute name="distance_sailed">
          <a:ano title="DISTANCE SAILED" unit="nm" exa="462" xls="true" sql="FLOAT"/>
          <data type="float"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="remaining_distance">
          <a:ano title="REMAINING DISTANCE" unit="nm" exa="4500" xls="true" sql="FLOAT"/>
          <data type="float"/>
        </attribute>
      </optional>
      <optional>
        <!-- sql="TIMESTAMP"]] -->
        <attribute name="eta_next_port">
          <a:ano title="ETA NEXT PORT" unit="" exa="2010-06-14T13:00:00-05:00" xls="true" sql="VARCHAR(24)"/>
          <data type="dateTime"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="used_hfo">
          <a:ano title="USED HFO" unit="mt" exa="65.4" xls="true" sql="FLOAT"/>
          <data type="float"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="rob_hfo">
          <a:ano title="ROB HFO" unit="mt" exa="2131.3" xls="true" sql="FLOAT"/>
          <data type="float"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="used_mdo">
          <a:ano title="USED MDO" unit="mt" exa="0.0" xls="true" sql="FLOAT"/>
          <data type="float"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="rob_mdo">
          <a:ano title="ROB MDO" unit="mt" exa="102.6" xls="true" sql="FLOAT"/>
          <data type="float"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="mean_draft">
          <a:ano title="MEAN DRAFT" unit="m" exa="9.16" xls="true" sql="FLOAT"/>
          <data type="float"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="trim">
          <a:ano title="TRIM" unit="m" exa="-1.01" xls="true" sql="FLOAT"/>
          <data type="float"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="speed">
          <a:ano title="SPEED" unit="kn" exa="20.1" xls="true" sql="FLOAT"/>
          <data type="float"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="rpm">
          <a:ano title="RPM" unit="rpm" exa="86" xls="true" sql="FLOAT"/>
          <data type="float"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="mcr">
          <a:ano title="MCR" unit="%" exa="52" xls="true" sql="FLOAT"/>
          <data type="float"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="relative_wind">
          <a:ano title="RELATIVE WIND" unit="" exa="010" xls="true" sql="VARCHAR(3)"/>
          <data type="string">
            <param name="minLength">3</param>
            <param name="maxLength">3</param>
          </data>
        </attribute>
      </optional>
      <optional>
        <attribute name="beaufort">
          <a:ano title="BEAUFORT" unit="" exa="3" xls="true" sql="FLOAT"/>
          <data type="float"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="remarks">
          <a:ano title="REMARKS" unit="" exa="" xls="true" sql="TEXT"/>
          <data type="string"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="x_id">
          <a:ano title="X_ID Message ID" unit="" exa="ea3819c61ac23ccd408f5f82dbf535acaec903c2" sql="VARCHAR(128)"/>
          <data type="string">
            <param name="maxLength">128</param>
          </data>
        </attribute>
      </optional>
    </element>
  </zeroOrMore>
</element>


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (90, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libxml2-utils depends on:
ii  libc6                       2.11.2-2     Embedded GNU C Library: Shared lib
ii  libreadline6                6.1-3        GNU readline and history libraries
ii  libxml2                     2.7.7.dfsg-4 GNOME XML library

libxml2-utils recommends no packages.

libxml2-utils suggests no packages.

-- no debconf information





More information about the debian-xml-sgml-pkgs mailing list