You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Trustin Lee <tr...@gmail.com> on 2007/06/04 10:23:44 UTC

Re: SSL Client does not send any data

On 5/24/07, seven <ho...@gmail.com> wrote:
>
>
> Gaston Dombiak wrote:
> >
> > Hey,
> >
> > I'm using MINA 1.1 and tracking a problem where byte buffers stay in the
> > outgoing queue and are never flushed. So far the problem is hiding from
> > me. :( Not sure if that is also your case.
> >
> > Any ideas on this issue?
> >
> > Thanks,
> >
> >   -- Gato
> >
>
> Not sure either. My problem appears only when using SSL FIlter.
> If you can prepare a short test case I can run it on my machine to confirm
> it at least.

Still suffering from this issue?  It would be really nice if I can
reproduce it by myself.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: SSL Client does not send any data

Posted by Trustin Lee <tr...@gmail.com>.
On 7/10/07, Raman Gupta <ro...@fastmail.fm> wrote:
> Trustin Lee wrote:
> >
> > On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
> >> I found unexpected write order problem in SSL handshaking process, but
> >> I still don't know why the order is sometimes mixed up.  I suspect
> >> there might be a kind of visibility problem.  I believe I am very
> >> close to the solution anyway.
> >
> > I guess I found why.  Please try the following JAR and let me know if
> > it fixes the problem.
> >
> > http://tinyurl.com/36y83t
> >
>
> Trustin, could you summarize what was changed in this jar, or point me to a
> JIRA issue or svn commit? I am trying to determine if the changes made might
> fix the problem I described here:
>
> http://www.nabble.com/forum/ViewPost.jtp?post=11326681&framed=y

Yes, if your problem appears right after the connection is
established.  If not, I guess it won't fix your problem.  But you'd
better give it a try.

HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: SSL Client does not send any data

Posted by Raman Gupta <ro...@fastmail.fm>.

Trustin Lee wrote:
> 
> On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
>> I found unexpected write order problem in SSL handshaking process, but
>> I still don't know why the order is sometimes mixed up.  I suspect
>> there might be a kind of visibility problem.  I believe I am very
>> close to the solution anyway.
> 
> I guess I found why.  Please try the following JAR and let me know if
> it fixes the problem.
> 
> http://tinyurl.com/36y83t
> 

Trustin, could you summarize what was changed in this jar, or point me to a
JIRA issue or svn commit? I am trying to determine if the changes made might
fix the problem I described here:

http://www.nabble.com/forum/ViewPost.jtp?post=11326681&framed=y

Thanks,
Raman Gupta

-- 
View this message in context: http://www.nabble.com/SSL-Client-does-not-send-any-data-tf3714505.html#a11509446
Sent from the mina dev mailing list archive at Nabble.com.


Re: SSL Client does not send any data

Posted by Trustin Lee <tr...@gmail.com>.
On 6/21/07, seven <ho...@gmail.com> wrote:
>
> Definitely good news!
> After hours of running the problem didn't show up.

That's a great news.  Your log file helped me indeed.

Cheers,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: SSL Client does not send any data

Posted by seven <ho...@gmail.com>.
Definitely good news!
After hours of running the problem didn't show up.

Regards,
Horia


seven wrote:
> 
> Good news!
> 
> Seems that mina-filter-ssl-1.1.1-20070611.145558-5.jar solves the problem.
> I will let the test running for a couple of hours more but in the first
> half hour the problem did't show up.
> Great job!
> 
> Regards,
> Horia 
> 
> 
> Trustin Lee wrote:
>> 
>> Any good news? :)
>> 
>> Trustin
>> 
>> On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
>>> On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
>>> > On 6/7/07, seven <ho...@gmail.com> wrote:
>>> > >
>>> > > I attached logs.zip witch contain client.log and server.log
>>> > > They are rather verbose ( DEBUG enabled ).
>>> > >
>>> > > I noticed that the problem occurs later than sooner with DEBUG
>>> enabled but
>>> > > it happens anyway.
>>> >
>>> > I found unexpected write order problem in SSL handshaking process, but
>>> > I still don't know why the order is sometimes mixed up.  I suspect
>>> > there might be a kind of visibility problem.  I believe I am very
>>> > close to the solution anyway.
>>>
>>> I guess I found why.  Please try the following JAR and let me know if
>>> it fixes the problem.
>>>
>>> http://tinyurl.com/36y83t
>>>
>>> HTH,
>>> Trustin
>>> --
>>> what we call human nature is actually human habit
>>> --
>>> http://gleamynode.net/
>>> --
>>> PGP Key ID: 0x0255ECA6
>>>
>> 
>> 
>> -- 
>> what we call human nature is actually human habit
>> --
>> http://gleamynode.net/
>> --
>> PGP Key ID: 0x0255ECA6
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/SSL-Client-does-not-send-any-data-tf3714505.html#a11227174
Sent from the mina dev mailing list archive at Nabble.com.


