-
Bug
-
Resolution: Fixed
-
P2
-
1.1.7, 1.2.0
-
1.2fcs
-
x86
-
windows_nt
-
Verified
I came across a nasty data corruption bug in both JDK1.1.7G and JDK1.2FCS-D
with HTTP URL's transfering IMAGE files from a HTTP Server. When running my
test program I get data corruption when transferring IMAGE files. It appears that only 1 byte is off all the time.
The problem only appears on WIN32. I was testing on a WINDOWS 95 system.
This problem happens with and without the JIT so its not a JIT bug.
This problem does not occur on WIN32 in JDK1.1.6N and JDK1.2Beta4 so it is a
regression.
The following starts the jhttpServer:
% java jhttpServer -p 11000 -r docs
The following starts the jhttpGetURL client:
% java jhttpGetURL -d -v -f data/jhttpGetURL.data
When you run this client program you will notice that image files being
transfered from the jhttpServer come across with data corruption. Look
at the "outurl.*" file in the results directory. I dump out the error to
this log file.
I have these programs as part of the attachment. To run them do the
following:
% uncompress url.tar
% cd url
% make
In a window start the jhttpServer
% java jhttpServer -p 11000 -r docs
In another window start the jhttpGetURL client
% java jhttpGetURL -d -v -f data/jhttpGetURL.data
When you run this program you will see the following output:
java version "1.1.7"
java full version "JDK1.1.7G"
verbose mode = on
debug mode = on
running green threads
loop count = 1
Starting jhttpServer server ....
DEBUG: opening URL file: data/jhttpGetURL.data
DEBUG: parsing URL: http://localhost:11000/html/docviewer.html
DEBUG: creating output file: results/win32/html/docviewer.html
DEBUG: opening stream to URL: http://localhost:11000/html/docviewer.html
DEBUG: reading data from URL: http://localhost:11000/html/docviewer.html
DEBUG: bytes read: 2310
DEBUG: closing stream to URL: http://localhost:11000/html/docviewer.html
DEBUG: compare files: results/win32/html/docviewer.html and docs/html/docviewer.
html
DEBUG: parsing URL: http://localhost:11000/html/embedded.html
DEBUG: creating output file: results/win32/html/embedded.html
DEBUG: opening stream to URL: http://localhost:11000/html/embedded.html
DEBUG: reading data from URL: http://localhost:11000/html/embedded.html
DEBUG: bytes read: 90412
DEBUG: closing stream to URL: http://localhost:11000/html/embedded.html
DEBUG: compare files: results/win32/html/embedded.html and docs/html/embedded.html
... ... ... ... ... ...
DEBUG: parsing URL: http://localhost:11000/images/boston.jpg
DEBUG: creating output file: results/win32/images/boston.jpg
DEBUG: opening stream to URL: http://localhost:11000/images/boston.jpg
DEBUG: reading data from URL: http://localhost:11000/images/boston.jpg
DEBUG: bytes read: 40614
DEBUG: closing stream to URL: http://localhost:11000/images/boston.jpg
DEBUG: compare files: results/win32/images/boston.jpg and docs/images/boston.jpg
ERROR: file1: results/win32/images/boston.jpg and file2: docs/images/boston.jpg
are different on 1K buffer #1 at byte #167
ERROR: buffer1[167] = 63 buffer2[167] = -112
Contents of buffer1 is:
-1 -40 -1 -32 0 16 74 70 73 70 0 1 2 1 0 72 0 72 0 0 -1 -19 14 84 80 104 111 116
On JDK1.1.6N you will not see this bug.
with HTTP URL's transfering IMAGE files from a HTTP Server. When running my
test program I get data corruption when transferring IMAGE files. It appears that only 1 byte is off all the time.
The problem only appears on WIN32. I was testing on a WINDOWS 95 system.
This problem happens with and without the JIT so its not a JIT bug.
This problem does not occur on WIN32 in JDK1.1.6N and JDK1.2Beta4 so it is a
regression.
The following starts the jhttpServer:
% java jhttpServer -p 11000 -r docs
The following starts the jhttpGetURL client:
% java jhttpGetURL -d -v -f data/jhttpGetURL.data
When you run this client program you will notice that image files being
transfered from the jhttpServer come across with data corruption. Look
at the "outurl.*" file in the results directory. I dump out the error to
this log file.
I have these programs as part of the attachment. To run them do the
following:
% uncompress url.tar
% cd url
% make
In a window start the jhttpServer
% java jhttpServer -p 11000 -r docs
In another window start the jhttpGetURL client
% java jhttpGetURL -d -v -f data/jhttpGetURL.data
When you run this program you will see the following output:
java version "1.1.7"
java full version "JDK1.1.7G"
verbose mode = on
debug mode = on
running green threads
loop count = 1
Starting jhttpServer server ....
DEBUG: opening URL file: data/jhttpGetURL.data
DEBUG: parsing URL: http://localhost:11000/html/docviewer.html
DEBUG: creating output file: results/win32/html/docviewer.html
DEBUG: opening stream to URL: http://localhost:11000/html/docviewer.html
DEBUG: reading data from URL: http://localhost:11000/html/docviewer.html
DEBUG: bytes read: 2310
DEBUG: closing stream to URL: http://localhost:11000/html/docviewer.html
DEBUG: compare files: results/win32/html/docviewer.html and docs/html/docviewer.
html
DEBUG: parsing URL: http://localhost:11000/html/embedded.html
DEBUG: creating output file: results/win32/html/embedded.html
DEBUG: opening stream to URL: http://localhost:11000/html/embedded.html
DEBUG: reading data from URL: http://localhost:11000/html/embedded.html
DEBUG: bytes read: 90412
DEBUG: closing stream to URL: http://localhost:11000/html/embedded.html
DEBUG: compare files: results/win32/html/embedded.html and docs/html/embedded.html
... ... ... ... ... ...
DEBUG: parsing URL: http://localhost:11000/images/boston.jpg
DEBUG: creating output file: results/win32/images/boston.jpg
DEBUG: opening stream to URL: http://localhost:11000/images/boston.jpg
DEBUG: reading data from URL: http://localhost:11000/images/boston.jpg
DEBUG: bytes read: 40614
DEBUG: closing stream to URL: http://localhost:11000/images/boston.jpg
DEBUG: compare files: results/win32/images/boston.jpg and docs/images/boston.jpg
ERROR: file1: results/win32/images/boston.jpg and file2: docs/images/boston.jpg
are different on 1K buffer #1 at byte #167
ERROR: buffer1[167] = 63 buffer2[167] = -112
Contents of buffer1 is:
-1 -40 -1 -32 0 16 74 70 73 70 0 1 2 1 0 72 0 72 0 0 -1 -19 14 84 80 104 111 116
On JDK1.1.6N you will not see this bug.
- duplicates
-
JDK-4163173 Regression: data corruption on IMAGE files using HTTP URL's.
- Closed
- relates to
-
JDK-4164736 java.lang.String byte/char conversions very slow (win32, 1.2fcs-D)
- Closed