lseek()/read() to physical drive returning wrong data.

Robin T. Miller Robin.Miller@compaq.com
Sat Feb 3 09:43:00 GMT 2001


Hi All,
	I have a Unix test program named 'dt' which runs with Cygwin.
This program tests a variety of devices as well as file systems.  The
tests which use lseek() to raw mounted disks, are failing with data
compare errors.  It appears either lseek() is positioning incorrectly
or read() is returning the wrong data after lseek'ing.

	This random I/O sequence seems to work correctly to a regular
file, so maybe the raw device buffering is messing up?  I'm not sure.

	The only other program restrictions is 32-bit file offsets.

	BTW: Are there any plans to release 64-bit file support?

	I'm attaching two files:
	1) a log file showing the failure,
	2) the output from 'cygcheck'.

	This is my first bug report, so I hope I'm including everything.

	In the log file, you'll see two tools used:
	- 'dt' (data test program) and
	- 'scu' (SCSI Command Utility).

	These tools can be found at the following URL's:

	    http://www.bit-net.com/~rmiller/dt.html (full source)
	    http://www.bit-net.com/~rmiller/scu.html (binary only)

	I could whip together a quick program to reproduce this problem,
but I thought providing the actual program and source might be easiest.
Plus I'd like to share these programs with others.

	The test steps performed in the log file are:
	- use 'scu' to write and verify a data pattern called IOT.  This
	  pattern has the lba encoded in the first 4 bytes of each block.
	  [ Note: 'scu' uses the SCSI pass-through.  'dt' can also write
	    the IOT data pattern. I hope this isn't confusing/misleading. ]
	- use 'dt' to read random blocks in the first 2 GBytes, which
	  shows a failure on the 2nd record.
	- use 'scu' to dump the failing block to verify the data is Ok.
	- a 'dt' example showing sequential reading of IOT works fine.
	- a 'dt' example showing random access to CD-ROM IOT file is Ok.

	Has anyone else seen any anomolies like this?

	Any help with this problem would be appreciated.

	I realize my test program is probably doing abnormal things :-)

	BTW:  Testing 'dt' with tapes works great, nice job Corinna!

Thanks in advance,
Robin Miller
CygwinLseek.log

Cygnus Win95/NT Configuration Diagnostics
Current System Time: Fri Feb  2 17:36:26 2001

WinNT Ver 4.0 build 1381 Service Pack 5

Path:	/usr/local/bin
	/usr/bin
	/bin
	/cygdrive/c/WINNT/System32
	/cygdrive/c/vslick/win
	/cygdrive/c/program files/devstudio/sharedide/bin/ide
	/cygdrive/c/program files/devstudio/sharedide/bin
	/cygdrive/c/program files/devstudio/vc/bin
	/d/mssdk/bin
	/d/mssdk/bin/winnt
	/cygdrive/c/VisualGIPSY26/bin

SysDir: C:\WINNT\System32
WinDir: C:\WINNT

PWD = `/d/rmiller/dt.d'
USER = `administrator'
MAKE_MODE = `unix'
HOME = `d:/rmiller'

