2011/9/28 Konstantin Kolinko <knst.koli...@gmail.com>:
> 2011/9/28 Bill Barker <billbar...@apache.org>:
>> 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 gene...@gump.apache.org.
>>
>> Project tomcat-tc7.0.x-test has an issue affecting its community integration.
>> This issue affects 1 projects,
>>  and 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:
>>    - tomcat-tc7.0.x-test :  Tomcat 7.x, a web server implementing Java 
>> Servlet 3.0,
>>    ...
>>
>>
>> Full details are available at:
>>    
>> http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-test/index.html
>
> Test org.apache.catalina.tribes.group.TestGroupChannelMemberArrival FAILED
>
> ================
> TEST-org.apache.catalina.tribes.group.TestGroupChannelMemberArrival.BIO.txt
> Testcase: testMemberArrival took 4.38 sec
>        FAILED
> Checking member arrival length expected:<9> but was:<11>
> junit.framework.AssertionFailedError: Checking member arrival length
> expected:<9> but was:<11>
>        at 
> org.apache.catalina.tribes.group.TestGroupChannelMemberArrival.testMemberArrival(TestGroupChannelMemberArrival.java:77)
> ================
>
> 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 = new Runnable() {
                @Override
                public void run() {
                    String name = 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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to