Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-924

Intermittent "Out of Range" error in multi-threaded runner

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • s13
    • s13
    • Back End
    • None

      I'm seeing a very strange error when testing my multi-threaded runner changes. When trying to parse a single-line csv file twice, once in each thread, 5 times out of 10 it works. I get two full xml result trees and no errors. However, 4 of the other times, I get this error (for both threads). Note that this output prints out the thread number in each thread, then the input data (byte array) that is being used for the parse:

      [dfdl] (0.13.0)$ ./daffodil-cli/target/start performance -s ../ngf-dfdl/daffodil-perf/src/test/resources/edu/illinois/ncsa/daffodil/csvMixedNarrow/csvMixedNarrow.dfdl.xsd ../ngf-dfdl/daffodil-perf/src/test/resources/edu/illinois/ncsa/daffodil/csvMixedNarrow/test.txt
      inside: 2
      inside: 1
      newArr: Krakens,361-79-9964,w.Krakens9597@gmail.com,http://www.Krakens.com/,1944-07-20,301,blue
       
      newArr: Krakens,361-79-9964,w.Krakens9597@gmail.com,http://www.Krakens.com/,1944-07-20,301,blue
       
      [error] Parse Error: Convert to Integer (for xs:int): Out of Range: '301' converted to 330.01, is not in range for the type.
      Schema context: element.weight Location line 69 column 56 in file:/home/jchab/NGF/dfdl/../ngf-dfdl/daffodil-perf/src/test/resources/edu/illinois/ncsa/daffodil/csvMixedNarrow/csvMixedNarrow.dfdl.xsd
      Data location was preceding byte 82
      UTF-8 text starting at byte 80 is: (01,blue
      )
      Data (hex) starting at byte 80 is: (0x30312C626C75650A)
      [error] Parse Error: Convert to Integer (for xs:int): Out of Range: '301' converted to 330.01, is not in range for the type.
      Schema context: element.weight Location line 69 column 56 in file:/home/jchab/NGF/dfdl/../ngf-dfdl/daffodil-perf/src/test/resources/edu/illinois/ncsa/daffodil/csvMixedNarrow/csvMixedNarrow.dfdl.xsd
      Data location was preceding byte 82
      UTF-8 text starting at byte 80 is: (01,blue
      )
      Data (hex) starting at byte 80 is: (0x30312C626C75650A)

      the other 1 time out of 10, I saw this:

      [dfdl] (0.13.0)$ ./daffodil-cli/target/start performance -s ../ngf-dfdl/daffodil-perf/src/test/resources/edu/illinois/ncsa/daffodil/csvMixedNarrow/csvMixedNarrow.dfdl.xsd ../ngf-dfdl/daffodil-perf/src/test/resources/edu/illinois/ncsa/daffodil/csvMixedNarrow/test.txt
      inside: 2
      newArr: Krakens,361-79-9964,w.Krakens9597@gmail.com,http://www.Krakens.com/,1944-07-20,301,blue
       
      inside: 1
      newArr: Krakens,361-79-9964,w.Krakens9597@gmail.com,http://www.Krakens.com/,1944-07-20,301,blue
       
      [error] Parse Error: Expression evaluation failed. Details: javax.xml.xpath.XPathExpressionException: State not bound for use by DFDL expression functions.
      Schema context: element.website Location line 54 column 42 in file:/home/jchab/NGF/dfdl/../ngf-dfdl/daffodil-perf/src/test/resources/edu/illinois/ncsa/daffodil/csvMixedNarrow/csvMixedNarrow.dfdl.xsd(no data location)
      <ex:file xmlns:ex="http://www.example.org/example1/">
        <ex:record>
          <ex:last>Krakens</ex:last>
          <ex:ssn>361-79-9964</ex:ssn>
          <ex:email>w.Krakens9597@gmail.com</ex:email>
          <ex:website>http://www.Krakens.com/</ex:website>
          <ex:DOB>1944-07-20+00:00</ex:DOB>
          <ex:weight>301</ex:weight>
          <ex:eyeColor>blue</ex:eyeColor>
        </ex:record>
      </ex:file>

      where one thread parsed the data successfully but the other erred out.

      I've included the schema, input file, and CLI patch that I have been using.

          1. cli_perf.patch
            8 kB
            Jessie Chab
          2. csvMixedNarrow.dfdl.xsd
            4 kB
            Jessie Chab
          3. peopleData_1k.txt
            1 kB
            Jessie Chab
          4. test.txt
            0.1 kB
            Jessie Chab

              jchab Jessie Chab
              jchab Jessie Chab
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 1 minute
                  1m