Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!husc6!rice!sun-spots-request From: JARMOLOWSKI%ESDSDF.decnet@crdgw1.ge.com (Tom Jarmolowski) Newsgroups: comp.sys.sun Subject: Sun hangs? Keywords: SunOS Message-ID: <321@brazos.Rice.edu> Date: 19 Jul 89 13:48:00 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 36 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 80, message 6 of 15 The following simple program will cause a Sun to hang in a bizarre state. We have seen this behavior on Sun 3s and 4s under SunOS 3.x and 4.x. After a few hundred iterations of the loop (a random number, usually around 250). Strange things happen. Most programs executed from a tty or pty hang. New programs can be started from a mouse menu and USUALLY work if they do not use a pty. Does anyone have any idea what is wrong ? P.S. It makes no difference if anything is connected to ttyb or not. #include #include main() { int fd; int count = 0; while (1) { fd = open("/dev/ttyb", O_RDWR); write(fd, "junk", 4); /************************************************/ /* The next line is not required for the */ /* bug to occur */ /************************************************/ printf("%d\n", count++); close(fd); } } Tom Jarmolowski jarmolowski%esdsdf.decnet@ge-crd.arpa