Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-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 7D1BF7230 for ; Wed, 28 Sep 2011 19:53:17 +0000 (UTC) Received: (qmail 65892 invoked by uid 500); 28 Sep 2011 19:53:16 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 65834 invoked by uid 500); 28 Sep 2011 19:53:16 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 65813 invoked by uid 99); 28 Sep 2011 19:53:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Sep 2011 19:53:16 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of knst.kolinko@gmail.com designates 209.85.220.173 as permitted sender) Received: from [209.85.220.173] (HELO mail-vx0-f173.google.com) (209.85.220.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Sep 2011 19:53:09 +0000 Received: by vcbfl10 with SMTP id fl10so7520274vcb.18 for ; Wed, 28 Sep 2011 12:52:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=pcIcLvjD/qjuEt2PAJMmkFKt5ieTabZp7m3T0Qv+BwI=; b=HtW08xhW4F1z9CbPT7RrxrQrObvSM1lbXv0EMG2Dppbk7Vjso4UztqwkK3Qne/6rBf TvcUm6Ua1+rE2TUMfLRwD4dKx7AqmKTwo/shld+vFxPhfa81wukQNbrc1Wfrm+ftxraU DW2fQafjKkEi20yd2ej7EZZnOzfQJDgWoTr3s= MIME-Version: 1.0 Received: by 10.52.172.203 with SMTP id be11mr10066633vdc.67.1317239568849; Wed, 28 Sep 2011 12:52:48 -0700 (PDT) Received: by 10.52.183.193 with HTTP; Wed, 28 Sep 2011 12:52:48 -0700 (PDT) In-Reply-To: References: <20110928094821.78CC314DDDA@vmgump.apache.org> Date: Wed, 28 Sep 2011 23:52:48 +0400 Message-ID: Subject: Re: [GUMP@vmgump]: Project tomcat-tc7.0.x-test (in module tomcat-7.0.x) failed From: Konstantin Kolinko To: Tomcat Developers List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 2011/9/28 Konstantin Kolinko : > 2011/9/28 Bill Barker : >> To whom it may engage... >> >> This is an automated request, but not an unsolicited one. For >> more information please visit http://gump.apache.org/nagged.html, >> and/or contact the folk at general@gump.apache.org. >> >> Project tomcat-tc7.0.x-test has an issue affecting its community integra= tion. >> This issue affects 1 projects, >> =A0and has been outstanding for 8 runs. >> The current state of this project is 'Failed', with reason 'Build Failed= '. >> For reference only, the following projects are affected by this: >> =A0 =A0- tomcat-tc7.0.x-test : =A0Tomcat 7.x, a web server implementing = Java Servlet 3.0, >> =A0 =A0... >> >> >> Full details are available at: >> =A0 =A0http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-= test/index.html > > Test org.apache.catalina.tribes.group.TestGroupChannelMemberArrival FAILE= D > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > TEST-org.apache.catalina.tribes.group.TestGroupChannelMemberArrival.BIO.t= xt > Testcase: testMemberArrival took 4.38 sec > =A0 =A0 =A0 =A0FAILED > Checking member arrival length expected:<9> but was:<11> > junit.framework.AssertionFailedError: Checking member arrival length > expected:<9> but was:<11> > =A0 =A0 =A0 =A0at org.apache.catalina.tribes.group.TestGroupChannelMember= Arrival.testMemberArrival(TestGroupChannelMemberArrival.java:77) > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > The same failure as was observed by Gump in trunk yesterday. > Again BIO fails, but NIO runs OK. > >> Checking member arrival length expected:<9> but was:<11> > > In failed trunk test it was >> Checking member arrival length expected:<9> but was:<19> > > So, it received more data than were expected? > Huh. I found the cause. The test itself is broken. The test has nested class TestMbrListener implements MembershipListener that is used to handle notifications about added and disappeared members. Those notifications arrive asynchronously. Such as this one: (org.apache.catalina.tribes.membership.McastServiceImpl : t =3D new Runnable() { @Override public void run() { String name =3D Thread.currentThread().getName(); try { Thread.currentThread().setName("Membership-MemberAdded."); service.memberAdded(m); }finally { Thread.currentThread().setName(name); } } }; executor.execute(t); ) The TestMbrListener stores its data in ArrayList. The error here is that access to this ArrayList is not synchronized, but several notifications can invoke the listener concurrently at the same time. Thus ArrayList becomes corrupted and reports wrong value for its size(). Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org