INETSDK = `D:\MSSDK'
NUMBER_OF_PROCESSORS = `1'
PROMPT = `$P$G'
LOGONSERVER = `\\MEDA'
OS2LIBPATH = `C:\WINNT\system32\os2\dll;'
COMSPEC = `C:\WINNT\system32\cmd.exe'
!C: = `C:\Cygwin\bin'
SYSTEMDRIVE = `C:'
HOSTNAME = `MEDA'
IMPRIMIS_BUILD_ROOT = `d:\imprimis'
INCLUDE = `c:\program files\devstudio\vc\include;c:\program files\devstudio\vc\atl\include;c:\program files\devstudio\vc\mfc\include;d:\mssdk\include;%include%'
PROCESSOR_REVISION = `0803'
MSDEVDIR = `C:\Program Files\DevStudio\SharedIDE'
PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
COMPUTERNAME = `MEDA'
STARTEAM = `C:\Program Files\StarTeam 4.0\StarTeam.ini'
STARTEAMAPP = `C:\Program Files\StarTeam 4.0'
WINDIR = `C:\WINNT'
USERPROFILE = `C:\WINNT\Profiles\Administrator'
BKOFFICE = `D:\MSSDK\'
BASEDIR = `D:\DDK'
PS1 = `\[\033]0;\w\007
\033[32m\]\u@\h \[\033[33m\w\033[0m\]
$ '
MACHTYPE = `i686-pc-cygwin'
PROCESSOR_IDENTIFIER = `x86 Family 6 Model 8 Stepping 3, GenuineIntel'
WIN32DMIPATH = `c:\dmi\win32'
OS = `Windows_NT'
OLDPWD = `/d/rmiller'
BASEMAKE = `D:\MSSDK\Include\bkoffice.mak'
DDKDRIVE = `D:'
PROCESSOR_ARCHITECTURE = `x86'
TEMP = `/cygdrive/c/TEMP'
EDITOR = `emacs'
PROCESSOR_LEVEL = `6'
SYSTEMROOT = `C:\WINNT'
NTIOM = `d:\imprimis'
WORKSTATIONID = `C:\Program Files\StarTeam 4.0\ConnectionManager.ini'
HOMEDRIVE = `C:'
LIB = `c:\program files\devstudio\vc\lib;c:\program files\devstudio\vc\mfc\lib;d:\mssdk\lib;%lib%'
MSTOOLS = `D:\MSSDK'
SHLVL = `1'
MSSDK = `D:\MSSDK'
HOMEPATH = `\'
USERDOMAIN = `MEDA'
USERNAME = `Administrator'
SHELL = `/bin/sh'
CPU = `i386'
MKS_TK_PATH_BACK = `c:\mksnt;C:\PROGRA~1\Plus!\MICROS~1\;;c:\dmi\win32\bin;C:\WINNT\system32;C:\WINNT;D:\DDK\bin;D:\MSSDK\Bin;D:\MSSDK\Bin\WinNT;C:\PROGRA~1\Tcl\bin;C:\PROGRA~1\TclPro1.4\win32-ix86\bin'
HOSTTYPE = `i686'
GHTMLVIEWER = `C:\PROGRA~1\Netscape\COMMUN~1\Program\netscape.exe'
OSTYPE = `cygwin'
TERM = `cygwin'
STLICENSE = `C:\Program Files\StarTeam 4.0'
_ = `/usr/bin/cygcheck'
TZ = `EST5EDT4,M4.1.0/2,M10.5.0/2'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
  (default) = `/cygdrive'
  cygdrive flags = 0x00000022
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = `C:\Cygwin'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/d
  (default) = `d:'
  flags = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/dev/nrmt0
  (default) = `\\.\tape0'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/dev/PhysicalDrive3
  (default) = `\\.\PhysicalDrive3'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/dev/rmt0
  (default) = `\\.\tape0'
  flags = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = `C:/Cygwin/bin'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = `C:/Cygwin/lib'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\00
  (default) = `\\.\physicaldrive5'
  unix = `/dev/rdsk5'
  fbinary = 0x00000001
  fsilent = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\01
  (default) = `\\.\e:'
  unix = `/dev/cdrom0'
  fbinary = 0x00000001
  fsilent = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\02
  (default) = `C:'
  unix = `/'
  fbinary = 0x00000000
  fsilent = 0x00000000
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\00
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\01
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\02
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\03
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\04
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\05
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\06
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\07
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\08
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\09
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0A
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0B
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0C
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0D
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0E
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0F
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\10
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\11
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\12
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\13
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\14
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\15
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\16
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\17
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\18
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\19
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1A
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1B
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1C
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1D

a:  fd           N/A    N/A                    
c:  hd  NTFS    8032Mb  32% CP CS UN PA FC     DRIVE_C
d:  hd  NTFS   17359Mb  29% CP CS UN PA FC     Robin's Extra Stuff
e:  cd  CDFS     500Mb 100%    CS              NT_IOT
f:  cd  CDFS     500Mb 100%    CS              NT_IOT
g:  hd  NTFS    8677Mb   1% CP CS UN PA FC     Extra Extra
h:  hd  NTFS   17364Mb   1% CP CS UN PA FC     Music Disk
p:  net NTFS    4090Mb  70% CP CS UN PA FC     
s:  net NTFS    4102Mb  87% CP CS UN PA FC     
z:  net NTFS    4090Mb  70% CP CS UN PA FC     

\\.\PhysicalDrive3  /dev/PhysicalDrive3  user    binmode
C:\Cygwin\bin  /usr/bin  user    binmode
C:\Cygwin\lib  /usr/lib  user    binmode
C:\Cygwin  /        user    binmode
\\.\tape0  /dev/rmt0  user    textmode
\\.\tape0  /dev/nrmt0  user    binmode
d:    /d       user    textmode