Re: SSL Client does not send any data

Posted by seven <ho...@gmail.com>.
Good news!

Seems that mina-filter-ssl-1.1.1-20070611.145558-5.jar solves the problem. I
will let the test running for a couple of hours more but in the first half
hour the problem did't show up.
Great job!

Regards,
Horia 


Trustin Lee wrote:
> 
> Any good news? :)
> 
> Trustin
> 
> On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
>> On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
>> > On 6/7/07, seven <ho...@gmail.com> wrote:
>> > >
>> > > I attached logs.zip witch contain client.log and server.log
>> > > They are rather verbose ( DEBUG enabled ).
>> > >
>> > > I noticed that the problem occurs later than sooner with DEBUG
>> enabled but
>> > > it happens anyway.
>> >
>> > I found unexpected write order problem in SSL handshaking process, but
>> > I still don't know why the order is sometimes mixed up.  I suspect
>> > there might be a kind of visibility problem.  I believe I am very
>> > close to the solution anyway.
>>
>> I guess I found why.  Please try the following JAR and let me know if
>> it fixes the problem.
>>
>> http://tinyurl.com/36y83t
>>
>> HTH,
>> Trustin
>> --
>> what we call human nature is actually human habit
>> --
>> http://gleamynode.net/
>> --
>> PGP Key ID: 0x0255ECA6
>>
> 
> 
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
> 
> 

-- 
View this message in context: http://www.nabble.com/SSL-Client-does-not-send-any-data-tf3714505.html#a11208881
Sent from the mina dev mailing list archive at Nabble.com.


Re: SSL Client does not send any data

Posted by seven <ho...@gmail.com>.
I am sorry for the late answer but i was in vacation. I will be able to try
the snapshot in a couple of days.

Regards,
Horia


Trustin Lee wrote:
> 
> Any good news? :)
> 
> Trustin
> 
> On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
>> On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
>> > On 6/7/07, seven <ho...@gmail.com> wrote:
>> > >
>> > > I attached logs.zip witch contain client.log and server.log
>> > > They are rather verbose ( DEBUG enabled ).
>> > >
>> > > I noticed that the problem occurs later than sooner with DEBUG
>> enabled but
>> > > it happens anyway.
>> >
>> > I found unexpected write order problem in SSL handshaking process, but
>> > I still don't know why the order is sometimes mixed up.  I suspect
>> > there might be a kind of visibility problem.  I believe I am very
>> > close to the solution anyway.
>>
>> I guess I found why.  Please try the following JAR and let me know if
>> it fixes the problem.
>>
>> http://tinyurl.com/36y83t
>>
>> HTH,
>> Trustin
>> --
>> what we call human nature is actually human habit
>> --
>> http://gleamynode.net/
>> --
>> PGP Key ID: 0x0255ECA6
>>
> 
> 
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
> 
> 

-- 
View this message in context: http://www.nabble.com/SSL-Client-does-not-send-any-data-tf3714505.html#a11183191
Sent from the mina dev mailing list archive at Nabble.com.


Re: SSL Client does not send any data

Posted by Trustin Lee <tr...@gmail.com>.
Any good news? :)

Trustin

On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
> On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
> > On 6/7/07, seven <ho...@gmail.com> wrote:
> > >
> > > I attached logs.zip witch contain client.log and server.log
> > > They are rather verbose ( DEBUG enabled ).
> > >
> > > I noticed that the problem occurs later than sooner with DEBUG enabled but
> > > it happens anyway.
> >
> > I found unexpected write order problem in SSL handshaking process, but
> > I still don't know why the order is sometimes mixed up.  I suspect
> > there might be a kind of visibility problem.  I believe I am very
> > close to the solution anyway.
>
> I guess I found why.  Please try the following JAR and let me know if
> it fixes the problem.
>
> http://tinyurl.com/36y83t
>
> HTH,
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>


-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: SSL Client does not send any data

