[
https://issues.apache.org/jira/browse/DAFFODIL-3002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Steve Lawrence resolved DAFFODIL-3002.
--------------------------------------
Fix Version/s: 4.0.0
Resolution: Fixed
Fixed in commit a79f185dea7342b53b31260c2b13c50458e6dbc2
> CLI reading/writing a fifo file fails with 0 bytes available error
> ------------------------------------------------------------------
>
> Key: DAFFODIL-3002
> URL: https://issues.apache.org/jira/browse/DAFFODIL-3002
> Project: Daffodil
> Issue Type: Bug
> Components: CLI
> Affects Versions: 3.9.0, 3.10.0
> Reporter: Steve Lawrence
> Priority: Major
> Fix For: 4.0.0
>
>
> Daffodil 3.9.0 modified the CLI so that it would mmap file inputs, which
> gives pretty significant performance improvements for large files
> (DAFFODIL-2921). However, this does not properly detect that the file is
> actually normal file where mmaping works.
> For example, if you try to use a fifo file as the input like this:
> {code}
> daffodil parse -s ... fifo_file
> {code}
> Then we end up mmaping zero bytes (because a fifo file has a length of zero),
> and daffodil will have zero bytes available for parsing.
> We should fix our CLI so it detects if a file is a normal file, and if not
> fall back to the normal non-mmap processing.
> A workaround to disable mmap in the CLI is to parse data from stdin. For
> example, the above can be replaced with this:
> {code}
> daffodil parse -s ... < fifo_file
> {code}
> This does make it impossible to debug data from a fifo file since the CLI
> debugger uses stdin for debugger commands, so this does need a more permanent
> fix.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)