From nobody@FreeBSD.org  Thu Mar 25 22:57:02 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 961E016A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 25 Mar 2004 22:57:02 -0800 (PST)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8FD9743D41
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 25 Mar 2004 22:57:02 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.10/8.12.10) with ESMTP id i2Q6v272056435
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 25 Mar 2004 22:57:02 -0800 (PST)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.10/8.12.10/Submit) id i2Q6v2o0056434;
	Thu, 25 Mar 2004 22:57:02 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200403260657.i2Q6v2o0056434@www.freebsd.org>
Date: Thu, 25 Mar 2004 22:57:02 -0800 (PST)
From: Gregory Harris <gharris@ipsentinel.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: data being lost through FIFOs
X-Send-Pr-Version: www-2.3

>Number:         64739
>Category:       kern
>Synopsis:       data being lost through FIFOs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 25 23:00:31 PST 2004
>Closed-Date:    Fri Mar 26 22:38:39 PST 2004
>Last-Modified:  Fri Mar 26 22:38:39 PST 2004
>Originator:     Gregory Harris
>Release:        5.1
>Organization:
>Environment:
FreeBSD enos.ipsentinel.com 5.1-SECURITY FreeBSD 5.1-SECURITY #0: Thu Feb  5 08:13:19 GMT 2004 root@builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
Data seems to be either be getting lost in FIFOs, or the FIFOs are not being properly flushed when the write end is being closed.  Attached is a tarball containing a simple client and server program.  The program operates normally on FreeBSD 4.8, Linux, and Solaris, but fails to operate properly under FreeBSD 5.1, and FreeBSD 5.2.1.  Sorry for submitting a sample program, but it was the only way I can replicate the error.
>How-To-Repeat:
Attached is some sample code to illustrate the problem.  Run the server program first via ./server, and then run the client program via ./client.  FIFO data will then be sent from the server to the client saying "test x" where x is a number from 0 to 9.  There is a 1 second pause between each message.  Before the counter reaches 9, hit ctrl-c to send SIGINT to the client.  The client program will then send a message over a FIFO to the server telling it to stop.  The server will then send a SIGUSR2 signal to its child process managing the test data, which then SHOULD send "___end" back to the client over the FIFO to cause the client to shutdown and go back to a shell prompt.  However the "___end" message is not received so the client just hangs waiting for the final message.
>Fix:
      
>Release-Note:
>Audit-Trail:

From: Kris Kennaway <kris@obsecurity.org>
To: Gregory Harris <gharris@ipsentinel.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/64739: data being lost through FIFOs
Date: Fri, 26 Mar 2004 20:32:51 -0800

 --/04w6evG8XlLl3ft
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Thu, Mar 25, 2004 at 10:57:02PM -0800, Gregory Harris wrote:
 
 > FreeBSD enos.ipsentinel.com 5.1-SECURITY FreeBSD 5.1-SECURITY #0: Thu Feb=
   5 08:13:19 GMT 2004 root@builder.daemonology.net:/usr/obj/usr/src/sys/GEN=
 ERIC  i386
 >=20
 > >Description:
 
 > Data seems to be either be getting lost in FIFOs, or the FIFOs are
 > not being properly flushed when the write end is being closed.
 > Attached is a tarball containing a simple client and server program.
 > The program operates normally on FreeBSD 4.8, Linux, and Solaris,
 > but fails to operate properly under FreeBSD 5.1, and FreeBSD 5.2.1.
 > Sorry for submitting a sample program, but it was the only way I can
 > replicate the error.
 
 Attachments do not make it into the text-only PR database.  Can you
 please submit your test application inline, e.g. as a shar archive?
 
 Kris
 
 --/04w6evG8XlLl3ft
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.4 (FreeBSD)
 
 iD8DBQFAZQPzWry0BWjoQKURAr6YAKCZQuGncJQ94k3KRewZlkVIvSFhugCg158D
 Grr+2Pj/gN1hR6apRGV9B8Y=
 =KDoK
 -----END PGP SIGNATURE-----
 
 --/04w6evG8XlLl3ft--
State-Changed-From-To: open->closed 
State-Changed-By: kris 
State-Changed-When: Fri Mar 26 22:38:27 PST 2004 
State-Changed-Why:  
Submitter reports this was not a bug in FreeBSD 

http://www.freebsd.org/cgi/query-pr.cgi?pr=64739 
>Unformatted:
