You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Tim Allison (Jira)" <ji...@apache.org> on 2020/04/14 18:48:00 UTC
[jira] [Commented] (TIKA-3092) Apparent multithreading bug in HWP5
parser
[ https://issues.apache.org/jira/browse/TIKA-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17083526#comment-17083526 ]
Tim Allison commented on TIKA-3092:
-----------------------------------
Ok. This one is spooky...props to anyone who can figure out what's going on. I have a fix, but no explanation as to why this fix works.
The symptom was that we were getting different text when running multithreaded than when running in a single thread.
In the HwpStreamReader, we use Java's InflaterInputStream with an Inflater to wrap compressed inputstreams -- as a side note, I confirmed there is no diff btwn Java and commons-compress.
We were calling POI IOUtil's ensureSkip which uses a static byte array buffer to read off the right number of bytes. When I switched that to use an instance byte array buffer for reading/skipping, the problem went away.
This seems to work in both Java 8 and Java 13. I can't explain the fix, and I can't explain why we haven't seen this problem before.
> Apparent multithreading bug in HWP5 parser
> ------------------------------------------
>
> Key: TIKA-3092
> URL: https://issues.apache.org/jira/browse/TIKA-3092
> Project: Tika
> Issue Type: Task
> Reporter: Tim Allison
> Assignee: Tim Allison
> Priority: Major
>
> We got some weird behavior in the most recent regression tests for 1.24.1 on HWP5 files. When I ran MultiThreadedTikaTest on .hwp files, I was able to confirm we get different output when running multithreaded.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)