Found: C:\Cygwin\bin\bash.exe
Found: C:\Cygwin\bin\cat.exe
Found: C:\Cygwin\bin\cpp.exe
Found: C:\Cygwin\bin\find.exe
Found: C:\Cygwin\bin\gcc.exe
Found: C:\Cygwin\bin\gdb.exe
Found: C:\Cygwin\bin\ld.exe
Found: C:\Cygwin\bin\ls.exe
Found: C:\Cygwin\bin\make.exe
Found: C:\Cygwin\bin\sh.exe

  611k 2000/12/25 .\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=2000/12/25 12:39
    Cygwin DLL version info:
        dll major: 1001
        dll minor: 7
        dll epoch: 19
        dll bad signal mask: 19005
        dll old termios: 5
        dll malloc env: 28
        api major: 0
        api minor: 31
        shared data: 3
        dll identifier: cygwin1
        mount registry: 2
        cygnus registry name: Cygnus Solutions
        cygwin registry name: Cygwin
        program options name: Program Options
        cygwin mount registry name: mounts v2
        cygdrive flags: cygdrive flags
        cygdrive prefix: cygdrive prefix
        cygdrive default prefix: 
        build date: Mon Dec 25 12:39:48 EST 2000
        shared id: cygwin1S3

  611k 2000/12/25 .\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=2000/12/25 12:39
    Cygwin DLL version info:
        dll major: 1001
        dll minor: 7
        dll epoch: 19
        dll bad signal mask: 19005
        dll old termios: 5
        dll malloc env: 28
        api major: 0
        api minor: 31
        shared data: 3
        dll identifier: cygwin1
        mount registry: 2
        cygnus registry name: Cygnus Solutions
        cygwin registry name: Cygwin
        program options name: Program Options
        cygwin mount registry name: mounts v2
        cygdrive flags: cygdrive flags
        cygdrive prefix: cygdrive prefix
        cygdrive default prefix: 
        build date: Mon Dec 25 12:39:48 EST 2000
        shared id: cygwin1S3

   56k 2000/12/03 C:\Cygwin\bin\cygbz21.0.dll - os=4.0 img=1.0 sys=4.0
                  "cygbz21.0.dll" v0.0 ts=2000/11/20 18:53
   82k 2001/01/21 C:\Cygwin\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0
                  "cygform5.dll" v0.0 ts=2001/1/21 15:39
   18k 2000/10/23 C:\Cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm.dll" v0.0 ts=2000/10/22 22:26
   17k 2001/01/07 C:\Cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory4.dll" v0.0 ts=2001/1/6 23:34
   14k 2000/10/23 C:\Cygwin\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl.dll" v0.0 ts=2000/10/23 15:02
   81k 2000/12/05 C:\Cygwin\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitcl30.dll" v0.0 ts=2000/11/25 20:43
   35k 2000/12/05 C:\Cygwin\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitk30.dll" v0.0 ts=2000/11/25 20:43
   45k 2000/10/22 C:\Cygwin\bin\cygjbig1.dll - os=4.0 img=1.0 sys=4.0
                  "cygjbig1.dll" v0.0 ts=2000/10/22 19:06
  119k 2000/10/23 C:\Cygwin\bin\cygjpeg6b.dll - os=4.0 img=1.0 sys=4.0
                  "cygjpeg6b.dll" v0.0 ts=2000/10/22 20:58
   53k 2001/01/21 C:\Cygwin\bin\cygmenu5.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu5.dll" v0.0 ts=2001/1/21 15:39
  414k 2001/01/21 C:\Cygwin\bin\cygncurses++5.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses++5.dll" v0.0 ts=2001/1/21 15:40
  299k 2001/01/21 C:\Cygwin\bin\cygncurses5.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses5.dll" v0.0 ts=2001/1/21 15:38
   34k 2001/01/21 C:\Cygwin\bin\cygpanel5.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel5.dll" v0.0 ts=2001/1/21 15:38
  162k 2000/10/23 C:\Cygwin\bin\cygpng2.dll - os=4.0 img=1.0 sys=4.0
                  "cygpng2.dll" v0.0 ts=2000/10/22 20:40
  108k 2001/01/07 C:\Cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline4.dll" v0.0 ts=2001/1/6 23:34
  390k 2000/12/05 C:\Cygwin\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtcl80.dll" v0.0 ts=2000/11/25 20:39
    5k 2000/12/05 C:\Cygwin\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0
   10k 2000/12/05 C:\Cygwin\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtclreg80.dll" v0.0 ts=2000/11/25 20:39
  243k 2000/10/23 C:\Cygwin\bin\cygtiff3.dll - os=4.0 img=1.0 sys=4.0
                  "cygtiff3.dll" v0.0 ts=2000/10/22 21:14
  623k 2000/12/05 C:\Cygwin\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtk80.dll" v0.0 ts=2000/11/25 20:43
   41k 2000/11/20 C:\Cygwin\bin\cygXpm-noX4.dll - os=4.0 img=1.0 sys=4.0
                  "cygXpm-noX4.dll" v0.0 ts=2000/11/19 21:41
   45k 2000/11/20 C:\Cygwin\bin\cygXpm-X4.dll - os=4.0 img=1.0 sys=4.0
                  "cygXpm-X4.dll" v0.0 ts=2000/11/19 21:45
   49k 2000/10/23 C:\Cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
                  "cygz.dll" v0.0 ts=2000/10/22 20:22
  611k 2000/12/25 C:\Cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=2000/12/25 12:39
    Cygwin DLL version info:
        dll major: 1001
        dll minor: 7
        dll epoch: 19
        dll bad signal mask: 19005
        dll old termios: 5
        dll malloc env: 28
        api major: 0
        api minor: 31
        shared data: 3
        dll identifier: cygwin1
        mount registry: 2
        cygnus registry name: Cygnus Solutions
        cygwin registry name: Cygwin
        program options name: Program Options
        cygwin mount registry name: mounts v2
        cygdrive flags: cygdrive flags
        cygdrive prefix: cygdrive prefix
        cygdrive default prefix: 
        build date: Mon Dec 25 12:39:48 EST 2000
        shared id: cygwin1S3

