Subject: SCSI 2940UW problem
To: None <current-users@netbsd.org>
From: Kazushi (Jam) Marukawa <jam@pobox.com>
List: current-users
Date: 07/01/1999 12:25:23
Hi,

I've been having a data corruption problem on my SCSI hard
drive while *READING* the data.  I tried to find the reason
of the problem, but I couldn't find it.  So, I'd like to ask
other's experiences.

I'm using i386 current NetBSD.  Connected SCSI devices are
Adaptec's 2940UW and IBM 34330W only.  Both are connected by
68pin 1.5 feet internal cable.  Both are terminated
internally.  Maximum data transfer rate is 40MHz because of
20MHz x 2.

The problem is a data corruption.  When I copied data by
using tar command, the written data is not the same as the
original.  First of all, I thought it should be a writing
corruption.  However, if I read data from the IDE and write
it to the SCSI, there is no data corruption.  The data
corruption was happened only when I read the data from the
SCSI.

An example of data corruptions are below.  Both have same
feature.  Once 8 bytes of data are repeated, then 8 bytes
are lost.  First example has two "en(tmp_f" and lost
"= fopen(", and Second example has two " some ot" and lost
"ode\n */\n".  Is there anyone who have the same problem?

$ diff -ur tin z/tin
diff -ur tin/tin/src/post.c z/tin/tin/src/post.c
--- tin/tin/src/post.c  Tue Nov 24 17:29:28 1998
+++ z/tin/tin/src/post.c        Tue Nov 24 17:29:28 1998
@@ -1377,8 +1377,8 @@
        strcpy(postponed_tmp, postponed_articles_file);
        strcat(postponed_tmp, "_");
        in = fopen(postponed_articles_file, "r");
-       out = fopen(tmp_file, "w");
-       tmp = fopen(postponed_tmp, "w");
+       out = fopen(tmp_fen(tmp_file, "w");
+       tmp postponed_tmp, "w");

        if (in==NULL || out==NULL || tmp==NULL) {
                if (in)
$ diff -ur tin z/tin
diff -ur tin/tin/include/tin.h z/tin/tin/include/tin.h
--- tin/tin/include/tin.h       Tue Nov 24 17:29:18 1998
+++ z/tin/tin/include/tin.h     Tue Nov 24 17:29:18 1998
@@ -809,9 +809,7 @@
 #define UNREAD_GROUP(i)                (!active[my_group[i]].bogus && active[my_group[i]].newsrc.num_unread > 0)
 /*
  * Some informational message are only shown if we're running in
- * the background or some other non-curses mode
- */
-#define        INTERACTIVE     (!batch_mode || update_fork)
+ * the background or some ot some other non-curses m#define    INTERACTIVE     (!batch_mode || update_fork)
 #define        INTERACTIVE2    ((cmd_line && !(batch_mode || verbose)) || (batch_mode && update_fork))

 /*

Thanks,
-- Kazushi
Cynic, n.:
	One who looks through rose-colored glasses with a jaundiced
eye.