Issue Details (XML | Word | Printable)

Key: DERBY-777
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Daniel John Debrunner
Reporter: Daniel John Debrunner
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

Hang in starting network server on Z/OS

Created: 20/Dec/05 09:00 AM   Updated: 25/Apr/06 03:40 AM
Return to search
Component/s: Localization, Network Server
Affects Version/s: 10.1.3.1, 10.2.1.6
Fix Version/s: 10.1.3.1, 10.2.1.6

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works derby777_1.txt 2005-12-20 09:11 AM Daniel John Debrunner 3 kB

Resolution Date: 25/Apr/06 03:40 AM


 Description  « Hide
Hang is in the java library call java/io/InputStreamReader.getEncoding

Looking at the Derby code, this call is used to get the default encoding as a String, however
the default encoding value is not required, the localization code can just use the constructors
that use default encoding. Will attach a 10.1 branch patch soon. See if this can work around
the hang in the java library.

3XMTHREADINFO "main" (TID:0x0A06D000, sys_thread_t:0x09F396EC, state:R, native ID:0x098B7500) prio=5
4XESTACKTRACE at java/io/FileInputStream.readBytes(Native Method)
4XESTACKTRACE at java/io/FileInputStream.read(FileInputStream.java:229)
4XESTACKTRACE at java/io/BufferedInputStream.read1(BufferedInputStream.java:265)
4XESTACKTRACE at java/io/BufferedInputStream.read(BufferedInputStream.java:324)
4XESTACKTRACE at java/io/BufferedInputStream.fill(BufferedInputStream.java:229)
4XESTACKTRACE at java/io/BufferedInputStream.read(BufferedInputStream.java:246)
4XESTACKTRACE at sun/nio/cs/StreamDecoder$LocalizedSD.sdInit(StreamDecoder.java:662)
4XESTACKTRACE at sun/nio/cs/StreamDecoder$LocalizedSD.encodingName(StreamDecoder.java:625)
4XESTACKTRACE at sun/nio/cs/StreamDecoder.getEncoding(StreamDecoder.java:180)
4XESTACKTRACE at java/io/InputStreamReader.getEncoding(InputStreamReader.java:184)
4XESTACKTRACE at org/apache/derby/iapi/tools/i18n/LocalizedResource.init(Bytecode PC:53)
4XESTACKTRACE at org/apache/derby/iapi/tools/i18n/LocalizedResource.<init>(Bytecode PC:30)
4XESTACKTRACE at org/apache/derby/impl/drda/NetworkServerControlImpl.init(Bytecode PC:9)
4XESTACKTRACE at org/apache/derby/impl/drda/NetworkServerControlImpl.<init>(Bytecode PC:222)
4XESTACKTRACE at org/apache/derby/drda/NetworkServerControl.main(Bytecode PC:6)

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Daniel John Debrunner added a comment - 20/Dec/05 09:11 AM
Patch to avoid using this code to get the default encoding, rather just use the standard constructors for objects that use
the default encoding.

encode = new java.io.InputStreamReader(System.in).getEncoding()

Only initial testing has been performed on patch (suite i18nTest), will run derbyall before committing.

Daniel John Debrunner made changes - 20/Dec/05 09:11 AM
Field Original Value New Value
Attachment derby777_1.txt [ 12321450 ]
Repository Revision Date User Message
ASF #358137 Tue Dec 20 23:04:37 UTC 2005 djd DERBY-777 Remove use of java.io.InputStreamReader.getEncoding to get the
platform's default encoding. Creating this reader on System.in was causing
a hang on Z/OS.
Now simply use the stream/reader constructors that do not take a encoding
argument and thus use the default. With this Derby does not need to know
the actual value of default encoding.
Files Changed
MODIFY /db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/load/ControlInfo.java
MODIFY /db/derby/code/branches/10.1/java/tools/org/apache/derby/iapi/tools/i18n/LocalizedOutput.java
MODIFY /db/derby/code/branches/10.1/java/tools/org/apache/derby/iapi/tools/i18n/LocalizedResource.java
MODIFY /db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/load/ExportWriteData.java
MODIFY /db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/load/ImportReadData.java
MODIFY /db/derby/code/branches/10.1/java/tools/org/apache/derby/iapi/tools/i18n/LocalizedInput.java

Repository Revision Date User Message
ASF #359833 Thu Dec 29 16:10:33 UTC 2005 djd DERBY-777 Remove use of java.io.InputStreamReader.getEncoding to get the
platform's default encoding. Creating this reader on System.in was causing
a hang on Z/OS.
Now simply use the stream/reader constructors that do not take a encoding
argument and thus use the default. With this Derby does not need to know
the actual value of default encoding.

Merge of 358137 from 10.1
Files Changed
MODIFY /db/derby/code/trunk/java/tools/org/apache/derby/iapi/tools/i18n/LocalizedInput.java
MODIFY /db/derby/code/trunk/java/tools/org/apache/derby/iapi/tools/i18n/LocalizedOutput.java
MODIFY /db/derby/code/trunk/java/tools/org/apache/derby/iapi/tools/i18n/LocalizedResource.java
MODIFY /db/derby/code/trunk/java/engine/org/apache/derby/impl/load/ControlInfo.java
MODIFY /db/derby/code/trunk/java/engine/org/apache/derby/impl/load/ImportReadData.java
MODIFY /db/derby/code/trunk/java/engine/org/apache/derby/impl/load/ExportWriteData.java

Daniel John Debrunner added a comment - 30/Dec/05 01:13 AM
Fixed in 10.1 branch (358137) and trunk (359833)

Daniel John Debrunner made changes - 30/Dec/05 01:13 AM
Affects Version/s 10.2.0.0 [ 11187 ]
Affects Version/s 10.1.2.1 [ 12310615 ]
Affects Version/s 10.1.2.2 [ 12310631 ]
Fix Version/s 10.2.0.0 [ 11187 ]
Daniel John Debrunner made changes - 30/Dec/05 01:14 AM
Resolution Fixed [ 1 ]
Fix Version/s 10.1.2.2 [ 12310631 ]
Status Open [ 1 ] Resolved [ 5 ]
Daniel John Debrunner made changes - 30/Dec/05 01:14 AM
Status Resolved [ 5 ] Closed [ 6 ]
Andrew McIntyre added a comment - 25/Apr/06 03:35 AM
Reopening to set Fix In to 10.1.3 also.

Andrew McIntyre made changes - 25/Apr/06 03:35 AM
Resolution Fixed [ 1 ]
Status Closed [ 6 ] Reopened [ 4 ]
Andrew McIntyre made changes - 25/Apr/06 03:39 AM
Affects Version/s 10.1.3.0 [ 12310616 ]
Andrew McIntyre made changes - 25/Apr/06 03:40 AM
Status Reopened [ 4 ] Closed [ 6 ]
Resolution Fixed [ 1 ]
Andrew McIntyre made changes - 25/Apr/06 03:40 AM
Resolution Fixed [ 1 ]
Status Closed [ 6 ] Reopened [ 4 ]
Andrew McIntyre made changes - 25/Apr/06 03:40 AM
Resolution Fixed [ 1 ]
Fix Version/s 10.1.3.0 [ 12310616 ]
Status Reopened [ 4 ] Closed [ 6 ]