Use -h to see help about each section

-------------- next part --------------
$ uname -a
CYGWIN_NT-4.0 MEDA 1.1.7(0.31/3/2) 2000-12-25 12:39 i686 unknown

administrator@MEDA /cygdrive/d/rmiller/dt.d
$ mount
Device              Directory           Type         Flags
\\.\PhysicalDrive3  /dev/PhysicalDrive3  user         binmode
C:\Cygwin\bin       /usr/bin            user         binmode
C:\Cygwin\lib       /usr/lib            user         binmode
C:\Cygwin           /                   user         binmode
\\.\tape0           /dev/rmt0           user         textmode
\\.\tape0           /dev/nrmt0          user         binmode
d:                  /d                  user         textmode

administrator@MEDA /cygdrive/d/rmiller/dt.d
$ scu -f PhysicalDrive3
c:\winnt\system32\scu.exe> sho cap

Disk Capacity Information:

                      Maximum Capacity: 17773500 (8678.467 megabytes)
                          Block Length: 512

c:\winnt\system32\scu.exe> write media starting 0 bs 64k limit 2g popts iot
Writing 4194304 blocks (0 - 4194303) on PhysicalDrive3 (HD0093172C) with IOT Pattern...
c:\winnt\system32\scu.exe> read media starting 0 bs 64k limit 2g popts iot
Reading 4194304 blocks (0 - 4194303) on PhysicalDrive3 (HD0093172C) using IOT Pattern...
c:\winnt\system32\scu.exe> quit

administrator@MEDA /cygdrive/d/rmiller/dt.d
$ ./dt if=/dev/PhysicalDrive3 bs=32k capacity=2g iotype=random pattern=iot enable=Debug
dt: Allocated buffer at address 0xa012000 of 32768 bytes, using offset 0
dt: Attempting to open input file '/dev/PhysicalDrive3', open flags = 0200000 (0x10000)...
dt: Input file '/dev/PhysicalDrive3' successfully opened, fd = 3
dt: Random data limit set to 2147483648 bytes (2048.000 Mbytes), 4194304 blocks.
dt: Allocated buffer at address 0xa02a000 of 32772 bytes, using offset 0
dt: Seeked to block 2726209 (0x299941) at byte position 1395819008.
dt: Record #1 (lba 2726209), Reading 32768 bytes into buffer 0xa02a000...
dt: Seeked to block 290426 (0x46e7a) at byte position 148698112.
dt: Record #2 (lba 290426), Reading 32768 bytes into buffer 0xa02a000...

