Additional tests on AIX

"이희승 (Trustin Lee)" trustin at gmail.com
Wed Jul 8 09:38:19 EDT 2009


I think it's the constraint level autodetector that keeps the server
from shutting down.  I didn't modify the autodetector at all, so it's
weird that it fails in AIX.

I've just checked in the workaround for this problem at revision 1536.
Could you confirm?

Thanks,
Trustin

On 07/08/2009 09:40 PM, Frederic Bregier wrote:
> Hi Trustin,
> No problem! I'm using the exact same code than before.
> 
> Sadly, it seems a bug comes back... but it is not stable...
> 
> Using JDK6 on AIX, I've got two kinds of running: (java is run without any
> special argument)
> 
> A) When it is ok
> - Netty server first says : (after 1 seconds or so)
> 8 juil. 2009 14:30:00 org.jboss.netty.channel.socket.nio.NioProviderMetadata
> null
> INFO: Using the autodetected NIO constraint level: 1 (Use better NIO
> provider for better performance)
> 
> - Then when the client starts, the server says before exiting normally:
> Channel connected
> Msg received and will close channel
> Close channel
> Free main
> Close child channel
> End of server
> Close main channel
> 
> I've got exactly the same when using JDK5 (and stable then).
> 
> 
> B) When it is KO (only JDK6 from time to time, until now, each 1 on 3 runs)
> - Netty server first says : (after 6 seconds or so)
> 8 juil. 2009 14:10:09 org.jboss.netty.channel.socket.nio.NioProviderMetadata
> null
> WARNING: NIO constraint level autodetection timed out.
> 8 juil. 2009 14:10:09 org.jboss.netty.channel.socket.nio.NioProviderMetadata
> null
> WARNING: Failed to autodetect the NIO constraint level; using the safest
> level (2)
> 
> - Then when the client starts, the server says before it hangs:
> Channel connected
> Msg received and will close channel
> Close channel
> Free main
> Close child channel
> End of server
> Close main channel
> 
> - If I try to launch a new client, the new client says:
> Connect to server 3333
> Exception in thread "main" java.net.ConnectException: Un hôte distant a
> rejeté une tentative de connexion (connect).
>         at sun.nio.ch.Net.connect(Native Method)
>         at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
>         at socket.client.Client.main(Client.java:49)
> So it cannot connect to the server and the server does not answear neither
> it stops.
> 
> So a bug comes back, slightly different than previously since now if I
> connect a second client later on after the server hangs, the server will not
> stop however as before.
> 
> For me (if I'm not wrong), there is something that badly happens during the
> NIO constraint level autodetection. If the autodetection is ok, then level
> is 1 and the test is perfectly ok. If the autodetection hangs for any reason
> (around 6 seconds), then level is 2 and the test is KO...
> 
> Here is the java dump when the server hangs:
> 
>  Full thread dump J9 VM (J2RE 6.0 IBM J9 2.4 AIX ppc64-64 build
> jvmap6460sr4ifx-20090409_3325420090409_033254_BHdSMr, native threads):
>       "JIT Compilation Thread" TID:0x0000000111CB1700,
> j9thread_t:0x00000001101248A0, state:CW, prio=10
>             (native thread ID:0x25C04D, native priority:0xB, native
> policy:UNKNOWN)
>       "Signal Dispatcher" TID:0x0000000111E4ED00,
> j9thread_t:0x0000000111D94320, state:R, prio=5
>             (native thread ID:0x15A039, native priority:0x5, native
> policy:UNKNOWN)
>           at com/ibm/misc/SignalDispatcher.waitForSignal(Native Method)
>           at com/ibm/misc/SignalDispatcher.run(SignalDispatcher.java:54)
>       "Gc Slave Thread" TID:0x000000011206BD00,
> j9thread_t:0x0000000111F8FC40, state:CW, prio=5
>             (native thread ID:0x26F0F7, native priority:0x5, native
> policy:UNKNOWN)
>       "NIO constraint level detector" TID:0x0000000112A97000,
> j9thread_t:0x0000000112A8A060, state:B, prio=5
>             (native thread ID:0x25A033, native priority:0x5, native
> policy:UNKNOWN)
>           at
> sun/nio/ch/SelectionKeyImpl.nioInterestOps(SelectionKeyImpl.java:103)
>           at
> sun/nio/ch/SelectionKeyImpl.interestOps(SelectionKeyImpl.java:65)
>           at
> org/jboss/netty/channel/socket/nio/NioProviderMetadata$ConstraintLevelAutodetector.autodetectWithoutTimeout(NioProviderMetadata.java:341)
>           at
> org/jboss/netty/channel/socket/nio/NioProviderMetadata$ConstraintLevelAutodetector$1.run(NioProviderMetadata.java:251)
>           at
> org/jboss/netty/util/ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:110)
>           at java/lang/Thread.run(Thread.java:735)
>       "pool-3-thread-1" TID:0x0000000112959000,
> j9thread_t:0x0000000112A8A560, state:R, prio=5
>             (native thread ID:0x2580DF, native priority:0x5, native
> policy:UNKNOWN)
>           at sun/nio/ch/PollArrayWrapper.poll0(Native Method)
>           at sun/nio/ch/PollArrayWrapper.poll(PollArrayWrapper.java:116)
>           at sun/nio/ch/PollSelectorImpl.doSelect(PollSelectorImpl.java:57)
>           at sun/nio/ch/SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)
>           at sun/nio/ch/SelectorImpl.select(SelectorImpl.java:80)
>           at
> org/jboss/netty/channel/socket/nio/NioProviderMetadata$SelectorLoop.run(NioProviderMetadata.java:454)
>           at
> java/util/concurrent/ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:896)
>           at
> java/util/concurrent/ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
>           at java/lang/Thread.run(Thread.java:735)
>       "DestroyJavaVM helper thread" TID:0x0000000112A95A00,
> j9thread_t:0x0000000110123EA0, state:CW, prio=5
>             (native thread ID:0x2690EB, native priority:0x5, native
> policy:UNKNOWN)
> 
> HTH,
> Frederic
> 
> 
> Trustin Lee wrote:
>> Hi Frederic,
>>
>> I've just updated the NIO socket accept code which might affect the
>> previous fix for AIX freeze.  Would you mind if you test if revision
>> 1534 works for your AIX?
>>
>> Thanks in advance!
>> Trustin
>> _______________________________________________
>> netty-dev mailing list
>> netty-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/netty-dev
>>
>>
> 
> 
> -----
> Hardware/Software Architect




More information about the netty-dev mailing list