Posted by Trustin Lee <tr...@gmail.com>.
On 6/11/07, Trustin Lee <tr...@gmail.com> wrote:
> On 6/7/07, seven <ho...@gmail.com> wrote:
> >
> > I attached logs.zip witch contain client.log and server.log
> > They are rather verbose ( DEBUG enabled ).
> >
> > I noticed that the problem occurs later than sooner with DEBUG enabled but
> > it happens anyway.
>
> I found unexpected write order problem in SSL handshaking process, but
> I still don't know why the order is sometimes mixed up.  I suspect
> there might be a kind of visibility problem.  I believe I am very
> close to the solution anyway.

I guess I found why.  Please try the following JAR and let me know if
it fixes the problem.

http://tinyurl.com/36y83t

HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: SSL Client does not send any data

Posted by Trustin Lee <tr...@gmail.com>.
On 6/7/07, seven <ho...@gmail.com> wrote:
>
> I attached logs.zip witch contain client.log and server.log
> They are rather verbose ( DEBUG enabled ).
>
> I noticed that the problem occurs later than sooner with DEBUG enabled but
> it happens anyway.

I found unexpected write order problem in SSL handshaking process, but
I still don't know why the order is sometimes mixed up.  I suspect
there might be a kind of visibility problem.  I believe I am very
close to the solution anyway.

Could you please send me the log files that print the name of the
current thread?  Adding "%t" flag to your Log4J pattern layout will do
the job.

Thanks,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: SSL Client does not send any data

Posted by seven <ho...@gmail.com>.
I attached logs.zip witch contain client.log and server.log
They are rather verbose ( DEBUG enabled ).

I noticed that the problem occurs later than sooner with DEBUG enabled but
it happens anyway.

Regards,
Horia

http://www.nabble.com/file/p11007693/logs.zip logs.zip  


Trustin Lee wrote:
> 
> On 6/5/07, seven <ho...@gmail.com> wrote:
>>
>> Unfortunately it does not resolve my problem. Still the same behavior.
>> I am using java version "1.6.0_01" on WinXP SP2.
>> I have tried different combinations:
>>
>> server using mina-filter-ssl-1.1.0-SNAPSHOT.jar, client using
>> mina-filter-ssl-1.1.0-SNAPSHOT.jar = OK
>> server using mina-filter-ssl-1.1.0-SNAPSHOT.jar, client using
>> mina-filter-ssl-1.1.0.jar = FAILS after few rounds
>> server using mina-filter-ssl-1.1.0-SNAPSHOT.jar, client using
>> mina-filter-ssl-1.1.1-20070605.030254-4.jar = FAILS after few rounds
>> -----
>> server using mina-filter-ssl-1.1.0.jar, client using
>> mina-filter-ssl-1.1.0-SNAPSHOT.jar = OK
>> server using mina-filter-ssl-1.1.0.jar, client using
>> mina-filter-ssl-1.1.0.jar = FAILS after few rounds
>> server using mina-filter-ssl-1.1.0.jar, client using
>> mina-filter-ssl-1.1.1-20070605.030254-4.jar = FAILS mostly after few
>> rounds
>> -----
>> server using mina-filter-ssl-1.1.1-20070605.030254-4.jar, client using
>> mina-filter-ssl-1.1.0-SNAPSHOT.jar = OK
>> server using mina-filter-ssl-1.1.1-20070605.030254-4.jar, client using
>> mina-filter-ssl-1.1.0.jar = FAILS after few rounds
>> server using mina-filter-ssl-1.1.1-20070605.030254-4.jar, client using
>> mina-filter-ssl-1.1.1-20070605.030254-4.jar = FAILS after few rounds
> 
> Please use mina-filter-ssl-1.1.1-20070605.030254-4.jar  only and show
> us all the log messages you got in both sides (client and server).
> 
> To enable DEBUG level, you have to use slf4j-log4j12 and log4j 1.2.x.
> The output file with DEBUG level enabled is appreciated.
> 
> Thanks,
> Trustin
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
> 
> 

-- 
View this message in context: http://www.nabble.com/SSL-Client-does-not-send-any-data-tf3714505.html#a11007693
Sent from the mina dev mailing list archive at Nabble.com.


Re: SSL Client does not send any data