dt: Error number 1 occurred on Fri Feb  2 16:32:01 2001
dt: Data compare error at byte 0 in record number 2
dt: Relative block number where the error occcured is 290482
dt: Block expected = 290426 (0x46e7a), block found = 2726273 (0x299981), count = 32768
dt: The incorrect data starts at address 0xa012000 (marked by asterisk '*')
dt: Dumping Pattern Buffer (base = 0xa012000, offset = 0, limit = 64 bytes):

0xa012000 *7a 6e 04 00 7b 6f 05 01 7c 70 06 02 7d 71 07 03
0xa012010  7e 72 08 04 7f 73 09 05 80 74 0a 06 81 75 0b 07
0xa012020  82 76 0c 08 83 77 0d 09 84 78 0e 0a 85 79 0f 0b
0xa012030  86 7a 10 0c 87 7b 11 0d 88 7c 12 0e 89 7d 13 0f

dt: The incorrect data starts at address 0xa02a000 (marked by asterisk '*')
dt: Dumping Data Buffer (base = 0xa02a000, offset = 0, limit = 64 bytes):

0xa02a000 *81 99 29 00 82 9a 2a 01 83 9b 2b 02 84 9c 2c 03
0xa02a010  85 9d 2d 04 86 9e 2e 05 87 9f 2f 06 88 a0 30 07
0xa02a020  89 a1 31 08 8a a2 32 09 8b a3 33 0a 8c a4 34 0b
0xa02a030  8d a5 35 0c 8e a6 36 0d 8f a7 37 0e 90 a8 38 0f
dt: Exiting with status code -1...
dt: Closing file '/dev/PhysicalDrive3', fd = 3...

Total Statistics:
      Input device/file name: /dev/PhysicalDrive3 (device type=disk)
     Type of I/O's performed: random (rseed=0x2fb64299)
       Random I/O Parameters: position=0, ralign=0, rlimit=2147483648
    Data pattern string used: 'IOT Pattern' (blocking is 512 bytes)
     Total records processed: 2 @ 32768 bytes/record (32.000 Kbytes)
     Total bytes transferred: 65536 (64.000 Kbytes, 0.062 Mbytes)
      Average transfer rates: 595782 bytes/sec, 581.818 Kbytes/sec
     Number I/O's per second: 18.182
      Total passes completed: 1/1
       Total errors detected: 1/1
          Total elapsed time: 00m00.11s
           Total system time: 00m00.00s
             Total user time: 00m00.00s
               Starting time: Fri Feb  2 16:32:00 2001
                 Ending time: Fri Feb  2 16:32:01 2001


administrator@MEDA /cygdrive/d/rmiller/dt.d
$ scu -f PhysicalDrive3
c:\winnt\system32\scu.exe> dump media lba 290426
Reading 1 block (290426 - 290426) on PhysicalDrive3 (HD0093172C)...

Record Number 1 (Starting Block 290426)

