100% CPU on SocketChannelImpl.connect()

Guy Korland gkorland at gmail.com
Tue Apr 15 12:21:31 PDT 2008


We saw it happens on JDK5.0_u14 and JDK6.0_u5 also it happens on Linux
and Windows.
As you can see form the attached jpg the application only call
connect() 20 times but it takes around 6 minutes.

Guy

On Tue, Apr 15, 2008 at 9:04 PM, Alan Bateman <Alan.Bateman at sun.com> wrote:
> Guy Korland wrote:
>
> >
> > > I haven't seen this code cause problems before. Do you have an example
> that
> > > demonstrates this?
> > >
> > >
> > I don't have a specific example, we saw it when using we Jini with an
> > Exporter that we developed based on NIO.
> >
> >
> >
> > > If so, which operating system?
> > >
> > >
> > We saw it on windows XP
> >
> >
> >
> > > I assume for this to loop the channel must be configured blocking and
> > >
> > >
> > the connect is interrupted.
> > Yes it's configured blocking but I'm not sure about the interrupt.
> >
> >
> >
> > > Have you run with truss, strace, or equivalent to see if this is so.
> > >
> > >
> > We saw it using JProfiler.
> >
> >
>  Which OpenJDK build was this? I'm curious because Windows Sockets calls are
> never interrupted so that error should never be returned. Any chance the
> application in question is in a loop creating SocketChannels and calling
> connect (perhaps catching and ignoring an IOException). Just a guess. It
> would also be interesting to know if this happens outside of the profiler.
>
>  -Alan.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: connect.JPG
Type: image/jpeg
Size: 21593 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/net-dev/attachments/20080415/6e8154b0/connect.JPG 


More information about the net-dev mailing list