You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Trustin Lee <tr...@gmail.com> on 2005/07/05 17:20:42 UTC

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

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/

Re: [mina] Anyone who can test MINA with ThreadPoolFilter in a multiprocessor machine?

Posted by Trustin Lee <tr...@gmail.com>.
Hi,

2005/6/9, Julien Vermillard <jv...@archean.fr>: 
> 
> 
> Le mercredi 06 juillet 2005 à 00:20 +0900, Trustin Lee a écrit :
> > 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?
> 
> 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/

Re: [mina] Anyone who can test MINA with ThreadPoolFilter in a multiprocessor machine?

Posted by Julien Vermillard <jv...@archean.fr>.
Le mercredi 06 juillet 2005 à 00:20 +0900, Trustin Lee a écrit :
> 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?

an HyperThreading CPU could do the trick no ?

Julien


Re: [mina] Anyone who can test MINA with ThreadPoolFilter in a multiprocessor machine?

Posted by Fredrik Westermarck <fr...@mdh.se>.
Trustin Lee wrote:
> 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?

Hi!

I have a dual-processor machine (running Linux) that is eager to help. :)

Regards,
Fredrik Westermarck


Re: [mina] Anyone who can test MINA with ThreadPoolFilter in a multiprocessor machine?

Posted by Trustin Lee <tr...@gmail.com>.
Hi Fredrik,

 2005/7/7, Fredrik Westermarck <fr...@mdh.se>: 
> 
> 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/

Re: [mina] Anyone who can test MINA with ThreadPoolFilter in a multiprocessor machine?

Posted by Fredrik Westermarck <fr...@mdh.se>.
Trustin Lee wrote:
>  
> Please run the test and give us the result. :)
>  

Hi!

I'll run the tests this evening, if I get home before it's bedtime. :-)

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?

Regards,
Fredrik Westermarck

Re: [mina] Anyone who can test MINA with ThreadPoolFilter in a multiprocessor machine?

Posted by Trustin Lee <tr...@gmail.com>.
Oops! That's too bad! :)

2005/7/7, Julien Vermillard <jv...@archean.fr>: 
> 
> Le jeudi 07 juillet 2005 à 16:36 +0900, Trustin Lee a écrit :
> 
> >
> > To Julien and Frederik,
> >
> > Please run the test and give us the result. :)
> >
> 
> Well my HT machine was just delivered to a customer :(
> 
> Julien
> 
> 


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

Re: [mina] Anyone who can test MINA with ThreadPoolFilter in a multiprocessor machine?

Posted by Julien Vermillard <jv...@archean.fr>.
Le jeudi 07 juillet 2005 à 16:36 +0900, Trustin Lee a écrit :

>  
> To Julien and Frederik,
>  
> Please run the test and give us the result. :)
>  

Well my HT machine was just delivered to a customer :(

Julien


Re: [mina] Anyone who can test MINA with ThreadPoolFilter in a multiprocessor machine?

Posted by Trustin Lee <tr...@gmail.com>.
2005/7/7, Vinod Panicker <vi...@gmail.com>: 
> 
> On 7/7/05, Trustin Lee <tr...@gmail.com> wrote:
> > 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?
> 
> 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/

Re: [mina] Anyone who can test MINA with ThreadPoolFilter in a multiprocessor machine?

Posted by Vinod Panicker <vi...@gmail.com>.
On 7/7/05, Trustin Lee <tr...@gmail.com> wrote:
> 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?

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.

Re: [mina] Anyone who can test MINA with ThreadPoolFilter in a multiprocessor machine?

Posted by Trustin Lee <tr...@gmail.com>.
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 <vi...@gmail.com>: 
> 
> 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/

Re: [mina] Anyone who can test MINA with ThreadPoolFilter in a multiprocessor machine?

Posted by Vinod Panicker <vi...@gmail.com>.
On 7/6/05, Trustin Lee <tr...@gmail.com> wrote:
> 2005/7/6, Vinod Panicker <vi...@gmail.com>: 
> > The test fails.  Here's the output -
>  
> Could you please try again after you comment out the 325th line of
> ThreadPoolFilter.java? (removeSessionBuffer( buf );) 

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.ThreadPoolFilterRegressionTest):	FAILED
expected:<415388> but was:<415389>
junit.framework.AssertionFailedError: expected:<415388> but was:<415389>
	at org.apache.mina.filter.ThreadPoolFilterRegressionTest$EventOrderCounter.setLastCount(ThreadPoolFilterRegressionTest.java:85)
	at org.apache.mina.filter.ThreadPoolFilterRegressionTest$EventOrderChecker.messageReceived(ThreadPoolFilterRegressionTest.java:166)
	at org.apache.mina.filter.ThreadPoolFilter.processEvent(ThreadPoolFilter.java:504)
	at org.apache.mina.filter.ThreadPoolFilter$Worker.processEvents(ThreadPoolFilter.java:293)
	at org.apache.mina.filter.ThreadPoolFilter$Worker.run(ThreadPoolFilter.java:232)


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

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

Regards,
Vinod.

Re: [mina] Anyone who can test MINA with ThreadPoolFilter in a multiprocessor machine?

Posted by Trustin Lee <tr...@gmail.com>.
2005/7/6, Vinod Panicker <vi...@gmail.com>: 
> 
> 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/

Re: [mina] Anyone who can test MINA with ThreadPoolFilter in a multiprocessor machine?

Posted by Vinod Panicker <vi...@gmail.com>.
On 7/6/05, Trustin Lee <tr...@gmail.com> wrote:
> 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) 

The test fails.  Here's the output - 

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

Testcase: testEventOrder(org.apache.mina.filter.ThreadPoolFilterRegressionTest):	FAILED
expected:<6052> but was:<6054>
junit.framework.AssertionFailedError: expected:<6052> but was:<6054>
	at org.apache.mina.filter.ThreadPoolFilterRegressionTest$EventOrderCounter.setLastCount(ThreadPoolFilterRegressionTest.java:85)
	at org.apache.mina.filter.ThreadPoolFilterRegressionTest$EventOrderChecker.messageReceived(ThreadPoolFilterRegressionTest.java:166)
	at org.apache.mina.filter.ThreadPoolFilter.processEvent(ThreadPoolFilter.java:504)
	at org.apache.mina.filter.ThreadPoolFilter$Worker.processEvents(ThreadPoolFilter.java:293)
	at org.apache.mina.filter.ThreadPoolFilter$Worker.run(ThreadPoolFilter.java:232)


Regards,
Vinod.

Re: [mina] Anyone who can test MINA with ThreadPoolFilter in a multiprocessor machine?

Posted by Trustin Lee <tr...@gmail.com>.
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/

Re: [mina] Anyone who can test MINA with ThreadPoolFilter in a multiprocessor machine?

Posted by Trustin Lee <tr...@gmail.com>.
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 <tr...@gmail.com>: 
> 
> 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/

Re: [mina] Anyone who can test MINA with ThreadPoolFilter in a multiprocessor machine?

Posted by Vinod Panicker <vi...@gmail.com>.
On 7/5/05, Trustin Lee <tr...@gmail.com> wrote:
> 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? 

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.