Mike Beckerle created DAFFODIL-2614:
---------------------------------------

             Summary: assert failure in schema-defined layer transform appears 
to be a Daffodil bug
                 Key: DAFFODIL-2614
                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2614
             Project: Daffodil
          Issue Type: Bug
          Components: Back End
    Affects Versions: 3.2.1
            Reporter: Mike Beckerle


Got this backtrace below when trying to parse a PCAP 2.4 file. 

This comes from the IPv4Checksum computation, which is a layer transformer 
defined as part of the EthernetIP DFDL schema.

This exception needs to be caught, so that it can be distinguished from a 
Daffodil bug. This bug is in the layer transformer, and the message should be 
clear about that, and point the user at the schema's layer transformer without 
the user having to interpret the backtrace. 

 

```
 cat 'FOUO - BData.pcap' | daffodil parse -s 
../../dataiti/git/dfdl-schemas/dfdl-pcap/src/main/resources/com/tresys/pcap/xsd/pcap.dfdl.xsd
 --

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!   An unexpected exception occurred. This is a bug!   !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 Please report this bug and help us fix it:

  https://daffodil.apache.org/community/#issue-tracker

 Please include the following exception, the command you
 ran, and any input, schema, or tdml files used that led
 to this bug.


org.apache.daffodil.exceptions.Abort: Invariant broken: 
checksumTotal.<=(65535).&&(checksumTotal.>=(0))
org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:137)
com.owlcyberdefense.dfdl.IPv4Checksum.compute(IPv4Checksum.scala:74)
com.owlcyberdefense.dfdl.IPv4Checksum.compute(IPv4Checksum.scala:35)
org.apache.daffodil.layers.ByteBufferExplicitLengthLayerTransform.startLayerForParse(LayerTransformer.scala:361)
    at org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:137)
    at com.owlcyberdefense.dfdl.IPv4Checksum.compute(IPv4Checksum.scala:74)
    at com.owlcyberdefense.dfdl.IPv4Checksum.compute(IPv4Checksum.scala:35)
    at 
org.apache.daffodil.layers.ByteBufferExplicitLengthLayerTransform.startLayerForParse(LayerTransformer.scala:361)
    at 
org.apache.daffodil.processors.parsers.LayeredSequenceParser.parse(LayeredSequenceParser.scala:51)
    at org.apache.daffodil.processors.parsers.Parser.parse1(Parser.scala:82)
    at org.apache.daffodil.processors.parsers.Parser.parse1$(Parser.scala:76)
    at 
org.apache.daffodil.processors.parsers.CombinatorParser.parse1(Parser.scala:161)
    at 
org.apache.daffodil.processors.parsers.Unseparated.parseOne(UnseparatedSequenceParsers.scala:29)
```



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to