Re: [proxy-suite] Investigating I_NREAD ioctl on Solaris 8 (dropped connections)
On Mon, Feb 04, 2002 at 11:35:33AM +0100, Pascal Gienger wrote:
I think the problem lies in here, com-socket.c, line 1069:
if (len = 0) { #if defined(COMPILE_DEBUG) debug(1, "closed: %s %d=%s", hls->ctyp, hls->sock, hls->peer); #endif close(hls->sock); hls->sock = -1; return; }
Is it really like this that the ioctl(fd,I_NREAD,&len) returns 0 as "len" when the connection is terminated? What happens if just the network is too slow and the input buffer does not get filled in time (latency et.al.)?
I tried to change the "if (ioctl(hls->sock,I_NREAD,&len) < 0)" to "if ((erg=ioctl(...))<0)" to be able to watch the result value of the ioctl call.
Result: When the connection breaks, then len AND erg are zero:
11:23:53 < 993> ll_read Srv-Data 5=134.34.3.2: 1460/42630844 bytes 11:23:53 < 993> Srv-Data -> Cli-Data 11:23:53 < 993> ll_write Cli-Data 6=134.34.1.61: 1460/42630844 bytes 11:23:53 < 993> ll_read Srv-Data 5=134.34.3.2: 22548/42653392 bytes 11:23:53 < 993> Srv-Data -> Cli-Data 11:23:53 < 993> ll_write Cli-Data 6=134.34.1.61: 22548/42653392 bytes 11:23:53 < 993> closed: Srv-Data 5=134.34.3.2 11:23:53 < 993> len, erg: 0,0 <--- (debug line inserted by myself) 11:23:53 < 993> about to destroy Srv-Data
So this is a bug in the Solaris streamsio-Interface, isn't it? When the file is really transferred entirely it also returns "0" as len and "0" as erg.
Yes. This is also what the manpage says (man streamio ?).
So your program really thinks the file has finished. But WHY Solaris 8 does issue 0/0 also in the middle of a connection?
Don't ask me... ???
Sorry if I am posting too much, I'll stop it if it annoys you.
This is realy fine, that you post! Go on!
I just wanted to give some detailed bug description. Perhaps somebody knows a "trick"...
Gruesse,
Marius Tomaschewski
participants (1)
-
Marius Tomaschewski