You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/09/15 12:11:00 UTC
[jira] [Commented] (IGNITE-6394) Can't create off-heap matrix with
size over 2 Gb (int overflow in DenseOffHeapMatrixStorage.allocateMemory)
[ https://issues.apache.org/jira/browse/IGNITE-6394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16167787#comment-16167787 ]
ASF GitHub Bot commented on IGNITE-6394:
----------------------------------------
GitHub user ybabak opened a pull request:
https://github.com/apache/ignite/pull/2671
IGNITE-6394: Can't create off-heap matrix with size over 2 Gb
Fixed int overflow.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gridgain/apache-ignite ignite-6394
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/ignite/pull/2671.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2671
----
commit c0b5f9f7a83f110cf2036a3e654690929797d199
Author: Yury Babak <yb...@gridgain.com>
Date: 2017-09-15T11:40:54Z
IGNITE-6394: Can't create off-heap matrix with size over 2 Gb (int overflow in DenseOffHeapMatrixStorage.allocateMemory)
Fixed.
----
> Can't create off-heap matrix with size over 2 Gb (int overflow in DenseOffHeapMatrixStorage.allocateMemory)
> -----------------------------------------------------------------------------------------------------------
>
> Key: IGNITE-6394
> URL: https://issues.apache.org/jira/browse/IGNITE-6394
> Project: Ignite
> Issue Type: Bug
> Components: ml
> Reporter: Oleg Ignatenko
> Assignee: Yury Babak
>
> In order to reproduce, try to create off-heap matrix with size larger than 2Gb, eg like this:
> {code}new DenseLocalOffHeapMatrix(17_000, 17_000){code}
> Above fails:
> {noformat}
> java.lang.IllegalArgumentException: null
> at sun.misc.Unsafe.allocateMemory(Native Method)
> at org.apache.ignite.internal.util.GridUnsafe.allocateMemory(GridUnsafe.java:1068)
> at org.apache.ignite.ml.math.impls.storage.matrix.DenseOffHeapMatrixStorage.allocateMemory(DenseOffHeapMatrixStorage.java:219)
> ...
> {noformat}
> (you may need to allow Java get more than 2Gb off-heap memory for that with VM argument like {{-XX:MaxDirectMemorySize=1000g}})
> The reason for failure is that int arguments aren't converted to long prior to multiplying in {{DenseOffHeapMatrixStorage.allocateMemory}}:
> {code}ptr = GridUnsafe.allocateMemory(rows * cols * Double.BYTES);{code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)