You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Emmanuel Lecharny <el...@gmail.com> on 2010/02/12 11:07:41 UTC

Last version on trunk may have issues

Hi gys,

yesturday I tried to fix the Datagram bug (DIRMINA-732). I think it 
works on linux, I have no idea for windows (if someone can give it a 
try), and I know it fails on Mac OSX.

The problem is that if we register the 'any' address (0.0.0.0) on a 
datagram acceptor, and try to get a session from it, like the way it's 
done on the failng test :

..
         InetSocketAddress bindAddress = new InetSocketAddress(  
AvailablePortFinder.getNextAvailable());
         acceptor.setHandler(new TestHandler());
         acceptor.bind(bindAddress);
         IoSession session = acceptor.newSession(new InetSocketAddress(
                 "127.0.0.1", AvailablePortFinder.getNextAvailable()), 
bindAddress);
...

we get an error, as the bindAddress is considered as a Inet4Address, 
when the acceptor is bound on a Inet6Address. As we store the address in 
a hashMap to check if they are equals, we have an issue, because 
whatever you do, a Inet4Address will always be different from a 
Inet6Address; I hacked the code atrociously by using a String 
translation for this address, but it does not work on Mac.

Now, I'm dubious about the test. Why should be grab a session from the 
acceptor ?
If someone has some idea about what's wrong about this test, that would 
be great !


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com



Re: Last version on trunk may have issues

Posted by Ashish <pa...@gmail.com>.
Will try this on W$ once I get back home in couple of hrs.

thanks
ashish

On Fri, Feb 12, 2010 at 3:37 PM, Emmanuel Lecharny <el...@gmail.com> wrote:
> Hi gys,
>
> yesturday I tried to fix the Datagram bug (DIRMINA-732). I think it works on
> linux, I have no idea for windows (if someone can give it a try), and I know
> it fails on Mac OSX.
>
> The problem is that if we register the 'any' address (0.0.0.0) on a datagram
> acceptor, and try to get a session from it, like the way it's done on the
> failng test :
>
> ..
>        InetSocketAddress bindAddress = new InetSocketAddress(
>  AvailablePortFinder.getNextAvailable());
>        acceptor.setHandler(new TestHandler());
>        acceptor.bind(bindAddress);
>        IoSession session = acceptor.newSession(new InetSocketAddress(
>                "127.0.0.1", AvailablePortFinder.getNextAvailable()),
> bindAddress);
> ...
>
> we get an error, as the bindAddress is considered as a Inet4Address, when
> the acceptor is bound on a Inet6Address. As we store the address in a
> hashMap to check if they are equals, we have an issue, because whatever you
> do, a Inet4Address will always be different from a Inet6Address; I hacked
> the code atrociously by using a String translation for this address, but it
> does not work on Mac.
>
> Now, I'm dubious about the test. Why should be grab a session from the
> acceptor ?
> If someone has some idea about what's wrong about this test, that would be
> great !
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.nextury.com
>
>
>



-- 
thanks
ashish

Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal

Re: Last version on trunk may have issues

Posted by Ashish <pa...@gmail.com>.
On Sat, Feb 13, 2010 at 12:00 AM, Emmanuel Lécharny
<el...@apache.org> wrote:
> On 2/12/10 3:32 PM, Ashish wrote:
>>
>> Works on W$, the build is successful.
>> Do you want me to try anything specific?
>>
>>
>
> I have committed some more fix (Removal of CircularQueue from the code, as
> it's not thread safe).
>
> Can someone check the build on windows ?
>
> mvn clean instal -Pserial
>
> Thanks !

Onto it :-)

Re: Last version on trunk may have issues

Posted by Ashish <pa...@gmail.com>.
On Sat, Feb 13, 2010 at 3:50 PM, Emmanuel Lecharny <el...@apache.org> wrote:
> On Sat, Feb 13, 2010 at 5:53 AM, Ashish <pa...@gmail.com> wrote:
>
>> Works fine with Java 6. Don't have Java 5, Oracle asks me fill a form
>> to download it :-(,
>>
>
> Yeah, Oracle sucks ... :/ Well, it was already there when it was still a Sun
> property. They deserved to be bought by Oracle !
>

That was just a part of it :-/ I filled the form, got the URL, but
couldn't download :-(
the final download didn't work :-/ That's funny.. anyways might have
it on one of Mag DVD. time to search again..

-- 
thanks
ashish

Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal

Re: Last version on trunk may have issues

Posted by Emmanuel Lecharny <el...@apache.org>.
On Sat, Feb 13, 2010 at 5:53 AM, Ashish <pa...@gmail.com> wrote:

> Works fine with Java 6. Don't have Java 5, Oracle asks me fill a form
> to download it :-(,
>

Yeah, Oracle sucks ... :/ Well, it was already there when it was still a Sun
property. They deserved to be bought by Oracle !


Thanks !

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Re: Last version on trunk may have issues

Posted by Ashish <pa...@gmail.com>.
On Sat, Feb 13, 2010 at 12:00 AM, Emmanuel Lécharny
<el...@apache.org> wrote:
> On 2/12/10 3:32 PM, Ashish wrote:
>>
>> Works on W$, the build is successful.
>> Do you want me to try anything specific?
>>
>>
>
> I have committed some more fix (Removal of CircularQueue from the code, as
> it's not thread safe).
>
> Can someone check the build on windows ?
>
> mvn clean instal -Pserial
>

Works fine with Java 6. Don't have Java 5, Oracle asks me fill a form
to download it :-(,
will try to get it and run the build


Here is the summary

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] Apache MINA ........................................... SUCCESS [2.593s]
[INFO] Apache MINA Legal ..................................... SUCCESS [1.844s]
[INFO] Apache MINA Parent POM ................................ SUCCESS [1.000s]
[INFO] Apache MINA Core ...................................... SUCCESS [1:25.375
s]
[INFO] Apache MINA APR Transport ............................. SUCCESS [3.750s]
[INFO] Apache MINA Compression Filter ........................ SUCCESS [4.312s]
[INFO] Apache MINA State Machine ............................. SUCCESS [6.203s]
[INFO] Apache MINA JavaBeans Integration ..................... SUCCESS [5.375s]
[INFO] Apache MINA XBean Integration ......................... SUCCESS [6.344s]
[INFO] Apache MINA OGNL Integration .......................... SUCCESS [2.609s]
[INFO] Apache MINA JMX Integration ........................... SUCCESS [1.922s]
[INFO] Apache MINA Examples .................................. SUCCESS [9.407s]
[INFO] Apache MINA Serial Communication support .............. SUCCESS [2.578s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 minutes 14 seconds
[INFO] Finished at: Sat Feb 13 10:20:44 IST 2010
[INFO] Final Memory: 56M/63M
[INFO] ------------------------------------------------------------------------

thanks
ashish

Re: Last version on trunk may have issues

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Sat, Feb 13, 2010 at 4:13 PM, Emmanuel Lecharny <el...@apache.org> wrote:
> I think we should have tests running on W$ with jdk 1.5 and 1.6, plus linux
> on 1.5 and 1.6.

Alright, done: http://hudson.zones.apache.org/hudson/view/MINA/

/niklas

Re: Last version on trunk may have issues

Posted by Emmanuel Lecharny <el...@apache.org>.
I think we should have tests running on W$ with jdk 1.5 and 1.6, plus linux
on 1.5 and 1.6.

That would be perfect.

On Sat, Feb 13, 2010 at 4:02 PM, Niklas Gustavsson <ni...@protocol7.com>wrote:

> On Fri, Feb 12, 2010 at 7:30 PM, Emmanuel Lécharny <el...@apache.org>
> wrote:
> > Can someone check the build on windows ?
> >
> > mvn clean instal -Pserial
>
> I've set up a build job in Hudson that will run this build on Windows
> (in addition to the already existing build on Ubuntu) on the Sun 1.6
> JDK:
> http://hudson.zones.apache.org/hudson/job/MINA-trunk-jdk1.6-windows/
>
> It currently fails on one the MDC tests, I haven't looked into the details:
>
> http://hudson.zones.apache.org/hudson/job/MINA-trunk-jdk1.6-windows/4/org.apache.mina$mina-core/testReport/org.apache.mina.filter.logging/MdcInjectionFilterTest/testOnlyRemoteAddress/
>
> The build runs every hour if there is a change in SVN. Failed builds
> will be reported the dev@m.a.o (like the Linux build).
>
> Let me know if we want to run tests on additional JDKs (on Windows,
> Linux or Solaris) and I'll add builds for them.
>
> /niklas
>



-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Re: Last version on trunk may have issues

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Fri, Feb 12, 2010 at 7:30 PM, Emmanuel Lécharny <el...@apache.org> wrote:
> Can someone check the build on windows ?
>
> mvn clean instal -Pserial

I've set up a build job in Hudson that will run this build on Windows
(in addition to the already existing build on Ubuntu) on the Sun 1.6
JDK:
http://hudson.zones.apache.org/hudson/job/MINA-trunk-jdk1.6-windows/

It currently fails on one the MDC tests, I haven't looked into the details:
http://hudson.zones.apache.org/hudson/job/MINA-trunk-jdk1.6-windows/4/org.apache.mina$mina-core/testReport/org.apache.mina.filter.logging/MdcInjectionFilterTest/testOnlyRemoteAddress/

The build runs every hour if there is a change in SVN. Failed builds
will be reported the dev@m.a.o (like the Linux build).

Let me know if we want to run tests on additional JDKs (on Windows,
Linux or Solaris) and I'll add builds for them.

/niklas

Re: Last version on trunk may have issues

Posted by Emmanuel Lécharny <el...@apache.org>.
On 2/12/10 3:32 PM, Ashish wrote:
> Works on W$, the build is successful.
> Do you want me to try anything specific?
>
>    
I have committed some more fix (Removal of CircularQueue from the code, 
as it's not thread safe).

Can someone check the build on windows ?

mvn clean instal -Pserial

Thanks !

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com



Re: Last version on trunk may have issues

Posted by Ashish <pa...@gmail.com>.
Works on W$, the build is successful.
Do you want me to try anything specific?

thanks
ashish

On Fri, Feb 12, 2010 at 3:37 PM, Emmanuel Lecharny <el...@gmail.com> wrote:
> Hi gys,
>
> yesturday I tried to fix the Datagram bug (DIRMINA-732). I think it works on
> linux, I have no idea for windows (if someone can give it a try), and I know
> it fails on Mac OSX.
>
> The problem is that if we register the 'any' address (0.0.0.0) on a datagram
> acceptor, and try to get a session from it, like the way it's done on the
> failng test :
>
> ..
>        InetSocketAddress bindAddress = new InetSocketAddress(
>  AvailablePortFinder.getNextAvailable());
>        acceptor.setHandler(new TestHandler());
>        acceptor.bind(bindAddress);
>        IoSession session = acceptor.newSession(new InetSocketAddress(
>                "127.0.0.1", AvailablePortFinder.getNextAvailable()),
> bindAddress);
> ...
>
> we get an error, as the bindAddress is considered as a Inet4Address, when
> the acceptor is bound on a Inet6Address. As we store the address in a
> hashMap to check if they are equals, we have an issue, because whatever you
> do, a Inet4Address will always be different from a Inet6Address; I hacked
> the code atrociously by using a String translation for this address, but it
> does not work on Mac.
>
> Now, I'm dubious about the test. Why should be grab a session from the
> acceptor ?
> If someone has some idea about what's wrong about this test, that would be
> great !
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.nextury.com
>