Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 646C58D5F for ; Sat, 3 Sep 2011 07:59:54 +0000 (UTC) Received: (qmail 3176 invoked by uid 500); 3 Sep 2011 07:59:51 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 2579 invoked by uid 500); 3 Sep 2011 07:59:38 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 2548 invoked by uid 99); 3 Sep 2011 07:59:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Sep 2011 07:59:34 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Sep 2011 07:59:31 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 1E5ED4DD08 for ; Sat, 3 Sep 2011 07:59:10 +0000 (UTC) Date: Sat, 3 Sep 2011 07:59:10 +0000 (UTC) From: "Kiran Ayyagari (JIRA)" To: dev@directory.apache.org Message-ID: <2073522930.14425.1315036750121.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1081736857.14410.1315034949848.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (DIRSERVER-1653) using read() of ObjectInputStream while deserializing ReplicaEventMessage causes random failures MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on 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