Posted by Trustin Lee <tr...@gmail.com>.
On 6/5/07, seven <ho...@gmail.com> wrote:
>
> Unfortunately it does not resolve my problem. Still the same behavior.
> I am using java version "1.6.0_01" on WinXP SP2.
> I have tried different combinations:
>
> server using mina-filter-ssl-1.1.0-SNAPSHOT.jar, client using
> mina-filter-ssl-1.1.0-SNAPSHOT.jar = OK
> server using mina-filter-ssl-1.1.0-SNAPSHOT.jar, client using
> mina-filter-ssl-1.1.0.jar = FAILS after few rounds
> server using mina-filter-ssl-1.1.0-SNAPSHOT.jar, client using
> mina-filter-ssl-1.1.1-20070605.030254-4.jar = FAILS after few rounds
> -----
> server using mina-filter-ssl-1.1.0.jar, client using
> mina-filter-ssl-1.1.0-SNAPSHOT.jar = OK
> server using mina-filter-ssl-1.1.0.jar, client using
> mina-filter-ssl-1.1.0.jar = FAILS after few rounds
> server using mina-filter-ssl-1.1.0.jar, client using
> mina-filter-ssl-1.1.1-20070605.030254-4.jar = FAILS mostly after few rounds
> -----
> server using mina-filter-ssl-1.1.1-20070605.030254-4.jar, client using
> mina-filter-ssl-1.1.0-SNAPSHOT.jar = OK
> server using mina-filter-ssl-1.1.1-20070605.030254-4.jar, client using
> mina-filter-ssl-1.1.0.jar = FAILS after few rounds
> server using mina-filter-ssl-1.1.1-20070605.030254-4.jar, client using
> mina-filter-ssl-1.1.1-20070605.030254-4.jar = FAILS after few rounds

Please use mina-filter-ssl-1.1.1-20070605.030254-4.jar  only and show
us all the log messages you got in both sides (client and server).

To enable DEBUG level, you have to use slf4j-log4j12 and log4j 1.2.x.
The output file with DEBUG level enabled is appreciated.

Thanks,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: SSL Client does not send any data

Posted by seven <ho...@gmail.com>.
Unfortunately it does not resolve my problem. Still the same behavior.
I am using java version "1.6.0_01" on WinXP SP2.
I have tried different combinations:

server using mina-filter-ssl-1.1.0-SNAPSHOT.jar, client using
mina-filter-ssl-1.1.0-SNAPSHOT.jar = OK
server using mina-filter-ssl-1.1.0-SNAPSHOT.jar, client using
mina-filter-ssl-1.1.0.jar = FAILS after few rounds
server using mina-filter-ssl-1.1.0-SNAPSHOT.jar, client using
mina-filter-ssl-1.1.1-20070605.030254-4.jar = FAILS after few rounds
-----
server using mina-filter-ssl-1.1.0.jar, client using
mina-filter-ssl-1.1.0-SNAPSHOT.jar = OK
server using mina-filter-ssl-1.1.0.jar, client using
mina-filter-ssl-1.1.0.jar = FAILS after few rounds
server using mina-filter-ssl-1.1.0.jar, client using
mina-filter-ssl-1.1.1-20070605.030254-4.jar = FAILS mostly after few rounds
-----
server using mina-filter-ssl-1.1.1-20070605.030254-4.jar, client using
mina-filter-ssl-1.1.0-SNAPSHOT.jar = OK
server using mina-filter-ssl-1.1.1-20070605.030254-4.jar, client using
mina-filter-ssl-1.1.0.jar = FAILS after few rounds
server using mina-filter-ssl-1.1.1-20070605.030254-4.jar, client using
mina-filter-ssl-1.1.1-20070605.030254-4.jar = FAILS after few rounds

Regards,
Horia


Trustin Lee wrote:
> 
> I'm not 100% sure that I fixed this issue, but I found a small
> visibility issue in SSLFilter.  Please try the following snapshot to
> test if my fix resolves the problem.
> 
> http://tinyurl.com/29u77b
> 
> HTH,
> Trustin
> 
> On 6/5/07, Gaston Dombiak <ga...@jivesoftware.com> wrote:
>> Yep, the issue is still "alive and kicking". :) Unfortunately, we are
>> only seeing it in some production environments (of some users using
>> Openfire) and still haven't found a way to reproduce it. I modified MINA
>> 1.1 to System.out.print in the following places and nothing was printed:
>>
>> 1. SocketIOProcessor#doFlush() when key is null
>> 2. SocketIOProcessor#doFlush() when key is invalid
>>
>> Since nothing was printed and things were still queuing up then we can
>> say that the problem is not in those places. Being optimistic....it is
>> good to have less uncertainty although we are still uncertain of what is
>> going on. :D
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
> 
> 

