You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Selcuk Aya (JIRA)" <ji...@apache.org> on 2011/09/03 09:29:09 UTC
[jira] [Created] (DIRSERVER-1653) using read() of ObjectInputStream
while deserializing ReplicaEventMessage causes random failures
using read() of ObjectInputStream while deserializing ReplicaEventMessage causes random failures
-------------------------------------------------------------------------------------------------
Key: DIRSERVER-1653
URL: https://issues.apache.org/jira/browse/DIRSERVER-1653
Project: Directory ApacheDS
Issue Type: Bug
Components: ldap
Reporter: Selcuk Aya
Attachments: replication1.diff
While looking into replication tests, found out that we use read() of ObjectInputStream to read an array of bytes. The specification says this might return any number of bytes(in my case it always returned 1024). When the serialized array is more than 1024 bytes, this causes random failures in deserialization. readFully method should be used to read the expected number of bytes.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: [jira] [Commented] (DIRSERVER-1653) using read() of
ObjectInputStream while deserializing ReplicaEventMessage causes random failures
Posted by Selcuk AYA <ay...@gmail.com>.
On Sat, Sep 3, 2011 at 10:59 AM, Kiran Ayyagari (JIRA) <ji...@apache.org> wrote:
>
> [ https://issues.apache.org/jira/browse/DIRSERVER-1653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13096603#comment-13096603 ]
>
> Kiran Ayyagari commented on DIRSERVER-1653:
> -------------------------------------------
>
> This is a cool catch, this is clearly a bug, but I think the recent changes to JDBM made this exposed (cause this code was just working fine, which means the message size never exceeded 1024 bytes), do you have any hints or pointers about what might triggered this, just curious.
yes the jdbm changes made this more frequent because there is a code
which does serialization/deserialization to do deep copy. However, I
removed that code and the same issue happens at a later stage if it
happens that we need to read the B+ page from disk and thus
deserialize it. That caused the same kind of failure for me.
>
>> using read() of ObjectInputStream while deserializing ReplicaEventMessage causes random failures
>> -------------------------------------------------------------------------------------------------
>>
>> Key: DIRSERVER-1653
>> URL: https://issues.apache.org/jira/browse/DIRSERVER-1653
>> Project: Directory ApacheDS
>> Issue Type: Bug
>> Components: ldap
>> Reporter: Selcuk Aya
>> Attachments: replication1.diff
>>
>>
>> While looking into replication tests, found out that we use read() of ObjectInputStream to read an array of bytes. The specification says this might return any number of bytes(in my case it always returned 1024). When the serialized array is more than 1024 bytes, this causes random failures in deserialization. readFully method should be used to read the expected number of bytes.
>
> --
> This message is automatically generated by JIRA.
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>
[jira] [Resolved] (DIRSERVER-1653) using read() of
ObjectInputStream while deserializing ReplicaEventMessage causes random
failures
Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-1653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Lecharny resolved DIRSERVER-1653.
------------------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0-M3
Assignee: Emmanuel Lecharny
Applied in http://svn.apache.org/viewvc?rev=1164817&view=rev
> using read() of ObjectInputStream while deserializing ReplicaEventMessage causes random failures
> -------------------------------------------------------------------------------------------------
>
> Key: DIRSERVER-1653
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1653
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: ldap
> Reporter: Selcuk Aya
> Assignee: Emmanuel Lecharny
> Fix For: 2.0.0-M3
>
> Attachments: replication1.diff
>
>
> While looking into replication tests, found out that we use read() of ObjectInputStream to read an array of bytes. The specification says this might return any number of bytes(in my case it always returned 1024). When the serialized array is more than 1024 bytes, this causes random failures in deserialization. readFully method should be used to read the expected number of bytes.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DIRSERVER-1653) using read() of
ObjectInputStream while deserializing ReplicaEventMessage causes random
failures
Posted by "Kiran Ayyagari (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-1653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13096603#comment-13096603 ]
Kiran Ayyagari commented on DIRSERVER-1653:
-------------------------------------------
This is a cool catch, this is clearly a bug, but I think the recent changes to JDBM made this exposed (cause this code was just working fine, which means the message size never exceeded 1024 bytes), do you have any hints or pointers about what might triggered this, just curious.
> using read() of ObjectInputStream while deserializing ReplicaEventMessage causes random failures
> -------------------------------------------------------------------------------------------------
>
> Key: DIRSERVER-1653
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1653
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: ldap
> Reporter: Selcuk Aya
> Attachments: replication1.diff
>
>
> While looking into replication tests, found out that we use read() of ObjectInputStream to read an array of bytes. The specification says this might return any number of bytes(in my case it always returned 1024). When the serialized array is more than 1024 bytes, this causes random failures in deserialization. readFully method should be used to read the expected number of bytes.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (DIRSERVER-1653) using read() of ObjectInputStream
while deserializing ReplicaEventMessage causes random failures
Posted by "Selcuk Aya (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-1653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Selcuk Aya updated DIRSERVER-1653:
----------------------------------
Attachment: replication1.diff
> using read() of ObjectInputStream while deserializing ReplicaEventMessage causes random failures
> -------------------------------------------------------------------------------------------------
>
> Key: DIRSERVER-1653
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1653
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: ldap
> Reporter: Selcuk Aya
> Attachments: replication1.diff
>
>
> While looking into replication tests, found out that we use read() of ObjectInputStream to read an array of bytes. The specification says this might return any number of bytes(in my case it always returned 1024). When the serialized array is more than 1024 bytes, this causes random failures in deserialization. readFully method should be used to read the expected number of bytes.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira