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 23:59:44 GMT
	Alright, the saga continues.  Erin tried my test on SuSE 9.1, and
that has the accept problem too, so it seems that it's nothing new.

	If I run "maven -o clean && maven -o" from the modules/remoting 
directory, then the test runs fine.  If I write a little test case, 
including that bit where a separate thread interrupts the accept thread, 
it successfully wakes up the accept thread.

	And now if I run a "maven -o m:rebuild-all" from the top level 
directory, it works.

	I'm seriously confused.  What did I do in between?  I ran a
complete build by disabling tests in the remoting module (but they're now
enabled again and I see their output).  I suspended my laptop and ate
dinner (though I had tried suspending and rebooting before and it didn't
make a difference).  I wrote a bit.  I fiddled with test cases, outside of
my Geronimo tree.  I haven't done any online builds or updates, so I have
the same code I had before.  WTF?

	Perhaps some internet site was down then and up now, but it
doesn't look like the test cares. Is there any way this could be caused by
binding to 0.0.0.0 instead of 127.0.0.1?  Could that cause a network
lookup somehow?  Is there something that doesn't get cleaned by
m:rebuild-all?  Was this all a goose chase?  I'm at a loss.

	Anyway, it now seems that I'm not unique in getting the accept 
error (that is, SO_TIMEOUT not working).  So I suggest we switch from 
ServerSocketChannel to ServerSocket for our blocking I/O server.

Aaron

On Sun, 31 Oct 2004, Aaron Mulder wrote:
> 	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