geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Mulder <ammul...@alumni.princeton.edu>
Subject Re: Weird build errors on SuSE 9.2
Date Sun, 31 Oct 2004 22:24:09 GMT
	Right.  The question is, are we willing to change our code to 
accomodate a bug that, so far, only I am running into?  :)  I sent bug 
reports to Sun and SuSE, but I suspect they'll go to the great bit bucket 
in the sky, since SuSE 9.2 isn't a supported platform for Sun, and I doubt 
SuSE cares that much about JDK problems.

	Though, I guess I should ask, how were you able to duplicate the 
problem?  Do you also have a SuSE 9.2 machine, or did you do it on some 
other platform/kernel?

Thanks,
	Aaron

On Sun, 31 Oct 2004, Craig Johannsen wrote:
> Hi Aaron,
> 
> "ssc.socket().accept()" throws a SocketTimeoutException, while 
> "ssc.accept()" does not. One would think that they would have identical 
> behaviour, but apparently not. Here's an example where the socket 
> timeout works with both JDK 1.4.2_03 and JDK 1.5.
> 
> Cheers,
> Craig
> 
> import java.io.IOException;
> import java.net.*;
> import java.nio.channels.*;
> 
> // This code hangs on some Linux systems.
> public class Hang {
> public static void main(String[] args) {
> try {
> ServerSocketChannel ssc = ServerSocketChannel.open();
> ssc.configureBlocking(true);
> ssc.socket().bind(new InetSocketAddress(InetAddress.getLocalHost(), 
> 2010),50);
> ssc.socket().setSoTimeout(5000);
> System.out.println("accepting...");
> ssc.socket().accept();
> } catch (IOException e) {
> e.printStackTrace();
> }
> System.out.println("Finished");
> }
> }
> 
> 
> Aaron Mulder wrote:
> 
> >	Now I'm having trouble under 1.5 too, on my laptop.
> >
> >	Looking at a thread dump, it seems like the SO_TIMEOUT is ignored, 
> >and also interrupting a thread in a ServerSocketChannel blocking accept 
> >doesn't have any effect at all.
> >
> >Aaron
> >
> >-- This class hangs when run:
> >
> >public class Temp {
> >    public static void main(String[] args) {
> >        try {
> >            ServerSocketChannel ssc  = ServerSocketChannel.open();
> >            ssc.socket().bind(new InetSocketAddress(InetAddress.getLocalHost(), 2010),50);
> >            ssc.socket().setSoTimeout(5000);
> >            System.out.println("accepting...");
> >            ssc.accept();
> >        } catch (IOException e) {
> >            e.printStackTrace();
> >        }
> >        System.out.println("Finished");
> >    }
> >}
> >
> >-- A similar test with only a ServerSocket runs fine.
> >  
> >
> >
> 
> 

Mime
View raw message