-- 
View this message in context: http://www.nabble.com/SSL-Client-does-not-send-any-data-tf3714505.html#a10969241
Sent from the mina dev mailing list archive at Nabble.com.


RE: SSL Client does not send any data

Posted by Gaston Dombiak <ga...@jivesoftware.com>.
Hey Trustin,

I will give it a try and let you know. I don't have MINA code at hand
now but my impression was that the problem is that (one or more?)
sessions have byte buffers pending to be flushed and for some reason
they remain there forverver. IIRC, that queue of things to send is
filled after the chain of filters has been applied so I don't see how a
fix in SSLFilter can do it. Anyway, I will give it a try. :)

Thanks,

  -- Gato

-----Original Message-----
From: Trustin Lee [mailto:trustin@gmail.com] 
Sent: Monday, June 04, 2007 8:16 PM
To: dev@mina.apache.org
Cc: Horia Muntean
Subject: Re: SSL Client does not send any data

I'm not 100% sure that I fixed this issue, but I found a small
visibility issue in SSLFilter.  Please try the following snapshot to
test if my fix resolves the problem.

http://tinyurl.com/29u77b

HTH,
Trustin

On 6/5/07, Gaston Dombiak <ga...@jivesoftware.com> wrote:
> Yep, the issue is still "alive and kicking". :) Unfortunately, we are
> only seeing it in some production environments (of some users using
> Openfire) and still haven't found a way to reproduce it. I modified
MINA
> 1.1 to System.out.print in the following places and nothing was
printed:
>
> 1. SocketIOProcessor#doFlush() when key is null
> 2. SocketIOProcessor#doFlush() when key is invalid
>
> Since nothing was printed and things were still queuing up then we can
> say that the problem is not in those places. Being optimistic....it is
> good to have less uncertainty although we are still uncertain of what
is
> going on. :D
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: SSL Client does not send any data

Posted by Trustin Lee <tr...@gmail.com>.
I'm not 100% sure that I fixed this issue, but I found a small
visibility issue in SSLFilter.  Please try the following snapshot to
test if my fix resolves the problem.

http://tinyurl.com/29u77b

HTH,
Trustin

On 6/5/07, Gaston Dombiak <ga...@jivesoftware.com> wrote:
> Yep, the issue is still "alive and kicking". :) Unfortunately, we are
> only seeing it in some production environments (of some users using
> Openfire) and still haven't found a way to reproduce it. I modified MINA
> 1.1 to System.out.print in the following places and nothing was printed:
>
> 1. SocketIOProcessor#doFlush() when key is null
> 2. SocketIOProcessor#doFlush() when key is invalid
>
> Since nothing was printed and things were still queuing up then we can
> say that the problem is not in those places. Being optimistic....it is
> good to have less uncertainty although we are still uncertain of what is
> going on. :D
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

RE: SSL Client does not send any data

Posted by Gaston Dombiak <ga...@jivesoftware.com>.
Yep, the issue is still "alive and kicking". :) Unfortunately, we are
only seeing it in some production environments (of some users using
Openfire) and still haven't found a way to reproduce it. I modified MINA
1.1 to System.out.print in the following places and nothing was printed:

1. SocketIOProcessor#doFlush() when key is null
2. SocketIOProcessor#doFlush() when key is invalid

Since nothing was printed and things were still queuing up then we can
say that the problem is not in those places. Being optimistic....it is
good to have less uncertainty although we are still uncertain of what is
going on. :D

Thanks,

  -- Gato
 
-----Original Message-----
From: Trustin Lee [mailto:trustin@gmail.com] 
Sent: Monday, June 04, 2007 1:24 AM
To: dev@mina.apache.org
Subject: Re: SSL Client does not send any data

On 5/24/07, seven <ho...@gmail.com> wrote:
>
>
> Gaston Dombiak wrote:
> >
> > Hey,
> >
> > I'm using MINA 1.1 and tracking a problem where byte buffers stay in
the
> > outgoing queue and are never flushed. So far the problem is hiding
from
> > me. :( Not sure if that is also your case.
> >
> > Any ideas on this issue?
> >
> > Thanks,
> >
> >   -- Gato
> >
>
> Not sure either. My problem appears only when using SSL FIlter.
> If you can prepare a short test case I can run it on my machine to
confirm
> it at least.

Still suffering from this issue?  It would be really nice if I can
reproduce it by myself.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6