public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* libgcj/1430: Writing on OutputStream of bad Socket kills app with "Broken pipe"
@ 2000-12-20 12:26 john
  0 siblings, 0 replies; only message in thread
From: john @ 2000-12-20 12:26 UTC (permalink / raw)
  To: java-gnats

>Number:         1430
>Category:       libgcj
>Synopsis:       Writing on OutputStream of bad Socket kills app with "Broken pipe"
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    tromey
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 20 12:19:46 PST 2000
>Closed-Date:    Tue Sep 28 10:30:39 PDT 1999
>Last-Modified:  Tue Sep 28 10:30:39 PDT 1999
>Originator:     John Griffin
>Release:        2.95.1 gcc, 2.95.1 libgcj
>Organization:
>Environment:
6.0 Redhat	
>Description:
Writing to OutputStream (or derivative) crashes app if 
connected to disconnected Socket.
>How-To-Repeat:
// run this and then connect on 4444

import java.io.*;
import java.net.*;


public class dog {

        public static void main(String[] args)
        {
                try {

                System.out.println("Listening on port 4444");

                ServerSocket ss = new ServerSocket(4444);
                Socket s = ss.accept();

                PrintWriter pw = new PrintWriter(s.getOutputStream());

                for(int i=0; i<100; i++){
                        System.out.println(i + " bottles of beer on the wall");
                        pw.println(i + " bottles of beer on the wall");
                        pw.flush();
                        try{ Thread.sleep(1000); } catch(Exception e){}
                }

                } catch(Exception e){
                        System.err.println("Server error: " + e);
                }
        }
}
>Fix:

>Release-Note:

>Audit-Trail:

Formerly PR libgcj/51


From: Alexandre Petit-Bianco <apbianco@cygnus.com>
To: john@ndr.com
Cc: java-gnats@sourceware.cygnus.com
Subject: Re: gcj/51: Writing on OutputStream of bad Socket kills app with "Broken pipe"
Date: Thu, 23 Sep 1999 11:06:23 -0700 (PDT)

 john@ndr.com writes:
 > Writing to OutputStream (or derivative) crashes app if 
 > connected to disconnected Socket.
 
 This looks more like a libgcj problem. Would you care changing it
 category?
 
 ./A
Responsible-Changed-From-To: apbianco->tromey
Responsible-Changed-By: tromey
Responsible-Changed-When: Thu Sep 23 11:24:44 1999
Responsible-Changed-Why:
    This is a generic libgcj bug which happens to look
    like a java.io bug.  We should ignore SIGPIPE.
State-Changed-From-To: open->feedback
State-Changed-By: tromey
State-Changed-When: Thu Sep 23 12:02:45 1999
State-Changed-Why:
    I've checked in a fix for this.
    Can you try it?
    If not, tell me and I will just close the PR -- your
    test case now works for me.
State-Changed-From-To: feedback->closed
State-Changed-By: tromey
State-Changed-When: Tue Sep 28 10:30:39 1999
State-Changed-Why:
    Reporter says that this is fixed
>Unformatted:



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-12-20 12:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-20 12:26 libgcj/1430: Writing on OutputStream of bad Socket kills app with "Broken pipe" john

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).