accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Tubbs (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-3038) java.lang.RuntimeException: java.io.InvalidClassException: org.apache.accumulo.trace.thrift.TInfo; local class incompatible
Date Tue, 16 Sep 2014 13:47:34 GMT

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

Christopher Tubbs commented on ACCUMULO-3038:
---------------------------------------------

I just looked into this a bit. I'm very surprised we're using Java Serializable/ObjectOutputStream
for fate objects, especially since it requires serializing a bunch of referenced thrift classes.
The TInfo class was regenerated and changed in ACCUMULO-2773. Using Java Serializable is pretty
risky for generated classes, which cannot be strictly checked for compatibility in serialization.
We regenerate these classes all the time, even with compatible changes. Thrift doesn't even
bother setting its own serialVersionUID in the generated classes, so it is computed from the
class and can change quite easily.

I didn't follow through all the code in fate, but I believe this happens when there are outstanding
fate operations? I'm not sure there's anything special about downgrades, though. I think it
could have happened on upgrade also. I'm actually surprised we didn't hit this sooner... in
1.4.x or 1.5.x upgrades.

> java.lang.RuntimeException: java.io.InvalidClassException: org.apache.accumulo.trace.thrift.TInfo;
local class incompatible
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ACCUMULO-3038
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-3038
>             Project: Accumulo
>          Issue Type: Bug
>          Components: fate
>    Affects Versions: 1.6.0
>            Reporter: Josh Elser
>            Priority: Blocker
>             Fix For: 1.6.1
>
>
> {noformat}
> 2014-08-01 14:37:38,278 [fate.Fate] ERROR: Thread "Repo runner 0" died java.lang.RuntimeException:
java.io.InvalidClassException: org.apache.accumulo.trace.thrift.TInfo; local class incompatible:
stream classdesc serialVersionUID = -8521079672965073252, local class serialVersionUID = -4659975753252858243idClassException:
org.apache.accumulo.trace.thrift.TInfo; local class incompatible: stream classdesc serialVersionUID
= -8521079672965073252, local class serialVersionUID = -4659975753252858243mulo.fate.ZooStore.top(ZooStore.java:266)
>         at org.apache.accumulo.fate.AgeOffStore.top(AgeOffStore.java:172)
>         at org.apache.accumulo.fate.Fate$TransactionRunner.run(Fate.java:58)
>         at org.apache.accumulo.fate.util.LoggingRunnable.run(LoggingRunnable.java:34)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.RuntimeException: java.io.InvalidClassException: org.apache.accumulo.trace.thrift.TInfo;
local class incompatible: stream classdesc serialVersionUID = -8521079672965073252, local
class serialVersionUID = -4659975753252858243t org.apache.accumulo.fate.ZooStore.deserialize(ZooStore.java:79)
>         at org.apache.accumulo.fate.ZooStore.top(ZooStore.java:262)
>         ... 4 more
> Caused by: java.io.InvalidClassException: org.apache.accumulo.trace.thrift.TInfo; local
class incompatible: stream classdesc serialVersionUID = -8521079672965073252, local class
serialVersionUID = -4659975753252858243
>         at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:617)
>         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1622)
>         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517)
>         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
>         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
>         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
>         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)
>         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
>         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
>         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
>         at org.apache.accumulo.fate.ZooStore.deserialize(ZooStore.java:77)
>         ... 5 more
> {noformat}
> I'm not entirely positive what happened yet, but I believe the following is what happened.
> # Started up 1.6.0, loaded some data
> # Stopped 1.6.0
> # Started up 1.6.1-SNAPSHOT over the same instance to test some new code I was writing
> # Stopped 1.6.1-SNAPSHOT
> # Re-started 1.6.0 to run a demo
> # Above error
> My guess is that this is from the thrift 0.9.0 to 0.9.1 change for 1.6.1, which means
that 1.6.1 cannot presently downgrade back to 1.6.0. I need to do some more testing to be
sure, though.



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

Mime
View raw message