[ 
https://issues.apache.org/jira/browse/DAFFODIL-2767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dave Thompson closed DAFFODIL-2767.
-----------------------------------

Verified the specified commit (commit a383eb942885ff9038156f4c0f252614d7eca1e3) 
is included in the latest pull from the daffodil repository.

Verified, via review, changes identified in the commit comment was implemented. 

Verified the affected daffodil subproject sbt test suite executed successfully 
including the new tests.

Verified the nightly test schemas compile and save successfully.

Verified the nightly test suite executes successfully using -I sax infoset 
option.

> Mixed content with SAX unparsing hangs coroutine thread
> -------------------------------------------------------
>
>                 Key: DAFFODIL-2767
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2767
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Back End, Unparsing
>    Affects Versions: 3.4.0
>            Reporter: Steve Lawrence
>            Assignee: Steve Lawrence
>            Priority: Major
>             Fix For: 3.5.0
>
>
> When unparsing with the SAX API, we spawn a new thread and run the unparse() 
> call in that using our custom coroutine implementation. The main SAX thread 
> and the coroutine unparse thread() using an ArrayBlockingQueue to suspend 
> execution of one subroutine while the other executes.
> However, if the main thread throws an exception then it leaves the corutine 
> unparse() thread hung, blocked on the ArrayBlockingQueue.
> This is exactly what happens if there is mixed content in the infoset we are 
> unparsing. If mixed content is detected in the DaffodilUnparseContentHander 
> startElement function then, then we throw an exception that can be caught by 
> the SAX API, but the unparse thread is still running and blocked.
> One option is to modify the startElement() function in the main thread to add 
> state to a SAXEvent when it detects mixed content. When the unparse thread 
> sees this state it can cause the unparse() thread to finish by throwing an 
> exception. This will create an UnparseResult that eventually is passed back 
> to the main thread and coroutine logic can finish.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to