[netty-dev] Problem during connection to the server which hangs the server

Frederic Bregier fredbregier at free.fr
Fri Oct 24 06:41:28 EDT 2008


Hi Trustin,

First, I try again with my firewall stopped. It produces exactly
the same error (under 100% CPU or so). I use the "localhost" as
IP address (not directly 127.0.0.1).

I found that the error is catch at NioWorker.register line 95
right at this.selector = selector = Selector.open();
I've got nothing else than Netty that opened channels.

I found too that the high level of CPU consuming when this error
shows up is (or probably is) at line 101/104 of NioWorker
in the same method register in the do while loop.
this.selector is probably always null so the infinite loop.

In case of the error came out at line 93 (catch at 95),
what is going on in Netty ? The catch does nothing except logging. 
Is the caller inform (here NioServerSocketPipelineSink.Boss.run() ) that
this
selector was not opened ?
I feel like this two behaviours are related, even if they could not
be from the same call (since the exception is trapped in the if
section, and this loop is in the else section).
So probably the infinite loop is on the next iteration of the
for(;;) loop in the NioServerSocketPipelineSink.Boss.run().

However, now to find who calls
sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:78,
I've got no clue, since the throw prints nothing else than the first
output I give. Do you know a way to have the full throw listing?
The only thing I get is the stack trace from getStackTrace:

Stack 0:
org.jboss.netty.channel.socket.nio.NioWorker.register(NioWorker.java:95)
Stack 1:
org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink$Boss.run(NioServerSocketPipelineSink.java:209)
Stack 2:
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
Stack 3:
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
Stack 4: java.lang.Thread.run(Thread.hava:619)

Also, the logger prints the channelId from [New I/O server boss #1] name as
channelId: id...., /0.0.0.0:6666) where 6666 is the correct port for my try.
I don't know if it can help?

Also, I've found strange that even if I set a timeout of 30s (30 000 ms),
the client says that timeout occurs at 20s. Any reason ?

I really appreciate the time you spend on it, specially since I know that I
don't 
give enough information, even if I try...

HTH,
Frederic

-----
Hardware/Software Architect
-- 
View this message in context: http://n2.nabble.com/Problem-during-connection-to-the-server-which-hangs-the-server-tp1359992p1371606.html
Sent from the Netty Developer Group mailing list archive at Nabble.com.




More information about the netty-dev mailing list