WeBWorK Problems

Version 2.12 fix about apache child processes and random seeds

Version 2.12 fix about apache child processes and random seeds

by Larry Riddle -
Number of replies: 1
According to the release notes for WeBWorK 2.12, this version

"Fixed a bug where apache child processes had the same random seed."

This may be related to an issue that Chris Ahrendt discussed last September (2015) in a post about "Issues with gateway quizzes generating with the same seeds". 

We are using version 2.12, however, and seem to be having the same problems with a gateway quiz. For example, one student took the quiz six times. Here are the seeds for the four problems in each quiz

v1: 103  1153  1020  846
v2: 3409  921  4516  1888
v3: 2210  3531  1336  4344
v4: 2210  3531  1336  4344
v5: 4247  2260  3225  4579
v6: 2210  3531  1336  4344

As you can see, versions 2, 3, and 6 all used the exact same four seeds and thus the problems were identical in the three versions (although in different order). Versions 2 and 3 were taken about 27 minutes apart. Version 6 was taken about 40 minutes after version 4. 

The suggestion last September was to add the line 

PerlChildInitHandler "sub { srand }" 

to the apache configuration file. Is this what the fix was for version 2.12? I looked at our apache2.conf file and do not see anything about PerlChildInitHandler in that file. Is there a difference between whether we are running apache or apache2? The WeBWorK configuration we are running is the one obtained from the MAA site by one of our network techs.

I have not yet added the suggested line to our apache2.conf file since the instructor of the course didn't want to make any changes before the due date of the quiz (so all students would take it under the same conditions, even if that condition caused some of them to get duplicate copies.) But should the fix in 2.12 have prevented this problem from occurring? 

Thanks for any insight anyone might be able to offer.

Larry Riddle
Agnes Scott College
In reply to Larry Riddle

Re: Version 2.12 fix about apache child processes and random seeds

by Larry Riddle -
One correction to this post. I had forgotten that we originally installed an earlier version of WeBWorK and that I then updated it to 2.12 after the installation. I followed the instructions in the 2.12 release note. Perhaps I overlooked updating something that would have included the fix mentioned in the release notes about the apache child processes?

Larry