00000000  7a 6e 04 00 7b 6f 05 01 7c 70 06 02 7d 71 07 03 7e 72 08 04
00000020  7f 73 09 05 80 74 0a 06 81 75 0b 07 82 76 0c 08 83 77 0d 09
00000040  84 78 0e 0a 85 79 0f 0b 86 7a 10 0c 87 7b 11 0d 88 7c 12 0e
00000060  89 7d 13 0f 8a 7e 14 10 8b 7f 15 11 8c 80 16 12 8d 81 17 13
00000080  8e 82 18 14 8f 83 19 15 90 84 1a 16 91 85 1b 17 92 86 1c 18
00000100  93 87 1d 19 94 88 1e 1a 95 89 1f 1b 96 8a 20 1c 97 8b 21 1d
00000120  98 8c 22 1e 99 8d 23 1f 9a 8e 24 20 9b 8f 25 21 9c 90 26 22
00000140  9d 91 27 23 9e 92 28 24 9f 93 29 25 a0 94 2a 26 a1 95 2b 27
00000160  a2 96 2c 28 a3 97 2d 29 a4 98 2e 2a a5 99 2f 2b a6 9a 30 2c
00000180  a7 9b 31 2d a8 9c 32 2e a9 9d 33 2f aa 9e 34 30 ab 9f 35 31
00000200  ac a0 36 32 ad a1 37 33 ae a2 38 34 af a3 39 35 b0 a4 3a 36
00000220  b1 a5 3b 37 b2 a6 3c 38 b3 a7 3d 39 b4 a8 3e 3a b5 a9 3f 3b
00000240  b6 aa 40 3c b7 ab 41 3d b8 ac 42 3e b9 ad 43 3f ba ae 44 40
00000260  bb af 45 41 bc b0 46 42 bd b1 47 43 be b2 48 44 bf b3 49 45
00000280  c0 b4 4a 46 c1 b5 4b 47 c2 b6 4c 48 c3 b7 4d 49 c4 b8 4e 4a
00000300  c5 b9 4f 4b c6 ba 50 4c c7 bb 51 4d c8 bc 52 4e c9 bd 53 4f
00000320  ca be 54 50 cb bf 55 51 cc c0 56 52 cd c1 57 53 ce c2 58 54
00000340  cf c3 59 55 d0 c4 5a 56 d1 c5 5b 57 d2 c6 5c 58 d3 c7 5d 59
00000360  d4 c8 5e 5a d5 c9 5f 5b d6 ca 60 5c d7 cb 61 5d d8 cc 62 5e
00000380  d9 cd 63 5f da ce 64 60 db cf 65 61 dc d0 66 62 dd d1 67 63
00000400  de d2 68 64 df d3 69 65 e0 d4 6a 66 e1 d5 6b 67 e2 d6 6c 68
00000420  e3 d7 6d 69 e4 d8 6e 6a e5 d9 6f 6b e6 da 70 6c e7 db 71 6d
00000440  e8 dc 72 6e e9 dd 73 6f ea de 74 70 eb df 75 71 ec e0 76 72
00000460  ed e1 77 73 ee e2 78 74 ef e3 79 75 f0 e4 7a 76 f1 e5 7b 77
00000480  f2 e6 7c 78 f3 e7 7d 79 f4 e8 7e 7a f5 e9 7f 7b f6 ea 80 7c
00000500  f7 eb 81 7d f8 ec 82 7e f9 ed 83 7f

c:\winnt\system32\scu.exe> eval 0x00046e7a
Expression Values:

            Decimal: 290426
        Hexadecimal: 0x46e7a
    512 byte Blocks: 567.238281
          Kilobytes: 283.619141
          Megabytes: 0.276972
          Gigabytes: 0.000270
c:\winnt\system32\scu.exe> quit
administrator@MEDA /cygdrive/d/rmiller/dt.d
$ ./dt if=/dev/PhysicalDrive3 bs=32k limit=2g pattern=iot

Total Statistics:
      Input device/file name: /dev/PhysicalDrive3 (device type=disk)
     Type of I/O's performed: sequential (forward)
    Data pattern string used: 'IOT Pattern' (blocking is 512 bytes)
     Total records processed: 65536 @ 32768 bytes/record (32.000 Kbytes)
     Total bytes transferred: 2147483648 (2097152.000 Kbytes, 2048.000 Mbytes)
      Average transfer rates: 8913050 bytes/sec, 8704.151 Kbytes/sec
     Number I/O's per second: 272.005
      Total passes completed: 1/1
       Total errors detected: 0/1
          Total elapsed time: 04m00.93s
           Total system time: 00m00.82s
             Total user time: 02m54.89s
               Starting time: Fri Feb  2 16:39:46 2001
                 Ending time: Fri Feb  2 16:43:47 2001


administrator@MEDA /cygdrive/d/rmiller/dt.d
$ ./dt if=e:iot.iot bs=32k pattern=iot iotype=random dsize=2k

Total Statistics:
      Input device/file name: e:iot.iot (device type=regular)
     Type of I/O's performed: random (rseed=0x2fcca927)
       Random I/O Parameters: position=0, ralign=0, rlimit=524288000
    Data pattern string used: 'IOT Pattern' (blocking is 2048 bytes)
     Total records processed: 16000 @ 32768 bytes/record (32.000 Kbytes)
     Total bytes transferred: 524288000 (512000.000 Kbytes, 500.000 Mbytes)
      Average transfer rates: 346504 bytes/sec, 338.383 Kbytes/sec
     Number I/O's per second: 10.574
      Total passes completed: 1/1
       Total errors detected: 0/1
          Total elapsed time: 25m13.07s
           Total system time: 00m03.11s
             Total user time: 00m43.14s
               Starting time: Fri Feb  2 16:56:28 2001
                 Ending time: Fri Feb  2 17:21:42 2001


administrator@MEDA /cygdrive/d/rmiller/dt.d
$


More information about the Cygwin mailing list