You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Marshall Schor (JIRA)" <de...@uima.apache.org> on 2012/12/06 15:23:09 UTC
[jira] [Commented] (UIMA-2515) Need better workaround for
intermittent out-of-stack in Arrays.sort for compressed binary
serialization
[ https://issues.apache.org/jira/browse/UIMA-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13511408#comment-13511408 ]
Marshall Schor commented on UIMA-2515:
--------------------------------------
I tracked this down by experimentation to an apparent JIT compilation problem. I found a viable workaround was to increase the retry count to 20 from 2, and I dropped the array reverse operation - since it's not really related to the order of elements. My test case did the first 1 or 2 Arrays.sort operations without error, then the Jit (#1) kicked in, and it got out-of-stack for the next instance. After retrying this sort call 5 times, it started working (I'm guessing that JIT (#2) was done), and never failed after that.
I've opened a problem report against this version of Java. (As of version 7, Java changed its sort algorithm, and that other algorithm doesn't seem to suffer from this issue.)
> Need better workaround for intermittent out-of-stack in Arrays.sort for compressed binary serialization
> -------------------------------------------------------------------------------------------------------
>
> Key: UIMA-2515
> URL: https://issues.apache.org/jira/browse/UIMA-2515
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.4.0SDK
> Environment: Windows, Linux, IBM Java 5 and 6 (not 7, not Sun/Oracle)
> Reporter: Marshall Schor
> Assignee: Marshall Schor
> Fix For: 2.4.1SDK
>
>
> On IBM Java 6, there is an occasional failure in Arrays.sort used to sort the strings in the heap. The failure is an out-of-stack-space error. It is very intermittent. I had earlier seen this, and had wrapped the call to Arrays.sort in a try/catch loop which caught the out-of-stack-space. The code would retry this once, after reversing the array (thinking this would change things to avoid the out-of-memory). In further extensive use, this error has popped up again, even with this retry. Need a better workaround.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira