flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Palumbo (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLINK-3762) Kryo StackOverflowError due to disabled Kryo Reference tracking
Date Thu, 14 Apr 2016 18:00:29 GMT
Andrew Palumbo created FLINK-3762:
-------------------------------------

             Summary:  Kryo StackOverflowError due to disabled Kryo Reference tracking
                 Key: FLINK-3762
                 URL: https://issues.apache.org/jira/browse/FLINK-3762
             Project: Flink
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.0.1
            Reporter: Andrew Palumbo
             Fix For: 1.0.2


As discussed on the dev list,

In {{KryoSerializer.java}}

Kryo Reference tracking is disabled by default:

{code}
    kryo.setReferences(false);
{code}

This can causes  {{StackOverflowError}} Exceptions when serializing many objects that may
contain recursive objects:

{code}
java.lang.StackOverflowError
	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:48)
	at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:495)
	at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:523)
	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:61)
	at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:495)
	at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:523)
	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:61)
	at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:495)
	at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:523)
	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:61)
	at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:495)
{code}

By enabling reference tracking, we can fix this problem.

[1]https://gist.github.com/andrewpalumbo/40c7422a5187a24cd03d7d81feb2a419
 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message