From lori!cmcl2!yale!cs.utexas.edu!samsung!uunet!ibmpa!bullhead!brunner Thu May 10 13:06:05 EDT 1990
Article 2432 of comp.sys.ibm.pc.rt:
Path: lori!cmcl2!yale!cs.utexas.edu!samsung!uunet!ibmpa!bullhead!brunner
>From: brunner@bullhead.uucp
Newsgroups: comp.sys.ibm.pc.rt
Subject: hc2.1y advisory
Summary: 2.1y with optimization may produce errors in scsi.o builds
Keywords: hc2.1y optimization scsi.o advisory
Message-ID: <5323@ibmpa.UUCP>
Date: 9 May 90 23:55:08 GMT
Sender: news@ibmpa.UUCP
Reply-To: brunner@ibmsupt.UUCP ()
Organization: IBM AWD Palo Alto
Lines: 59

The optimization pass of the 2.1[n-y] Metaware C compiler semmes to cause
a significant failure in the operation of the SCSI disk device. The failure
manifests as corruption of the file system(s) local to the SCSI device(s).
This failure is SEVERE. Frequently the affected file systems can not be
repaired with fsck or related utilities, and it is necessary to reformat the
disk using the ibm9332 utilities contained in the diagnostic diskettes.

The following is recommended:

	1. install the GENERIC 2.1n-built (release) kernel (be conservative)
	2. rebuild scsi.o in the appropriate kernel build directory with
	   optimization OFF (see below for example)
	3. relink the kernel using the no-optimization built scsi.o
	4. install the locally built kernel

To be really safe, a dump of the scsi device's file systems should be done.
If good dumping practices are in use then only an incremental. If not, then
a level zero (full) dump should be performed sometime between steps 1 and 4.

We do not yet know the actual cause of failure, it could be bad code in the
scsi driver which the compiler treats correctly, or an error in the code
generation of the optimization pass. Since the failure mode is SEVERE, we
are posting an advisory in advance of having a fix for the problem. The
problem at first appeared to be a hardware failure, this error in diagnosis
delayed this advisory. Our testing status follows:

	test of NO_DEBUG scsi.o with 2.1y optimization
		(failed < 18 hours)
	test of NO_DEBUG scsi.o with 2.1y no-optimization
		(no failure > 48 hours)
	test of DEBUG scsi.o with 2.1y no-optimization
		(no failure > 72 hours)
	test of DEBUG SWAP ON SCSI scsi.o with 2.1y no-optimization
		(no failure > 30 hours)

Other problems with the 2.1y Metaware C Compiler have been reported by Jeff
Honig (Cornell), these have been sent to Metaware. Since I've had to scrub
my disk more than once in the course of the last several weeks, some email
to me may have been lost. If you've found bugs in the compiler which are
not acknowledged below, please send them (or resend them) to me.

	ANSI stringization/macro merging
	__STDC__ error support
	elif support
	sys/standca/keyboard.c
	gated bug

We expect that these will be fixed in a future release.

To build scsi.o without optimization, capture the output of make in a log
file, edit out the "-O" portion of the compile line specific to scsi.o and
save the line in a file. Run this single kernel module compile (feed it to
the shell, or make the command file executable), then run make again to
relink the various .o files. For the GENERIC configuration file, the line
invoking hc is as follows (line continuation and tabs added for clarity):

	hc -Hvolatile -I. -c -O -I. -I../h -DGENERIC -DIBMRTPC -DMOD135 \
	-DUCBFIX -DDFS -DAFS -DNFS -DVFS -DSGP -DRVD -DSECURE -DINET \
	-DKERNEL ../machineio/scsi.c


