gzz-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz] [Fwd: Bug report]


From: Hermanni Hyytiälä
Subject: [Gzz] [Fwd: Bug report]
Date: 27 Jun 2003 15:41:42 +0300

FYI.


-Hermanni
--- Begin Message --- Subject: Bug report Date: 27 Jun 2003 15:40:59 +0300
Hi,

There seems to be a bug in Kaffe's java.io.StreamTokenizer package. The
bug occurs when I try to run Matt Welsh's free non-blocking IO package
(NBIO) (http://www.eecs.harvard.edu/~mdw/proj/java-nbio/).


More specifically, when I try test the installation by changing to the
sandStorm/test/basic directory and running (as the NBIO documentation
suggests):

  sandstorm sandstorm.cfg

Now, I get the following with Kaffe 1.1.0 (June 9, 2003):

- - -

Sandstorm v1.6 <address@hidden>
  Starting at Fri Jun 27 12:12:57 GMT 2003

Token: # (type: -3)
Error opening configuration file 'sandstorm.cfg': java.io.IOException:
No section name found at line 1 of config file, read #
java.io.IOException: No section name found at line 1 of config file,
read #
        at java.lang.Throwable.fillInStackTrace(Throwable.java:native)
        at java.lang.Throwable.<init>(Throwable.java:44)
        at java.lang.Exception.<init>(Exception.java:24)
        at java.io.IOException.<init>(IOException.java:24)
        at
mdw.sandStorm.main.SandstormConfig$configSection.doRead(SandstormConfig.java:689)
        at
mdw.sandStorm.main.SandstormConfig$configSection.<init>(SandstormConfig.java:618)
        at
mdw.sandStorm.main.SandstormConfig.readFile(SandstormConfig.java:476)
        at
mdw.sandStorm.main.SandstormConfig.<init>(SandstormConfig.java:176)
        at mdw.sandStorm.main.Main.main(Main.java:88)
Usage:
        java mdw.sandStorm.main.Main [-profile] <configfile> [initargs]

- - -

With IBM's JDK version 1.3 the following appears:

- - -


Sandstorm v1.6 <address@hidden>
  Starting at Fri Jun 27 15:14:55 GMT+03:00 2003

Token: <sandstorm> (type: -3)
Token: <global> (type: -3)
Token: <threadPool> (type: -3)
Token: <sizeController> (type: -3)
Token: <aSocket> (type: -3)
Token: <rateController> (type: -3)
Token: <aDisk> (type: -3)
Token: <stages> (type: -3)
Token: <TimerStage> (type: -3)
Token: <initargs> (type: -3)
Token: <GenStage1> (type: -3)
Token: <initargs> (type: -3)
Token: <SinkStage> (type: -3)
ThreadPoolController: Started, delay 2000 ms, threshold 1000,
autoMaxDetect false
Sandstorm: Starting aSocket layer
SelectSet: Using poll(2)
SelectSource created, do_balance = true
TP <aSocket ReadStage>: Adding 1 threads to pool, size 1
TP <aSocket ReadStage>: Starting 1 threads, maxBatch=-1

...

- - -

And finally with Sun's JDK 1.4 (1.4.1_01):

- - -
Sandstorm v1.6 <address@hidden>
  Starting at Fri Jun 27 15:17:30 EEST 2003

Token: <sandstorm> (type: -3)
Token: <global> (type: -3)
Token: <threadPool> (type: -3)
Token: <sizeController> (type: -3)
Token: <aSocket> (type: -3)
Token: <rateController> (type: -3)
Token: <aDisk> (type: -3)
Token: <stages> (type: -3)
Token: <TimerStage> (type: -3)
Token: <initargs> (type: -3)
Token: <GenStage1> (type: -3)
Token: <initargs> (type: -3)
Token: <SinkStage> (type: -3)
ThreadPoolController: Started, delay 2000 ms, threshold 1000,
autoMaxDetect false
Sandstorm: Starting aSocket layer
SelectSet: Using poll(2)
SelectSource created, do_balance = true
TP <aSocket ReadStage>: Adding 1 threads to pool, size 1
TP <aSocket ReadStage>: Starting 1 threads, maxBatch=-1

...

- - -

The start of the sandstorm.cfg looks like this:

- - -

# Example Sandstorm configuration file.
#
# The '#' starts a comment which extends to the end of the line
# This file uses an XML-like format consisting of nested sections.
# 
# Most of the sections of this file are optional. The complete set of
# options is given here just to document their use, and leaving options 
# unspecified causes them to use their default values. In general it is
# a good idea to just use the defaults.
#
# Special directives are indicated using <! ... > tags. Presently only
# one special directive is supported: <!include filename> which causes
# the named file to be included. Nested <!include> directives are
# supported. 

# The outermost section in the file must be called 'sandstorm'.
<sandstorm>

  # Global options
  <global>


- - -

The tokenizer is initialized in
sandStorm.main.SandstormConfig$configSection (starts from line 610) like
this:

- - -
...

tok = new StreamTokenizer(in);
tok.resetSyntax();
tok.wordChars((char)0, (char)255);
tok.whitespaceChars('\u0000', '\u0020');
tok.commentChar('#');
tok.eolIsSignificant(true);

...

- - -

As seen, the '#' character is defined as the comment token. However,
based on Sandstorm's outputs above, it looks like that Kaffe's
StreamTokenizer does not handle the '#' charackter properly, i.e.,
StreamTokenizer threats the '#' character at line 1 as a "WORD" token
(TT_WORD = -3). Also, when I remove the comment lines from the
sandstorm.cfg file, the test will continue further.

Please notice that the original source code of NBIO distribution does
not include the "Token: <token> (type: <integer>)" debugging
information; I modified the original source code of NBIO in order make
this bug report more straightforward.

The NBIO/Sandstorm relase is 1.5 which is distributed with the Tapestry
1.0 release (http://www.cs.berkeley.edu/~ravenben/tapestry/).



Regards,
Hermanni Hyytiälä

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]