Return-Path: Delivered-To: apmail-mina-dev-archive@www.apache.org Received: (qmail 49942 invoked from network); 10 Feb 2011 16:35:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 10 Feb 2011 16:35:21 -0000 Received: (qmail 19634 invoked by uid 500); 10 Feb 2011 16:35:21 -0000 Delivered-To: apmail-mina-dev-archive@mina.apache.org Received: (qmail 19120 invoked by uid 500); 10 Feb 2011 16:35:19 -0000 Mailing-List: contact dev-help@mina.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mina.apache.org Delivered-To: mailing list dev@mina.apache.org Received: (qmail 19105 invoked by uid 99); 10 Feb 2011 16:35:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Feb 2011 16:35:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_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; Thu, 10 Feb 2011 16:35:17 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 8153719D78F for ; Thu, 10 Feb 2011 16:34:57 +0000 (UTC) Date: Thu, 10 Feb 2011 16:34:57 +0000 (UTC) From: "Emmanuel Lecharny (JIRA)" To: dev@mina.apache.org Message-ID: <288706092.8191.1297355697526.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (DIRMINA-678) NioProcessor 100% CPU usage on Linux (epoll selector bug) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DIRMINA-678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993104#comment-12993104 ] Emmanuel Lecharny commented on DIRMINA-678: ------------------------------------------- I just have attached a patch ( mina-2.0.3.diff) 1) svn co http://svn.apache.org/repos/asf/mina/tags/2.0.3 2) cd 2.0.3 3) patch -p0 < mina-2/0/3.diff 4) mvn clean install -Pserial (note : the -Pserial is only necessary if the serial connector is used, otherwise it can be ignored) and you are done, you can get the built jars from your .m2/repository Note that you'll have a mina 2.0.3-SNAPSHOT version doing so. There are not a lot of modifications since mina 2.0.2 though. You'll also need Maven 3.0.2 to build MINA. > NioProcessor 100% CPU usage on Linux (epoll selector bug) > --------------------------------------------------------- > > Key: DIRMINA-678 > URL: https://issues.apache.org/jira/browse/DIRMINA-678 > Project: MINA > Issue Type: Bug > Components: Core > Affects Versions: 2.0.0-M4 > Environment: CentOS 5.x, 32/64-bit, 32/64-bit Sun JDK 1.6.0_12, also _11/_10/_09 and Sun JDK 1.7.0 b50, Kernel 2.6.18-92.1.22.el5 and also older versions, > Reporter: Serge Baranov > Fix For: 2.0.3 > > Attachments: mina-2.0.3.diff, snap973.png, snap974.png > > > It's the same bug as described at http://jira.codehaus.org/browse/JETTY-937 , but affecting MINA in the very similar way. > NioProcessor threads start to eat 100% resources per CPU. After 10-30 minutes of running depending on the load (sometimes after several hours) one of the NioProcessor starts to consume all the available CPU resources probably spinning in the epoll select loop. Later, more threads can be affected by the same issue, thus 100% loading all the available CPU cores. > Sample trace: > NioProcessor-10 [RUNNABLE] CPU time: 5:15 > sun.nio.ch.EPollArrayWrapper.epollWait(long, int, long, int) > sun.nio.ch.EPollArrayWrapper.poll(long) > sun.nio.ch.EPollSelectorImpl.doSelect(long) > sun.nio.ch.SelectorImpl.lockAndDoSelect(long) > sun.nio.ch.SelectorImpl.select(long) > org.apache.mina.transport.socket.nio.NioProcessor.select(long) > org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run() > org.apache.mina.util.NamePreservingRunnable.run() > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker) > java.util.concurrent.ThreadPoolExecutor$Worker.run() > java.lang.Thread.run() > It seems to affect any NIO based Java server applications running in the specified environment. > Some projects provide workarounds for similar JDK bugs, probably MINA can also think about a workaround. > As far as I know, there are at least 3 users who experience this issue with Jetty and all of them are running CentOS (some distribution default setting is a trigger?). As for MINA, I'm not aware of similar reports yet. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira