[
https://issues.jboss.org/browse/ISPN-2553?page=com.atlassian.jira.plugin....
]
RH Bugzilla Integration commented on ISPN-2553:
-----------------------------------------------
Radim Vansa <rvansa(a)redhat.com> made a comment on [bug
880528|https://bugzilla.redhat.com/show_bug.cgi?id=880528]
The JBossMarshaller can be used before its start() method is called. I've noticed that
with replicated cache without transactions, an OOB thread can start demarshalling
SingleRpcCommand in CacheRpcCommandExternalizer but when it tries to create a new
unmarshaller (through AbstractJBossMarshaller.startObjectInput(...) and the
marshallerTL.initialValue() the baseCfg configuration is not fully initialized yet and
this results in creating marshallers in PerThreadInstanceHolder with objectTable == null.
Then, objects are deserialized to null (which results in NullPointerExceptions
elsewhere).
JBossMarshaller can be used before properly initialized
-------------------------------------------------------
Key: ISPN-2553
URL:
https://issues.jboss.org/browse/ISPN-2553
Project: Infinispan
Issue Type: Bug
Components: Marshalling
Affects Versions: 5.2.0.Beta4
Reporter: Radim Vansa
Assignee: Galder Zamarreño
The {{JBossMarshaller}} can be used before its {{start()}} method is called. I've
noticed that with replicated cache without transactions, an OOB thread can start
demarshalling {{SingleRpcCommand}} in {{CacheRpcCommandExternalizer}} but when it tries to
create a new unmarshaller (through {{AbstractJBossMarshaller.startObjectInput(...)}} and
the {{marshallerTL.initialValue()}} the {{baseCfg}} configuration is not fully initialized
yet and this results in creating marshallers in {{PerThreadInstanceHolder}} with
{{objectTable == null}}. Then, objects are deserialized to {{null}}.
I have verified this by inserting some log messages into constructors and start method:
{code}
19:49:02,404 INFO [org.infinispan.marshall.jboss.AbstractJBossMarshaller]
(pool-1-thread-1) Creating AbstractJBossMarshaller with
org.jboss.marshalling.MarshallingConfiguration@1d296aa3: classExternalizerFactor
y=<org.infinispan.marshall.jboss.SerializeWithExtFactory@a18024a>
exceptionListener=<null> instanceCount=16 classCount=8 bufferSize=512 version=3
19:49:02,409 INFO [org.infinispan.marshall.jboss.AbstractJBossMarshaller]
(pool-1-thread-1) Creating JBossMarshaller
org.infinispan.marshall.jboss.JBossMarshaller@2e3e4d73
19:49:02,410 INFO [org.infinispan.marshall.jboss.AbstractJBossMarshaller]
(pool-1-thread-1) Starting JBossMarshaller
{code}
and into the thread-local initialization and to {{getUnmarshaller()}} just before
{{factory.createUnmarshaller}}:
{code}
19:49:02,410 ERROR [org.infinispan.marshall.jboss.AbstractJBossMarshaller]
(OOB-49,rvansa-22965) No object table in
org.jboss.marshalling.MarshallingConfiguration@7c4ed0bc:
classExternalizerFactory=<org.infinisp
an.marshall.jboss.SerializeWithExtFactory@a18024a> exceptionListener=<null>
instanceCount=16 classCount=8 bufferSize=512 version=3, base is
org.jboss.marshalling.MarshallingConfiguration@1d296aa3: classExternali
zerFactory=<org.infinispan.marshall.jboss.SerializeWithExtFactory@a18024a>
exceptionListener=<null> instanceCount=16 classCount=8 bufferSize=512 version=3
19:49:02,453 ERROR [org.infinispan.marshall.jboss.AbstractJBossMarshaller]
(OOB-49,rvansa-22965) Unmarshaller with cfg
org.jboss.marshalling.MarshallingConfiguration@7c4ed0bc:
classExternalizerFactory=<org.infin
ispan.marshall.jboss.SerializeWithExtFactory@a18024a> exceptionListener=<null>
instanceCount=16 classCount=8 bufferSize=512 version=3
{code}
See that the timestamps for {{start()}} and thread-local initialization are same, and the
base configuration ({{baseCfg}}) does not have {{objectTable}} initialized.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira