Apache Directory Project - [mina] Anyone who can test MINA with ThreadPoolFilter in a multiprocessor machine?

This is Interesting: Free IT Magazines  
Home > Archive > Apache Directory Project > July 2005 > [mina] Anyone who can test MINA with ThreadPoolFilter in a multiprocessor machine?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author [mina] Anyone who can test MINA with ThreadPoolFilter in a multiprocessor machine?
Trustin Lee

2005-07-05, 5:45 pm

Hi,
There was a report from a user that ThreadPoolFilter causes the arrival
order of events to screw up. It seems to have happened in a multiprocessor
machine, and the problem went away after the user has removed two
ThreadPoolFilters.
Unfortunately, I don't have any multiprocessor machines, and need someone's
help. Anyone who can program or run heavy test on multiprocessor machines?
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Trustin Lee

2005-07-05, 5:45 pm

Hi,

2005/6/9, Julien Vermillard <jvermillard-hxtJVsqPMRdGWvitb5QawA@public.gmane.org>:
>
>
> Le mercredi 06 juillet 2005 à 00:20 +0900, Trustin Lee a écrit :
>
> an HyperThreading CPU could do the trick no ?


I'm not sure, but I guess so. Anyone who've got the exact answer?
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Vinod Panicker

2005-07-06, 2:45 am

On 7/5/05, Trustin Lee <trustin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi,=20
> =20
> There was a report from a user that ThreadPoolFilter causes the arrival
> order of events to screw up. It seems to have happened in a multiprocess=

or
> machine, and the problem went away after the user has removed two
> ThreadPoolFilters.=20
> =20
> Unfortunately, I don't have any multiprocessor machines, and need someone=

's
> help. Anyone who can program or run heavy test on multiprocessor machine=

s?=20

I've got a dual proc opteron with 6 gigs. Thing is that I'm really
tied up with stuff. If anyone could send me a "start it, forget it"
kinda test case, I'll be glad to be of help.

Regards,
Vinod.

Trustin Lee

2005-07-06, 7:45 am

Update for this bug:
I wrote a simple regression test case, and I was able to reproduce the
situation even in single processor machine. I'll check in the test and
the fix for it soon.
2005/7/6, Trustin Lee <trustin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
>
> Hi,
> There was a report from a user that ThreadPoolFilter causes the arrival
> order of events to screw up. It seems to have happened in a multiprocessor
> machine, and the problem went away after the user has removed two
> ThreadPoolFilters.
> Unfortunately, I don't have any multiprocessor machines, and need
> someone's help. Anyone who can program or run heavy test on multiprocessor
> machines?
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
>



Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Trustin Lee

2005-07-06, 7:45 am

Hi all,
I checked in the test case called ThreadPoolFilterRegressionTest in:
'trunk\src\test\org\apache\mina\filter' directory.
This test doesn't run in Maven because I excluded it due to the time it
takes. (about 10 seconds in AMD64 3200+)
Volunteers, please test the test case in your multiprocessor machines. If
test passes, try to increase the number of loops and active sessions by
modifying the source code. (The modification is fairly simple; just increase
the length of 'sessions' array and outer loop)
Thanks in advance,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Vinod Panicker

2005-07-06, 7:45 am

On 7/6/05, Trustin Lee <trustin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi all,=20
> =20
> I checked in the test case called ThreadPoolFilterRegressionTest in:=20
> =20
> 'trunk\src\test\org\apache\mina\filter' directory.=20
> =20
> This test doesn't run in Maven because I excluded it due to the time it
> takes. (about 10 seconds in AMD64 3200+)=20
> =20
> Volunteers, please test the test case in your multiprocessor machines. I=

f
> test passes, try to increase the number of loops and active sessions by
> modifying the source code. (The modification is fairly simple; just
> increase the length of 'sessions' array and outer loop)=20


The test fails. Here's the output -=20

Testsuite: org.apache.mina.filter.ThreadPoolFilterRegressionTest
Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.464 sec

Testcase: testEventOrder(org.apache.mina.filter.ThreadPoolFilterRegressionT=
est):=09FAILED
expected:<6052> but was:<6054>
junit.framework.AssertionFailedError: expected:<6052> but was:<6054>
=09at org.apache.mina.filter. ThreadPoolFilterRegressionTest$EventOrde
rCount=
er. setLastCount(ThreadPoolFilterRegressionT
est.java:85)
=09at org.apache.mina.filter. ThreadPoolFilterRegressionTest$EventOrde
rCheck=
er. messageReceived(ThreadPoolFilterRegressi
onTest.java:166)
=09at org.apache.mina.filter.ThreadPoolFilter.processEvent(ThreadPoolFilter=
..java:504)
=09at org.apache.mina.filter.ThreadPoolFilter$Worker.processEvents(ThreadPo=
olFilter.java:293)
=09at org.apache.mina.filter.ThreadPoolFilter$Worker.run(ThreadPoolFilter.j=
ava:232)


Regards,
Vinod.

Trustin Lee

2005-07-06, 5:45 pm

2005/7/6, Vinod Panicker <vinod.p-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
>
> The test fails. Here's the output -


Could you please try again after you comment out the 325th line of
ThreadPoolFilter.java? (removeSessionBuffer( buf );)
This bug now seems to be unreproducable in single processor machines.
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Vinod Panicker

2005-07-07, 2:45 am

On 7/6/05, Trustin Lee <trustin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 2005/7/6, Vinod Panicker <vinod.p-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:=20
> =20
> Could you please try again after you comment out the 325th line of
> ThreadPoolFilter.java? (removeSessionBuffer( buf );)=20


Did an svn up - got the latest version of the test. Ran test and it failed=
..

Commented the line as you said, ran the test and it still failed.

Testsuite: org.apache.mina.filter.ThreadPoolFilterRegressionTest
Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 13.969 sec

Testcase: testEventOrder(org.apache.mina.filter.ThreadPoolFilterRegressionT=
est):=09FAILED
expected:<415388> but was:<415389>
junit.framework.AssertionFailedError: expected:<415388> but was:<415389>
=09at org.apache.mina.filter. ThreadPoolFilterRegressionTest$EventOrde
rCount=
er. setLastCount(ThreadPoolFilterRegressionT
est.java:85)
=09at org.apache.mina.filter. ThreadPoolFilterRegressionTest$EventOrde
rCheck=
er. messageReceived(ThreadPoolFilterRegressi
onTest.java:166)
=09at org.apache.mina.filter.ThreadPoolFilter.processEvent(ThreadPoolFilter=
..java:504)
=09at org.apache.mina.filter.ThreadPoolFilter$Worker.processEvents(ThreadPo=
olFilter.java:293)
=09at org.apache.mina.filter.ThreadPoolFilter$Worker.run(ThreadPoolFilter.j=
ava:232)


The test does use both CPU's to 100% capacity.

> This bug now seems to be unreproducable in single processor machines.=20


Regards,
Vinod.

Trustin Lee

2005-07-07, 2:45 am

Hi,
I asked my friends to run tests with log messages, and I found the problem..
I checked in the fix. The new code has been tested with 2-way Windows and
2-way SPARC machones. Could you try again?

2005/7/7, Vinod Panicker <vinod.p-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
>
> Did an svn up - got the latest version of the test. Ran test and it
> failed.
>
> Commented the line as you said, ran the test and it still failed.
>
> Testsuite: org.apache.mina.filter.ThreadPoolFilterRegressionTest
> Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 13.969 sec


Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Vinod Panicker

2005-07-07, 2:45 am

On 7/7/05, Trustin Lee <trustin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi,=20
> =20
> I asked my friends to run tests with log messages, and I found the proble=

m.=20
> I checked in the fix. The new code has been tested with 2-way Windows an=

d
> 2-way SPARC machones. Could you try again?


Testsuite: org.apache.mina.filter.ThreadPoolFilterRegressionTest
Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 14.891 sec

Seems like your fix did the trick. Any other
permutations/combinations to be tested?

--snip--

Regards,
Vinod.

Trustin Lee

2005-07-07, 2:45 am

2005/7/7, Vinod Panicker <vinod.p-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
>
> On 7/7/05, Trustin Lee <trustin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> problem.
> and
>
> Testsuite: org.apache.mina.filter.ThreadPoolFilterRegressionTest
> Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 14.891 sec
>
> Seems like your fix did the trick. Any other
> permutations/combinations to be tested?


None yet. Do you have any ideas about testing methodology?
To Julien and Frederik,
Please run the test and give us the result.
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Trustin Lee

2005-07-07, 7:45 am

Oops! That's too bad!

2005/7/7, Julien Vermillard <jvermillard-hxtJVsqPMRdGWvitb5QawA@public.gmane.org>:
>
> Le jeudi 07 juillet 2005 à 16:36 +0900, Trustin Lee a écrit :
>
>
> Well my HT machine was just delivered to a customer
>
> Julien
>
>



--
what we call human nature is actually human habit
--
http://gleamynode.net/

Trustin Lee

2005-07-07, 7:45 am

Hi Fredrik,

2005/7/7, Fredrik Westermarck <fredrik.westermarck-8UVCnLoquWk@public.gmane.org>:
>
> However a short description about what module to build would be nice. Is
> the test case enabled by default now or do I have to modify the maven
> files to ensure that it gets executed?


If you have an IDE in your machine, you can simply run
ThreadPoolFilterRegressionTool in your IDE. Otherwise, you can open
project.xml and remove '<exclude>' section with 'Regression' keyword.
Thanks,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com