From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8f6dc5bfebaf357f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!o13g2000cwo.googlegroups.com!not-for-mail From: "fabio de francesco" Newsgroups: comp.lang.ada Subject: Re: "broken pipe" while reading/writing stream-based sockets Date: 11 May 2005 08:01:38 -0700 Organization: http://groups.google.com Message-ID: <1115823698.428854.113380@o13g2000cwo.googlegroups.com> References: <1115766179.505983.40960@f14g2000cwb.googlegroups.com> <4281e280$0$21650$ba620e4c@news.skynet.be> NNTP-Posting-Host: 80.181.51.89 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1115823702 8187 127.0.0.1 (11 May 2005 15:01:42 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 11 May 2005 15:01:42 +0000 (UTC) In-Reply-To: <4281e280$0$21650$ba620e4c@news.skynet.be> User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: o13g2000cwo.googlegroups.com; posting-host=80.181.51.89; posting-account=Lp02jQ0AAABMd3TAghNf0TM2YBZqD_JE Xref: g2news1.google.com comp.lang.ada:10994 Date: 2005-05-11T08:01:38-07:00 List-Id: Adrien Plisson wrote: > fabio de francesco wrote: > > I usually test the server this way: > > > > $ ./tcp_client abc & ./tcp_client def & ./tcp_client xyz & ./tcp_client > > kill > > > > 1) Why does this server sometimes crash with "Broken Pipe"? > > on my windows machine, i get the windows equivalent ("connection reset > by peer") on every test. I get the same error as yours on the client side. "Broken Pipe" is only on server side. We get "connection reset by peer" only after the server crashes. > > it seems due to the speed of your computer. i observed that closing a > local socket (that is a socket which connect a server and a client on > the same machine) while data are not already received by the other > side always causes loss of data on fast computers. > I'm not so sure, because I have never seen that "Broken Pipe" error before now on my computer. Furthermore I don't get any crashes while running similar client/server Ada programs using T'Input/T'Output or Receive_Socket/Send_Socket on the same computer. If it can help in investigating this issue I can post these other programs too. As a consequence I must think I am missing something in that specific code. Please help me to spot what I'm doing wrong. fabio de francesco