Forum archive 2000-2006

ohn Williams - Sorting out the errors

ohn Williams - Sorting out the errors

by Arnold Pizer -
Number of replies: 0
inactiveTopicSorting out the errors topic started 9/23/2003; 12:45:34 PM
last post 10/14/2003; 2:07:42 PM
userJohn Williams - Sorting out the errors  blueArrow
9/23/2003; 12:45:34 PM (reads: 2391, responses: 14)

At Hartford, we started the year with a new server, new version of WebWork and optimism.  The server is fast and we have more instructors using the system, more students and faster response.  But purple screens keep popping up.  They all seem to lead to PG_Sort.  We moved from WW1.7 to 1.9.  We moved form Unix to RedHat Linux Ver. 9.  We moved from Perl 5.6 to Perl 5.8.  I am betting on the last change as being the culprit.  I read in http://www.perldoc.com/perl5.8.0/lib/sort.html that sort changed from 5.6 to 5.8.  I don't know enough to go any farther. 

 

John Williams

<| Post or View Comments |>


userMichael Gage - Re: Sorting out the errors  blueArrow
9/23/2003; 5:19:30 PM (reads: 2568, responses: 0)
I agree that perl 5.8 changes are a likely source. One of the reasons for using PG_sort() rather than using sort directly in problems and in macros was to isolate sort in case it's behavior changed.

Unfortunately I don't have perl 5.8 running on any of our webwork systems here. Can you give a sample of the errors (including errors from the log file) that occur? If they are long you can send them to me via email rather than post them. I'll do what I can.

-- Mike (gage@math.rochester.edu)

<| Post or View Comments |>


userGavin LaRose - Re: Sorting out the errors  blueArrow
9/24/2003; 8:26:27 AM (reads: 2557, responses: 0)
Hi all,

I've been running WeBWorK 1.9 with Perl 5.8.0 since the middle of August with no trouble.   This is on Solaris, but I can't think that should make a huge difference.

Gavin

<| Post or View Comments |>


userJohn Jones - Re: Sorting out the errors  blueArrow
9/24/2003; 5:00:41 PM (reads: 2546, responses: 0)
Hi,

On one hand, you say that you are getting lots of pink screens, but not very many WW problems call sort directly. So, I assume you have examples of troublesome problems which don't mention sort.

The next thing I would check is if there are problems which don't use list or interval evaluators (each of which sorts things internally). Depending on the problems you use, these may occur pretty infrequently.

If all pink screen problems fall into the categories above, then sort probably is the problem. But, if you have a problem which causes pink screens and does not directly call sort, PG_sort, number_list_cmp, or interval_cmp, then sort seems unlikely to be the culprit. In that case, you might point to a simple problem or two which still causes pink screens.

John

<| Post or View Comments |>


userMichael Gage - Re: Sorting out the errors  blueArrow
9/24/2003; 9:16:15 PM (reads: 2524, responses: 0)
Hi,

I have the error reproduced on our linux system. In the function PGsort in the file PGtranslator.pm the values $a and $b used in the sort are not being passed into the comparison function. I can't figure out why right at the moment. If someone else can duplicate they error, perhaps they can see what I'm missing.

--Mike

<| Post or View Comments |>


userJohn Williams - Re: Sorting out the errors  blueArrow
9/25/2003; 8:24:48 AM (reads: 2536, responses: 2)

Here is a set definition file for problems in the demo course that all cause pink screens.  They do seem to all rely on sort in some manner.

 

setNumber=SortProblems

openDate = 05/01/02, 0600

dueDate = 1/1/10 at 2:00am

answerDate = 1/1/10 at 2:00am

paperHeaderFile = paperSetHeader.pg

screenHeaderFile = screenSetHeader.pg

problemList =

setSampleAnswers/sample_str_ans.pg, 1

setGenericQuestions/CheckboxMult.pg, 1

setIntegrals25RationalFunctions/nsAP_F_22.pg, 1

setAlgebra23PolynomialZeros/srw3_3_21.pg, 1

 

John Williams

<| Post or View Comments |>


userThomas Hagedorn - Re: Sorting out the errors  blueArrow
9/25/2003; 2:25:20 PM (reads: 2710, responses: 1)

