Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 91557 invoked from network); 20 Apr 2006 03:47:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Apr 2006 03:47:40 -0000 Received: (qmail 69941 invoked by uid 500); 20 Apr 2006 03:47:39 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 69904 invoked by uid 500); 20 Apr 2006 03:47:39 -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 69890 invoked by uid 99); 20 Apr 2006 03:47:39 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Apr 2006 20:47:39 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Apr 2006 20:47:38 -0700 Received: from brutus (localhost.localdomain [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 380117142CD for ; Thu, 20 Apr 2006 03:46:37 +0000 (GMT) Message-ID: <25867896.1145504797226.JavaMail.jira@brutus> Date: Thu, 20 Apr 2006 03:46:37 +0000 (GMT+00:00) From: "Trustin Lee (JIRA)" To: dev@directory.apache.org Subject: [jira] Resolved: (DIRSERVER-608) 100% CPU usage after resume WinXP from stand-by: appears to be in MINA In-Reply-To: <11264742.1145415978295.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 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DIRSERVER-608?page=all ] Trustin Lee resolved DIRSERVER-608: ----------------------------------- Resolution: Duplicate Assign To: Trustin Lee This issue looks like a duplicate of DIRMINA-204 Please upgrade your JRE to 1.4.2_10 and let us know if it still is a problem. > 100% CPU usage after resume WinXP from stand-by: appears to be in MINA > ---------------------------------------------------------------------- > > Key: DIRSERVER-608 > URL: http://issues.apache.org/jira/browse/DIRSERVER-608 > Project: Directory ApacheDS > Type: Bug > Components: core > Versions: 1.0-RC1 > Environment: Windows XP 2002 SP2, JDK 1.4.2_04-b05 > Reporter: Norbert Reilly > Assignee: Trustin Lee > > I've noticed that when ApacheDS is running on my laptop and I close the lid and later open it that the ApacheDS java process is using 100% CPU. When logging at the DEBUG level the 100% CPU usage seems to coincide with messages like this (the 20 second periodic sync): > ============================ > 2006-04-19 12:46:08,833 101464 [SynchWorkerThread] (org.apache.directory.shared.ldap.name.DnParser:184) DEBUG org.apache.directory.shared.ldap.name.DnParser - Parsing DN 'ou=system' > 2006-04-19 12:46:08,883 101514 [SynchWorkerThread] (org.apache.directory.shared.ldap.name.DnParser:184) DEBUG org.apache.directory.shared.ldap.name.DnParser - Parsing DN 'uid=admin,ou=system' > 2006-04-19 12:46:08,943 101574 [SynchWorkerThread] (org.apache.directory.shared.ldap.name.DnParser:184) DEBUG org.apache.directory.shared.ldap.name.DnParser - Parsing DN 'uid=admin,ou=system' > 2006-04-19 12:46:09,013 101644 [SynchWorkerThread] (org.apache.directory.server.core.authn.AuthenticationService:248) DEBUG org.apache.directory.server.core.authn.AuthenticationService - Testing if entry name = 'ou=system' exists > 2006-04-19 12:46:09,063 101694 [SynchWorkerThread] (org.apache.directory.server.core.partition.DefaultDirectoryPartitionNexus:722) DEBUG org.apache.directory.server.core.partition.DefaultDirectoryPartitionNexus - Check if DN 'ou=system' exists. > 2006-04-19 12:46:09,123 101754 [SynchWorkerThread] (org.apache.directory.shared.ldap.name.DnParser:184) DEBUG org.apache.directory.shared.ldap.name.DnParser - Parsing DN 'ou=services,ou=configuration,ou=system' > 2006-04-19 12:46:09,223 101854 [SynchWorkerThread] (org.apache.directory.shared.ldap.name.DnParser:184) DEBUG org.apache.directory.shared.ldap.name.DnParser - Parsing DN 'ou=system' > 2006-04-19 12:46:09,304 101935 [SynchWorkerThread] (org.apache.directory.shared.ldap.name.DnParser:184) DEBUG org.apache.directory.shared.ldap.name.DnParser - Parsing DN 'ou=interceptors,ou=configuration,ou=system' > 2006-04-19 12:46:09,424 102055 [SynchWorkerThread] (org.apache.directory.shared.ldap.name.DnParser:184) DEBUG org.apache.directory.shared.ldap.name.DnParser - Parsing DN 'ou=system' > 2006-04-19 12:46:09,504 102135 [SynchWorkerThread] (org.apache.directory.shared.ldap.name.DnParser:184) DEBUG org.apache.directory.shared.ldap.name.DnParser - Parsing DN 'ou=configuration,ou=system' > 2006-04-19 12:46:09,604 102235 [SynchWorkerThread] (org.apache.directory.shared.ldap.name.DnParser:184) DEBUG org.apache.directory.shared.ldap.name.DnParser - Parsing DN 'ou=system' > ============================ > This is a dump of the threads when I pause the debugger: > DestroyJavaVM@6d0, priority=5, in group 'main', status: 'RUNNING' > SynchWorkerThread@6ae, priority=5, in group 'main', status: 'WAIT' > wait():-1, Object.java > run():155, Service.java > run():534, Thread.java > SocketAcceptor-0@69f, priority=5, in group 'main', status: 'RUNNING' > poll0():-1, WindowsSelectorImpl.java > poll():263, WindowsSelectorImpl.java > access$400():245, WindowsSelectorImpl.java > doSelect():128, WindowsSelectorImpl.java > lockAndDoSelect():59, SelectorImpl.java > select():70, SelectorImpl.java > select():74, SelectorImpl.java > run():326, SocketAcceptorDelegate.java > Signal Dispatcher@e0 daemon, priority=10, in group 'system', status: 'RUNNING' > Finalizer@e1 daemon, priority=8, in group 'system', status: 'WAIT' > wait():-1, Object.java > remove():111, ReferenceQueue.java > remove():127, ReferenceQueue.java > run():159, Finalizer.java > Reference Handler@e2 daemon, priority=10, in group 'system', status: 'WAIT' > wait():-1, Object.java > wait():429, Object.java > run():115, Reference.java > The busy loop is in org.apache.mina.transport.socket.nio.support.SocketAcceptorDelegate.Worker.run() and appears to be because the line: > int nKeys = selector.select(); > never blocks after the resume, and hence the run() method becomes a busy loop. This may well be a bug in the JDK's nio package but a quick web search didn't turn up a match. At any rate it seems like a problem that will need to be worked around in MINA until the JDK is patched (if my diagnosis is correct) at it seems the selector is rendered inoperable by the close-lid/resume sequence. > I presume the same problem could be triggered on a desk-top machine with enough understanding about what WinXP does during a suspend, and why this upsets the NIO package. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira