Errors Reported on a previously working assignment

Greetings everyone,

  I'm hopeful that someone can help me isolate and correct an error I'm getting while testing a previoulsy working assignment. I am re-offering the assignment, but all submissions are suspended becuase of an underlying error reported by the JavaTddPlugin. Here are the contents of the stderr file associated with the submission:

-bash-3.00$ less 1-stderr.txt
Bareword found where operator expected at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2128, near ");\s*})/ixsgp"
  (Might be a runaway multi-line // string starting on line 2118)
        (Missing operator before p?)
Bareword found where operator expected at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2156, near "\s*})/ixsgp"
  (Might be a runaway multi-line // string starting on line 2149)
        (Missing operator before p?)
Bareword found where operator expected at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2190, near "[\s\n]*})/ixsgp"
  (Might be a runaway multi-line // string starting on line 2182)
        (Missing operator before p?)
syntax error at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2128, near ");\s*})/ixsgp"
Can't use global $^PREMATCH in "my" at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2130, near "= ${^PREMATCH}"
syntax error at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2156, near "\s*})/ixsgp"
Can't use global $^PREMATCH in "my" at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2158, near "= ${^PREMATCH}"
syntax error at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2190, near "[\s\n]*})/ixsgp"
Can't use global $^PREMATCH in "my" at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2192, near "= ${^PREMATCH}"
Global symbol "$exemptLines" requires explicit package name at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2206.
Global symbol "$fileName" requires explicit package name at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2206.
Global symbol "$exemptLines" requires explicit package name at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2208.
Global symbol "$fileName" requires explicit package name at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2208.
Global symbol "$exemptLines" requires explicit package name at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2210.
Global symbol "$fileName" requires explicit package name at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2210.
syntax error at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2212, near "}"
/home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl has too many errors.

I checked to make sure that the version of Perl running on the server has not changed since this test was last run successfully. I have used Web-CAT successfully for the past year, and this is the first error of its kind that I have encountered.

Thanks in advance.

~James

Groups:

Comments

Stephen Edwards

OK, the problem seems to be

OK, the problem seems to be that the script uses the "p" modifier on the end of some regular expressions, but that this modifier was introduced in Perl v5.10, while you're using v5.8.

v5.8 is about 10 years old at this point (support for the p modifier was introduced around 7 years ago).  Is it reasonable to update the Perl you have installed on your server?

In the mean time, I'll check into whether we can move back to the older-style notation that was supported in earlier versions of Perl.  If that doesn't cause any problems, I can switch it.

earlyjp

I'll try installing V5.10

We remembered that we are frozen at Perl V5.8, becuase that is what SpamAssasin requires. But, I can install V5.10 in user space and see if that helps. I'll report back later. Again, thank you very much for your assistance.

Stephen Edwards

I think I can fix it so it

I think I can fix it so it works with both older and newer versions.  Try downloading this quick patch:

http://web-cat.org/updates/execute.pl

Use it to overwrite/replace that file in the JavaTddPlugin on your server.  Try it and let me know whether or not it works (if it works, I can include it in the next release).

earlyjp

Problem has returned

Hello Steven,

It looks like this exact problem has returned, perhaps as a result of a recent update (8/26?). All submissions to a previously working assignment are now suspending. Here is an example of the error messages generated by JavaTddPlugin:

$ cat 1-stderr.txt 

Bareword found where operator expected at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2128, near ");\s*})/ixsgp"

  (Might be a runaway multi-line // string starting on line 2118)

        (Missing operator before p?)

Bareword found where operator expected at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2156, near "\s*})/ixsgp"

  (Might be a runaway multi-line // string starting on line 2149)

        (Missing operator before p?)

Bareword found where operator expected at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2190, near "[\s\n]*})/ixsgp"

  (Might be a runaway multi-line // string starting on line 2182)

        (Missing operator before p?)

syntax error at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2128, near ");\s*})/ixsgp"

Can't use global $^PREMATCH in "my" at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2130, near "= ${^PREMATCH}"

syntax error at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2156, near "\s*})/ixsgp"

Can't use global $^PREMATCH in "my" at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2158, near "= ${^PREMATCH}"

syntax error at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2190, near "[\s\n]*})/ixsgp"

Can't use global $^PREMATCH in "my" at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2192, near "= ${^PREMATCH}"

Global symbol "$exemptLines" requires explicit package name at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2206.

Global symbol "$fileName" requires explicit package name at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2206.

Global symbol "$exemptLines" requires explicit package name at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2208.

Global symbol "$fileName" requires explicit package name at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2208.

Global symbol "$exemptLines" requires explicit package name at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2210.

Global symbol "$fileName" requires explicit package name at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2210.

syntax error at /home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl line 2212, near "}"

/home/earlyjp/courses/csc212/webcat/UserScripts/Oswego/earlyjp/JavaTddPlugin/execute.pl has too many errors.

Please let me know what can be done to restore operation.

Thanks,

~James

Stephen Edwards

If you try re-downloading and

If you try re-downloading and re-installing the patched execute.pl linked above, does that fix the problem?

earlyjp

Patch Works

Hello Steven,

Yes, the pacthed execute.pl file link that you provided last time does indeed solve the problem. I'll continue using that for the time being.

I have a related question about bringing Web-CAT up on a new server (Oracle Linux 2.6.39). Should I post that in another thread?

Thanks,

~James

Stephen Edwards

Yes, a new thread would be

Yes, a new thread would be appropriate (and easier for others to find).  Thanks!

earlyjp

Works great!

The pacthed execute.pl script is working perfectly. I will use that temparily until I have a chance install a more recent version of Perl. Thank you, Stephen!

Stephen Edwards

Don't worry about upgrading

Don't worry about upgrading Perl on your server--I'll include this fix in the next release of the plug-in, so v5.8 should continue to work on future plug-in updates as well.  Until then, the patched version you have now is exactly equivalent to the current release (but just v5.8-compatible now).  That means updating Perl isn't critical for you at this point (and may involve more headaches than it is worth until something else forces your hand).

Stephen Edwards

These error messages point to

These error messages point to new code added to the JavaTddPlugin to support identification of simple getter/setter methods (just added in the most recent release of the plug-in).  Which version of Perl is being used on your server?  It is possible there is a version-specific Perl syntax issue that needs to be fixed.

earlyjp

Perl Version

Hello Stephen!

Thank you for the prompt reply to this post. Below is the verbose version output of our Perl installation:

bash-3.00$ perl  -V
Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
  Platform:
    osname=solaris, osvers=2.10, archname=sun4-solaris-64int
    uname='sunos localhost 5.10 sun4u sparc SUNW,Ultra-2'
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v8 -D_TS_ERRNO',
    optimize='-xO3 -xspace -xildoff',
    cppflags=''
    ccversion='Sun WorkShop', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=87654321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =''
    libpth=/lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -lm -lc
    perllibs=-lsocket -lnsl -ldl -lm -lc
    libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R /usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE'
    cccdlflags='-KPIC', lddlflags='-G'


Characteristics of this binary (from libperl):
  Compile-time options: USE_64_BIT_INT USE_LARGE_FILES
  Locally applied patches:
        22667 The optree builder was looping when constructing the ops ...
        22715 Upgrade to FileCache 1.04
        22733 Missing copyright in the README.
        22746 fix a coredump caused by rv2gv not fully converting a PV ...
        22755 Fix 29149 - another UTF8 cache bug hit by substr.
        22774 [perl #28938] split could leave an array without ...
        22775 [perl #29127] scalar delete of empty slice returned garbage
        22776 [perl #28986] perl -e "open m" crashes Perl
        22777 add test for change #22776 ("open m" crashes Perl)
        22778 add test for change #22746 ([perl #29102] Crash on assign ...
        22781 [perl #29340] Bizarre copy of ARRAY make sure a pad op's ...
        22796 [perl #29346] Double warning for int(undef) and abs(undef) ...
        22818 BOM-marked and (BOMless) UTF-16 scripts not working
        22823 [perl #29581] glob() misses a lot of matches
        22827 Smoke [5.9.2] 22818 FAIL(F) MSWin32 WinXP/.Net SP1 (x86/1 cpu)
        22830 [perl #29637] Thread creation time is hypersensitive
        22831 improve hashing algorithm for ptr tables in perl_clone: ...
        22839 [perl #29790] Optimization busted: '@a = "b", sort @a' ...
        22850 [PATCH] 'perl -v' fails if local_patches contains code snippets
        22852 TEST needs to ignore SCM files
        22886 Pod::Find should ignore SCM files and dirs
        22888 Remove redundant %SIG assignments from FileCache
        23006 [perl #30509] use encoding and "eq" cause memory leak
        23074 Segfault using HTML::Entities
        23106 Numeric comparison operators mustn't compare addresses of ...
        23320 [perl #30066] Memory leak in nested shared data structures ...
        23321 [perl #31459] Bug in read()
        27722 perlio.c breaks on Solaris/gcc when > 256 FDs are available
        SPRINTF0 - fixes for sprintf formatting issues - CVE-2005-3962
        6663288 Upgrade to CGI.pm 3.33
        REGEXP0 - fix for UTF-8 recoding in regexps - CVE-2007-5116
        6758953 Perl Sys::Syslog can log messages with wrong severity
        6935710 patch 141552-01 causes an error when the Syslog perl module is used
        6961567 CVE-2010-1168 - Safe.pm 2.24 and earlier may allow attackers to break out of safe compartment
        7004391 CGI.pm needs update to filter newlines in headers (CVE-2010-2761, CVE-2010-4411)
        7116936 Problem with utility/perl
        7125218 Problem with utility/perl
  Built under solaris
  Compiled at Jun 11 2012 04:19:47
  @INC:
    /usr/perl5/5.8.4/lib/sun4-solaris-64int
    /usr/perl5/5.8.4/lib
    /usr/perl5/site_perl/5.8.4/sun4-solaris-64int
    /usr/perl5/site_perl/5.8.4
    /usr/perl5/site_perl
    /usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int
    /usr/perl5/vendor_perl/5.8.4
    /usr/perl5/vendor_perl
  

Just FYI -- I decided to do a complete resinstallation of Web-CAT this morning, and everything completed successfully. I reproduced the error with the first assignment I created on this new installation. I suspected a version issue with Perl, but I was unclear what might have changed.

I very much appreciate your help!

~James