[Swift-devel] Swift parser fails under Java 1.6.0_07

Michael Wilde wilde at mcs.anl.gov
Wed Nov 3 10:52:03 CDT 2010


I (with the help of a new user) just painfully re-discoverd that Swift's parser fails under the (somewhat old) Java JRE release 1.6.0_07 which happens to be the default under on the UChicago IBI cluster.

[wilde at ibicluster t2]$ java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)

When I run under 1.6.0_20 the problem does not occur.

Under _07, Swift fails compiling even the most trivial script, as in the example below, in which I include the complete log file.

Has anyone else seen this, and/or know the cause?

Im puzzled that the swift .log file doesn't start with the typical version and environment info. Its almost like swift is taking some strangely different execution path under 1.6.0_07.

This is not yet a major issue, but its unsettling that a specific java version could trigger this behavior.

- Mike

[wilde at ibicluster t4]$ ls -l
total 4
-rw-r--r-- 1 wilde brdfuser 14 Nov  3 10:42 hw.swift
[wilde at ibicluster t4]$ cat hw.swift
trace ("hi");
[wilde at ibicluster t4]$ swift hw.swift >stdout 2>stderr
[wilde at ibicluster t4]$ ls -l
total 272
-rw-r--r-- 1 wilde brdfuser   1559 Nov  3 10:44 hw-20101103-1045-3ljqjlz3.log
-rw-r--r-- 1 wilde brdfuser     14 Nov  3 10:42 hw.swift
-rw-r--r-- 1 wilde brdfuser      1 Nov  3 10:44 hw.xml
-rw-r--r-- 1 wilde brdfuser 257393 Nov  3 10:44 stderr
-rw-r--r-- 1 wilde brdfuser      0 Nov  3 10:44 stdout
-rw-r--r-- 1 wilde brdfuser     57 Nov  3 10:44 swift.log
[wilde at ibicluster t4]$ cat hw-20101103-1045-3ljqjlz3.log 
2010-11-03 10:45:38,587-0500 DEBUG Loader Max heap: 238616576
2010-11-03 10:45:38,588-0500 INFO  Loader hw.swift: source file is new. Recompiling.
2010-11-03 10:45:39,066-0500 DEBUG Loader Detailed exception:
org.griphyn.vdl.karajan.CompilationException: Unable to parse intermediate XML
	at org.griphyn.vdl.engine.Karajan.compile(Karajan.java:98)
	at org.griphyn.vdl.karajan.Loader.compile(Loader.java:295)
	at org.griphyn.vdl.karajan.Loader.main(Loader.java:140)
Caused by: org.apache.xmlbeans.XmlException: /userhom2/2/wilde/swift/lab/t4/hw.xml:2:1: error: Unexpected end of file after null
	at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3467)
	at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1270)
	at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1257)
	at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)
	at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:252)
	at org.globus.swift.language.ProgramDocument$Factory.parse(ProgramDocument.java:499)
	at org.griphyn.vdl.engine.Karajan.parseProgramXML(Karajan.java:122)
	at org.griphyn.vdl.engine.Karajan.compile(Karajan.java:96)
	... 2 more
Caused by: org.xml.sax.SAXParseException: Unexpected end of file after null
	at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038)
	at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723)
	at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3435)
	... 9 more
[wilde at ibicluster t4]$ wc -l stderr
3529 stderr
[wilde at ibicluster t4]$ head -30 stderr
action parse error in group XDTM line 3; template context is [program]
line 1:1: unexpected token: program
	at org.antlr.stringtemplate.language.ActionParser.primaryExpr(ActionParser.java:722)
	at org.antlr.stringtemplate.language.ActionParser.expr(ActionParser.java:430)
	at org.antlr.stringtemplate.language.ActionParser.templatesExpr(ActionParser.java:212)
	at org.antlr.stringtemplate.language.ActionParser.action(ActionParser.java:126)
	at org.antlr.stringtemplate.StringTemplate.parseAction(StringTemplate.java:957)
	at org.antlr.stringtemplate.language.TemplateParser.action(TemplateParser.java:161)
	at org.antlr.stringtemplate.language.TemplateParser.template(TemplateParser.java:127)
	at org.antlr.stringtemplate.StringTemplate.breakTemplateIntoChunks(StringTemplate.java:931)
	at org.antlr.stringtemplate.StringTemplate.setTemplate(StringTemplate.java:532)
	at org.antlr.stringtemplate.language.GroupParser.template(GroupParser.java:327)
	at org.antlr.stringtemplate.language.GroupParser.group(GroupParser.java:186)
	at org.antlr.stringtemplate.StringTemplateGroup.parseGroup(StringTemplateGroup.java:769)
	at org.antlr.stringtemplate.StringTemplateGroup.<init>(StringTemplateGroup.java:271)
	at org.antlr.stringtemplate.StringTemplateGroup.<init>(StringTemplateGroup.java:241)
	at org.griphyn.vdl.toolkit.VDLt2VDLx.compile(VDLt2VDLx.java:57)
	at org.griphyn.vdl.toolkit.VDLt2VDLx.compile(VDLt2VDLx.java:45)
	at org.griphyn.vdl.karajan.Loader.compile(Loader.java:290)
	at org.griphyn.vdl.karajan.Loader.main(Loader.java:140)
Can't parse chunk: program xmlns=$defaultNS()$
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:xs="http://www.w3.org/2001/XMLSchema"$if(!namespaces)$
line 1:15: unexpected char: '$'
	at org.antlr.stringtemplate.language.ActionLexer.nextToken(ActionLexer.java:219)
	at antlr.TokenBuffer.fill(TokenBuffer.java:69)
	at antlr.TokenBuffer.LA(TokenBuffer.java:80)
	at antlr.LLkParser.LA(LLkParser.java:52)
	at antlr.Parser.consumeUntil(Parser.java:149)
	at antlr.Parser.recover(Parser.java:312)
[wilde at ibicluster t4]$ which java
/usr/java/latest/bin/java
[wilde at ibicluster t4]$ 


-- 
Michael Wilde
Computation Institute, University of Chicago
Mathematics and Computer Science Division
Argonne National Laboratory




More information about the Swift-devel mailing list