ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-8755) NegativeArraySizeException when trying to serialize in GridClientOptimizedMarshaller humongous object
Date Fri, 15 Jun 2018 10:21:00 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-8755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16513643#comment-16513643
] 

ASF GitHub Bot commented on IGNITE-8755:
----------------------------------------

GitHub user ivandasch opened a pull request:

    https://github.com/apache/ignite/pull/4196

    IGNITE-8755: If size is too big and left shift can cause arithmetic o…

    …veflow, just allocate bytes for required size. So NegativeArrayException will never
throw

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ivandasch/ignite ignite-8755

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ignite/pull/4196.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 #4196
    
----
commit 0a77d3d2cd9713669e756078f0231faee743c7c1
Author: Ivan Daschinskiy <ivandasch@...>
Date:   2018-06-15T10:16:40Z

    IGNITE-8755: If size is too big and left shift can cause arithmetic oveflow, just allocate
bytes for required size.

----


> NegativeArraySizeException when trying to serialize in GridClientOptimizedMarshaller
humongous object
> -----------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-8755
>                 URL: https://issues.apache.org/jira/browse/IGNITE-8755
>             Project: Ignite
>          Issue Type: Bug
>          Components: binary
>    Affects Versions: 2.5
>            Reporter: Ivan Daschinskiy
>            Assignee: Ivan Daschinskiy
>            Priority: Major
>             Fix For: 2.6
>
>
> When trying to serialize humongous object in GridClientOptimizedMarshaller, NegativeArraySizeException
thrown. See below
> {code:java}
> java.io.IOException: class org.apache.ignite.IgniteCheckedException: Failed to serialize
object: GridClientResponse [clientId=null, reqId=0, destId=null, status=0, errMsg=null, result=org.apache.ignite.internal.processors.rest.protocols.tcp.TcpRestParserSelfTest$HugeObject@60a582c1]
> 	at org.apache.ignite.internal.client.marshaller.optimized.GridClientOptimizedMarshaller.marshal(GridClientOptimizedMarshaller.java:101)
> 	at org.apache.ignite.internal.processors.rest.protocols.tcp.TcpRestParserSelfTest.testHugeObject(TcpRestParserSelfTest.java:103)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:498)
> 	at junit.framework.TestCase.runTest(TestCase.java:176)
> 	at org.apache.ignite.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:2086)
> 	at org.apache.ignite.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:140)
> 	at org.apache.ignite.testframework.junits.GridAbstractTest$5.run(GridAbstractTest.java:2001)
> 	at java.lang.Thread.run(Thread.java:748)
> Caused by: class org.apache.ignite.IgniteCheckedException: Failed to serialize object:
GridClientResponse [clientId=null, reqId=0, destId=null, status=0, errMsg=null, result=org.apache.ignite.internal.processors.rest.protocols.tcp.TcpRestParserSelfTest$HugeObject@60a582c1]
> 	at org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller.marshal0(OptimizedMarshaller.java:206)
> 	at org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.marshal(AbstractNodeNameAwareMarshaller.java:58)
> 	at org.apache.ignite.internal.util.IgniteUtils.marshal(IgniteUtils.java:10059)
> 	at org.apache.ignite.internal.client.marshaller.optimized.GridClientOptimizedMarshaller.marshal(GridClientOptimizedMarshaller.java:88)
> 	... 10 more
> Caused by: java.lang.NegativeArraySizeException
> 	at org.apache.ignite.internal.util.io.GridUnsafeDataOutput.requestFreeSize(GridUnsafeDataOutput.java:131)
> 	at org.apache.ignite.internal.util.io.GridUnsafeDataOutput.write(GridUnsafeDataOutput.java:166)
> 	at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectOutputStream.write(OptimizedObjectOutputStream.java:142)
> 	at org.apache.ignite.internal.processors.rest.protocols.tcp.TcpRestParserSelfTest$HugeObject.writeExternal(TcpRestParserSelfTest.java:122)
> 	at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectOutputStream.writeExternalizable(OptimizedObjectOutputStream.java:319)
> 	at org.apache.ignite.internal.marshaller.optimized.OptimizedClassDescriptor.write(OptimizedClassDescriptor.java:814)
> 	at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectOutputStream.writeObject0(OptimizedObjectOutputStream.java:242)
> 	at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectOutputStream.writeObjectOverride(OptimizedObjectOutputStream.java:159)
> 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
> 	at org.apache.ignite.internal.processors.rest.client.message.GridClientResponse.writeExternal(GridClientResponse.java:103)
> 	at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectOutputStream.writeExternalizable(OptimizedObjectOutputStream.java:319)
> 	at org.apache.ignite.internal.marshaller.optimized.OptimizedClassDescriptor.write(OptimizedClassDescriptor.java:814)
> 	at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectOutputStream.writeObject0(OptimizedObjectOutputStream.java:242)
> 	at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectOutputStream.writeObjectOverride(OptimizedObjectOutputStream.java:159)
> 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
> 	at org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller.marshal0(OptimizedMarshaller.java:201)
> {code}
> The main cause of this that GridClientOptimizedMarshaller marshall object through OptimizedMarshaller
without backed OutputStream, so arithmetical overflow occurs in GridUnsafeDataOutput.requestFreeSize.




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message