[ 
https://issues.apache.org/jira/browse/DAFFODIL-2626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17486512#comment-17486512
 ] 

Steve Lawrence edited comment on DAFFODIL-2626 at 2/3/22, 2:13 PM:
-------------------------------------------------------------------

(EDIT: This comment was made at the same time as Mike's above comment, some if 
it may not apply, maybe only complex types would need this restriction an if 
global model groups can have alignment properties)

Maybe we can add an additional restriction for refers to the other global 
types. I'm thinking these two restrictions would do it:
 # References to global element declarations must have the same alignment 
properties as the global element declarations (this is the same as before)
 # References to complex types or global choice/sequence declarations must have 
the same alignment properties as defined by the in-scope dfdl:format for the 
complex type and global declarations

With this new restriction, we are essentially saying that complex types and 
global choice/sequence declarations have an implied alignment that is the same 
as the default alignment for the schema file. And it cannot be changed, even by 
references.

This feels much more restrictive, but it still feels like it might be 
acceptable. And it should allow our alignment optimization algorithm to make an 
assumption about the alignment of global element decls, global model group 
decls, and complex types without explicitly knowing the alignment of the 
references.

 


was (Author: slawrence):
Maybe we can add an additional restriction for refers to the other global 
types. I'm thinking these two restrictions would do it:
 # References to global element declarations must have the same alignment 
properties as the global element declarations (this is the same as before)
 # References to complex types or global choice/sequence declarations must have 
the same alignment properties as defined by the in-scope dfdl:format for the 
complex type and global declarations

With this new restriction, we are essentially saying that complex types and 
global choice/sequence declarations have an implied alignment that is the same 
as the default alignment for the schema file. And it cannot be changed, even by 
references.

This feels much more restrictive, but it still feels like it might be 
acceptable. And it should allow our alignment optimization algorithm to make an 
assumption about the alignment of global element decls, global model group 
decls, and complex types without explicitly knowing the alignment of the 
references.

 

> Circular deadlock when computing stored length around prefixed-length elements
> ------------------------------------------------------------------------------
>
>                 Key: DAFFODIL-2626
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2626
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Back End
>    Affects Versions: 3.2.1
>            Reporter: Mike Beckerle
>            Assignee: Steve Lawrence
>            Priority: Critical
>
> I have a small schema with a messageLength element as the first element, 
> which has outputValueCalc on the message payload.
> The message payload contains prefixed-length strings.
> I get a deadlock on unparsing:
> {code}
> org.apache.daffodil.tdml.TDMLExceptionImpl: (Implementation: daffodil) 
> SuspensionDeadlockException: Runtime Schema Definition Error: 
> Expressions/Unparsers are circularly deadlocked (mutually defined):
>  - SimpleTypeRetryUnparserSuspendableOperation for messageLength
>  - ElementUnusedUnparserSuspendableOperation for payload
>  - AlignmentFillUnparserSuspendableOperation for address
> Schema context: messageLength Location line 59 column 18 in 
> file:/tmp/s__3044777217024912267.dfdl.xsd
> Data location was preceding byte 0
> {code}
> See test test_computedLengthAroundPrefixedLengths1u
> Test test_computedLengthAroundPrefixedLengths1p is the same thing, just 
> testing the parse direction.



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

Reply via email to