Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 62932 invoked from network); 5 Jun 2008 22:39:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Jun 2008 22:39:15 -0000 Received: (qmail 48424 invoked by uid 500); 5 Jun 2008 22:39:11 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 48396 invoked by uid 500); 5 Jun 2008 22:39:11 -0000 Mailing-List: contact core-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-dev@hadoop.apache.org Received: (qmail 48384 invoked by uid 99); 5 Jun 2008 22:39:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jun 2008 15:39:11 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jun 2008 22:38:23 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2C8B3234C139 for ; Thu, 5 Jun 2008 15:38:45 -0700 (PDT) Message-ID: <1093184535.1212705525181.JavaMail.jira@brutus> Date: Thu, 5 Jun 2008 15:38:45 -0700 (PDT) From: "Hairong Kuang (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Updated: (HADOOP-3455) IPC.Client synchronisation looks weak In-Reply-To: <1668590410.1211979944977.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-3455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hairong Kuang updated HADOOP-3455: ---------------------------------- Attachment: (was: ipcClient1.patch) > IPC.Client synchronisation looks weak > ------------------------------------- > > Key: HADOOP-3455 > URL: https://issues.apache.org/jira/browse/HADOOP-3455 > Project: Hadoop Core > Issue Type: Improvement > Components: ipc > Affects Versions: 0.18.0 > Reporter: Steve Loughran > Assignee: Steve Loughran > Attachments: hadoop-3455-updated.patch, hadoop-3455.patch, ipcClient.patch > > > Looking at HADOOP-3453 , its clear that Client.java is inconsistently synchronized > 1. the running and shouldCloseConnection flags are not always read/written in synchronized blocks, even though they are properties used to share information between threads. They should be marked as volatile for access outside synchronized blocks, and all read-check-update operations must be synchronized. > 2. there are multiple calls to System.currentTimeMillis() in synchronized blocks; this is a slow native operation and should ideally be done unsynchronized. > 3. Synchronizing on the (out) stream is dangerous as its value changes during the life of the class, and sometimes it is null. These blocks should all synchronize on the Client instead. > 4. There are a number of places where InterruptedExceptions are caught and ignored in a sleep-wait loop: > } catch (InterruptedException e) { > } > This isn't dangerous, but it does make the client harder to stop. These code fragments should be looked at carefully. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.