[ale] Java going bonkders

Christopher Fowler cfowler at outpostsentinel.com
Mon Apr 25 21:33:33 EDT 2005


I've got this code snippet

_newClientChannel.configureBlocking( true ) ;
writer.writeLine( "220 SAM ENS Console Proxy" ) ;




if( response.startsWith( "myid " ) )

If I telnet to the proxy server and after my telnet client sees the 220
above I do a kill -9 on the client the server will loop forever on
read()

strace shows this as fast as possible:

[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0
[pid  2222] read(13, "", 120)           = 0

Obviously this is happening inside of

String response = reader.readLine( ) ;

How do you protect against it?





More information about the Ale mailing list