We're also running Webwork 1.9 and Perl 5.8

I tested the first three problems on our system.  We had errors with the first two problems, but different than what you stated.  The fourth problem wasn't found in our problem library and
the third problem was fine.  The first problem  comes up with and error and the message:

"This uses strict_str_cmp "

The second problem didn't have its image graphic appear.


-Tom


<| Post or View Comments |>


userThomas Hagedorn - Re: Sorting out the errors  blueArrow
9/25/2003; 2:26:22 PM (reads: 2898, responses: 0)

We're also running RedHat Linux (not sure the version number, but within the last 5 months).

-tom

<| Post or View Comments |>


userBill Ziemer - Re: Sorting out the errors  blueArrow
9/25/2003; 2:45:24 PM (reads: 2512, responses: 0)
Using that setdef file, I do not get any pink screens. Using perl 5.8.0, and webwork 1.9 (made with my makefile). Perhaps one of the modules for perl?

You can run the script:

#!/path/to/webwork/perl
printf( "%-20s %10s\n","Module","Installed");
foreach $module ( GD,HTML::Parser,HTML::Tagset,MIME::Base64,Dig est::MD5,URI ){
   eval "require $module";
   printf( "%-20s%10s\n", $module, $module->VERSION) unles s ($EVAL_ERROR);
}

my output is

Module    Installed
GD    1.40
HTML::Parser    3.26
HTML::Tagset    3.03
MIME::Base64    2.12
Digest::MD5    2.20
URI    1.19

<| Post or View Comments |>


userArnold K. Pizer - Re: Sorting out the errors  blueArrow
9/25/2003; 2:59:18 PM (reads: 2510, responses: 0)

On our site (where we can reproduce the error) this gives:

[apizer@hilbert test]$ perl test.pl
Module                Installed
GD                        2.07
HTML::Parser              3.28
HTML::Tagset              3.03
MIME::Base64              2.20
Digest::MD5               2.20
URI                       1.21

but I don't understand what any of these would have to do with PGsort.

Arnie

<| Post or View Comments |>


userBill Ziemer - Re: Sorting out the errors  blueArrow
9/25/2003; 4:56:34 PM (reads: 2506, responses: 0)
Just trying to find any difference in the perl setup that works versus not. Pretty much just fishing. Maybe CGI? I am running 2.752 (added CGI to the foreach list in the script)

<| Post or View Comments |>


userMichael Gage - Re: Sorting out the errors  blueArrow
9/25/2003; 6:00:19 PM (reads: 2500, responses: 0)
Oops. Thought I had a fix, but it's a false alarm. The following script, which seems nearly identical to the code in PGtranslator seems to work ok.

 



#!/usr/bin/perl -w



use strict;



sub PGsort {



my $compare = shift;

sort {&$compare($a, $b) } @_;
}



my @list = (4, 5 ,10, 8, 9 );



my $str = join( " ", PGsort sub {$_[0] <=> $_[1] } , @list );



print $str;



Now to find out why it doesn't work in context.

--Mike

<| Post or View Comments |>


userBill Ziemer - Re: Sorting out the errors  blueArrow
9/26/2003; 2:48:03 AM (reads: 2497, responses: 0)
Looking at nsAP_F_22.pg in particular, there is only num_sort which invokes PGsort just as the above code does. The only difference I can see is that webwork invokes it inside the Safe module.
I am running version 2.06 (adding Safe to the foreach list in the above script).

http://archive.develooper.com/perl5-porters@perl.org/msg87643.html

has a discussion of how $_[1] is not handled quite right, I don't know if it applies here or not.

<| Post or View Comments |>


userArnold K. Pizer - Re: Sorting out the errors  blueArrow
10/8/2003; 10:16:13 AM (reads: 2438, responses: 0)
We have the error when using  Safe  version  2.09.

<| Post or View Comments |>


userArnold K. Pizer - Re: Sorting out the errors  blueArrow
10/14/2003; 2:07:42 PM (reads: 2440, responses: 0)
I just tried using  Safe  version  2.10.  This gives the same error.

<| Post or View Comments |>