Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.4.0
-
None
Description
This could occur when putting pdx into a partitioned region in a transaction.
Here is a failed stack with a newly added unit test.
[vm0] [info 2017/10/23 16:46:20.857 PDT <RMI TCP Connection(1)-127.0.0.1> tid=19] Got result: EXCEPTION_OCCURRED [vm0] org.apache.geode.ToDataException: toData failed on PdxSerializable class org.apache.geode.pdx.SimpleClass [vm0] at org.apache.geode.internal.InternalDataSerializer.writePdx(InternalDataSerializer.java:3007) [vm0] at org.apache.geode.internal.InternalDataSerializer.basicWriteObject(InternalDataSerializer.java:2077) [vm0] at org.apache.geode.DataSerializer.writeObject(DataSerializer.java:2936) [vm0] at org.apache.geode.internal.tcp.MsgStreamer.writeAsSerializedByteArray(MsgStreamer.java:926) [vm0] at org.apache.geode.DataSerializer.writeObjectAsByteArray(DataSerializer.java:1302) [vm0] at org.apache.geode.internal.cache.DistributedCacheOperation.writeValue(DistributedCacheOperation.java:125) [vm0] at org.apache.geode.internal.cache.partitioned.PutMessage.toData(PutMessage.java:623) [vm0] at org.apache.geode.internal.InternalDataSerializer.invokeToData(InternalDataSerializer.java:2299) [vm0] at org.apache.geode.internal.InternalDataSerializer.writeDSFID(InternalDataSerializer.java:1406) [vm0] at org.apache.geode.internal.tcp.MsgStreamer.writeMessage(MsgStreamer.java:232) [vm0] at org.apache.geode.distributed.internal.direct.DirectChannel.sendToMany(DirectChannel.java:377) [vm0] at org.apache.geode.distributed.internal.direct.DirectChannel.sendToOne(DirectChannel.java:237) [vm0] at org.apache.geode.distributed.internal.direct.DirectChannel.send(DirectChannel.java:603) [vm0] at org.apache.geode.distributed.internal.membership.gms.mgr.GMSMembershipManager.directChannelSend(GMSMembershipManager.java:1714) [vm0] at org.apache.geode.distributed.internal.membership.gms.mgr.GMSMembershipManager.send(GMSMembershipManager.java:1904) [vm0] at org.apache.geode.distributed.internal.DistributionChannel.send(DistributionChannel.java:82) [vm0] at org.apache.geode.distributed.internal.DistributionManager.sendOutgoing(DistributionManager.java:3464) [vm0] at org.apache.geode.distributed.internal.DistributionManager.sendMessage(DistributionManager.java:3501) [vm0] at org.apache.geode.distributed.internal.DistributionManager.putOutgoing(DistributionManager.java:1877) [vm0] at org.apache.geode.internal.cache.partitioned.PutMessage.send(PutMessage.java:386) [vm0] at org.apache.geode.internal.cache.PartitionedRegion.putRemotely(PartitionedRegion.java:3190) [vm0] at org.apache.geode.internal.cache.tx.PartitionedTXRegionStub.putEntry(PartitionedTXRegionStub.java:367) [vm0] at org.apache.geode.internal.cache.TXStateStub.putEntry(TXStateStub.java:525) [vm0] at org.apache.geode.internal.cache.TXStateProxyImpl.putEntry(TXStateProxyImpl.java:577) [vm0] at org.apache.geode.internal.cache.LocalRegion.basicPut(LocalRegion.java:5030) [vm0] at org.apache.geode.internal.cache.LocalRegion.validatedPut(LocalRegion.java:1574) [vm0] at org.apache.geode.internal.cache.LocalRegion.put(LocalRegion.java:1561) [vm0] at org.apache.geode.internal.cache.AbstractRegion.put(AbstractRegion.java:325) [vm0] at org.apache.geode.pdx.PdxSerializableDUnitTest.doSimplePut(PdxSerializableDUnitTest.java:433) [vm0] at org.apache.geode.pdx.PdxSerializableDUnitTest.lambda$5(PdxSerializableDUnitTest.java:113) [vm0] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [vm0] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [vm0] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [vm0] at java.lang.reflect.Method.invoke(Method.java:498) [vm0] at hydra.MethExecutor.executeObject(MethExecutor.java:245) [vm0] at org.apache.geode.test.dunit.standalone.RemoteDUnitVM.executeMethodOnObject(RemoteDUnitVM.java:70) [vm0] at sun.reflect.GeneratedMethodAccessor162.invoke(Unknown Source) [vm0] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [vm0] at java.lang.reflect.Method.invoke(Method.java:498) [vm0] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357) [vm0] at sun.rmi.transport.Transport$1.run(Transport.java:200) [vm0] at sun.rmi.transport.Transport$1.run(Transport.java:197) [vm0] at java.security.AccessController.doPrivileged(Native Method) [vm0] at sun.rmi.transport.Transport.serviceCall(Transport.java:196) [vm0] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) [vm0] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826) [vm0] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683) [vm0] at java.security.AccessController.doPrivileged(Native Method) [vm0] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682) [vm0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [vm0] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [vm0] at java.lang.Thread.run(Thread.java:748) [vm0] Caused by: java.lang.IllegalStateException: Current thread has paused its transaction so it can not start a new transaction [vm0] at org.apache.geode.internal.cache.TXManagerImpl.begin(TXManagerImpl.java:322) [vm0] at org.apache.geode.pdx.internal.PeerTypeRegistration.updateRegion(PeerTypeRegistration.java:422) [vm0] at org.apache.geode.pdx.internal.PeerTypeRegistration.updateIdToEnumRegion(PeerTypeRegistration.java:403) [vm0] at org.apache.geode.pdx.internal.PeerTypeRegistration.getEnumId(PeerTypeRegistration.java:647) [vm0] at org.apache.geode.pdx.internal.TypeRegistry.getEnumId(TypeRegistry.java:367) [vm0] at org.apache.geode.internal.InternalDataSerializer.writePdxEnum(InternalDataSerializer.java:2139) [vm0] at org.apache.geode.internal.InternalDataSerializer.writeUserObject(InternalDataSerializer.java:1529) [vm0] at org.apache.geode.internal.InternalDataSerializer.writeWellKnownObject(InternalDataSerializer.java:1437) [vm0] at org.apache.geode.internal.InternalDataSerializer.basicWriteObject(InternalDataSerializer.java:2102) [vm0] at org.apache.geode.pdx.internal.PdxOutputStream.writeObject(PdxOutputStream.java:82) [vm0] at org.apache.geode.pdx.internal.PdxWriterImpl.writeObject(PdxWriterImpl.java:329) [vm0] at org.apache.geode.pdx.internal.PdxWriterImpl.writeObject(PdxWriterImpl.java:319) [vm0] at org.apache.geode.pdx.SimpleClass.toData(SimpleClass.java:44) [vm0] at org.apache.geode.internal.InternalDataSerializer.writePdx(InternalDataSerializer.java:2977) [vm0] ... 51 more [vm0] from org.apache.geode.pdx.PdxSerializableDUnitTest$$Lambda$56/169225437.run with 0 args on object: org.apache.geode.pdx.PdxSerializableDUnitTest$$Lambda$56/169225437@10407b36 (took 83 ms)