Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 58020 invoked from network); 5 Mar 2010 07:40:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Mar 2010 07:40:06 -0000 Received: (qmail 95978 invoked by uid 500); 5 Mar 2010 07:39:52 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 95921 invoked by uid 500); 5 Mar 2010 07:39:50 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 95914 invoked by uid 99); 5 Mar 2010 07:39:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Mar 2010 07:39:50 +0000 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; Fri, 05 Mar 2010 07:39:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 47679234C4CB for ; Fri, 5 Mar 2010 07:39:27 +0000 (UTC) Message-ID: <1506730764.91021267774767291.JavaMail.jira@brutus.apache.org> Date: Fri, 5 Mar 2010 07:39:27 +0000 (UTC) From: "Li Jing Qin (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-6375) [classlib][nio]ServerSocketChannel hang when the main thread is waiting for request to accept and another thread try to configure the block mode on one channel In-Reply-To: <1722588150.1258095699637.JavaMail.jira@brutus> 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/HARMONY-6375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841736#action_12841736 ] Li Jing Qin commented on HARMONY-6375: -------------------------------------- Hi Ray, I have misunderstood your test case. It should throw AsynchronousCloseException when another thread close the Channel. If you comment out the ssc.configureBlocking line, harmony and ri all works well. About configureBlocking mode: if you comment out the ssc.close line, you will find that ssc.accept still wait for a connection, even though it is set to NON_BLOCKING. It is kind of reasonable from the native view but unreason from the java view. Any way, I agree your patch. One more thing, ServerSocketChannelImpl use select to fake the NON_BLOCKING, but SocketChannel set flag on fd to support the NON_BLOCKING. Does anyone know where does this difference come from? > [classlib][nio]ServerSocketChannel hang when the main thread is waiting for request to accept and another thread try to configure the block mode on one channel > --------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-6375 > URL: https://issues.apache.org/jira/browse/HARMONY-6375 > Project: Harmony > Issue Type: Bug > Components: Classlib > Environment: All platforms > Reporter: Ray Chen > Attachments: Harmony-6375.diff, Harmony6375TestCase.java, Harmony6375TestCase_V2.java > > > As the summary described: > One thread is waiting for request to accept and another thread is trying to configure the block mode on the same channel. > I will attach one test case file to describe the problem. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.