On Wed, Nov 16, 2011 at 1:41 PM, Claus Folke Brobak <cfb / jndata.dk> wrote:
> Environment:
>
> - AIX 6.1
>
> - Java:
>  ¨Âáööåòóé®¶®°>  ¨Âáöá¨ÔÍÓÅ ÒõîôéíÅîöéòïîíåî¨âõéìä ðáð³²¶°óò¹æð±­²°±±°²°¸ß°³¨ÓÒ> FP1))
>  ¨ÂÂÍ Ê¹ ÖÍ ¨âõéìä ²®´¬ ÊÒ±®¶®ÉÂʹ ²®ÁÉððã­³²
> jvmap3260sr9-20110203_74623 (JIT enabled, AOT enabled)
>  ¨Â¹Ö²°±±°²°³ß°·´¶²>  ¨ÂÉÔ  ò¹ß²°±°±°²¸ß±·´¸¸éæø>  ¨Â²°±°±°²·ßÁÁ©
>  ¨ÂÃÌ  ²°±±°²°³ß°>
> - jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (IBM J9 VM 1.6.0)
> [AIX-ppc-java]
>
> - Gems:
>  bouncy-castle-java (1.5.0146.1)
>  jruby-openssl (0.7.4)
>  net-ssh (2.2.1)
>
> Code:
>  ¨Âåñõéòå §òõâùçåíó§
>  ¨Âåñõéòå §îåô¯óóè>  ¨Âïó§øøøøøøø®øøøøøø®øøø§
>  ¨Âóåòîáí§øøøø§
>  ¨ÂåôººÓÓÈ®óôáòô¨èïóôõóåòîáíåºöåòâïóå ½¾ ºäåâõçäï üóóè>  ¨Âõôóóè®åøå㡨¢èïóôîáíå¢>  ¨Âõôóóè®åøå㡨¢ìó¢>  ¨Âîä
>
> When running this program it hangs for 30 seconds at four points, as I
> have shown below. Note that I have omitted a number of lines.
>
> 
> 
>  ¨ÂÛ²°±±­±±­±¶Ô±±ºµ³º±±®´··°°£±²±³³µ²°±¸Ý ÄÅÂÕ­­ ôãðóïãëåôÛ·ä´Ý> received packet nr 6 type 52 len 12
>  ¨ÂÛ²°±±­±±­±¶Ô±±ºµ³º±±®´·¸°°£±²±³³µ²°±¸Ý ÄÅÂÕ­­
> net.ssh.authentication.methods.publickey[7dc]: publickey succeeded
> (2d:32:27:ed:60:c8:28:28:77:50:7d:40:d7:83:ef:4b)
>  ¨ÂÛ²°±±­±±­±¶Ô±±ºµ³º±±®´¸²°°£±²±³³µ²°±¸Ý ÄÅÂÕ­­ ôãðóïãëåôÛ·ä´Ý> queueing packet nr 7 type 90 len 44
> << Hangs for 30 seconds, then continues >>>
> 
> 
>  ¨ÂÛ²°±±­±±­±¶Ô±±ºµ³º´±®µ·³°°£±²±³³µ²°±¸Ý ÄÅÂÕ­­ ôãðóïãëåôÛ·ä´Ý> received packet nr 8 type 91 len 28
>  ¨ÂÛ²°±±­±±­±¶Ô±±ºµ³º´±®µ··°°£±²±³³µ²°±¸Ý  ¨ÂÎÆ­­
> net.ssh.connection.session[7de]: channel_open_confirmation: 0 0 0 32768
>  ¨ÂÛ²°±±­±±­±¶Ô±±ºµ³º´±®µ·¹°°£±²±³³µ²°±¸Ý  ¨ÂÎÆ­­
> net.ssh.connection.channel[7e0]: sending channel request "exec"
>  ¨ÂÛ²°±±­±±­±¶Ô±±ºµ³º´±®µ¸¶°°£±²±³³µ²°±¸Ý ÄÅÂÕ­­ ôãðóïãëåôÛ·ä´Ý> queueing packet nr 9 type 98 len 44
> << Hangs for 30 seconds, then continues >>>
> 
> 
>  ¨ÂÛ²°±±­±±­±¶Ô±±ºµ´º±±®µµ¶°°£±²±³³µ²°±¸Ý ÄÅÂÕ­­ ôãðóïãëåôÛ·ä´Ý> received packet nr 15 type 97 len 12
>  ¨ÂÛ²°±±­±±­±¶Ô±±ºµ´º±±®µµ¸°°£±²±³³µ²°±¸Ý  ¨ÂÎÆ­­
> net.ssh.connection.session[7de]: channel_close: 0
>  ¨ÂÛ²°±±­±±­±¶Ô±±ºµ´º±±®µ¶°°°£±²±³³µ²°±¸Ý ÄÅÂÕ­­ ôãðóïãëåôÛ·ä´Ý> queueing packet nr 11 type 97 len 28
> << Output from hostname command >>>
>  ¨ÂÛ²°±±­±±­±¶Ô±±ºµ´º±±®µ¶³°°£±²±³³µ²°±¸Ý ÄÅÂÕ­­ ôãðóïãëåôÛ·ä´Ý> queueing packet nr 12 type 90 len 44
> << Hangs for 30 seconds, then continues >>>
> 
> 
>  ¨ÂÛ²°±±­±±­±¶Ô±±ºµ´º´±®µ±°°°£±²±³³µ²°±¸Ý ÄÅÂÕ­­ ôãðóïãëåôÛ·ä´Ý> received packet nr 17 type 91 len 28
>  ¨ÂÛ²°±±­±±­±¶Ô±±ºµ´º´±®µ±´°°£±²±³³µ²°±¸Ý  ¨ÂÎÆ­­
> net.ssh.connection.session[7de]: channel_open_confirmation: 1 1 0 32768
>  ¨ÂÛ²°±±­±±­±¶Ô±±ºµ´º´±®µ±µ°°£±²±³³µ²°±¸Ý  ¨ÂÎÆ­­
> net.ssh.connection.channel[7e2]: sending channel request "exec"
>  ¨ÂÛ²°±±­±±­±¶Ô±±ºµ´º´±®µ±¸°°£±²±³³µ²°±¸Ý ÄÅÂÕ­­ ôãðóïãëåôÛ·ä´Ý> queueing packet nr 13 type 98 len 28
> << Hangs for 30 seconds, then continues >>>
> 
> 
> << Output from ls command >>>
>  ¨ÂÛ²°±±­±±­±¶Ô±±ºµµº±±®µ´¹°°£±²±³³µ²°±¸Ý  ¨ÂÎÆ­­
> net.ssh.connection.session[7de]: closing remaining channels (0 open)
>
> If I switch to Java 5 on AIX instead, the program runs without problems.
> Also, I can run the same program without problems on Windows XP and Java
> 6 (from Oracle).
>
> Any help in solving this problem would be much appreciated.

Hmm...  The first thing that comes to mind is "reverse lookups".  see
http://rubydoc.info/stdlib/socket/1.9.3/IPSocket#addr-instance_method

You could try strace or truss to see what is different in socket
handling between the two versions of Java which show a difference.

Kind regards

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/