[LON-CAPA-admin] Random seed issue

Raeburn, Stuart raeburn at msu.edu
Fri Apr 5 09:16:50 EDT 2019


Hello,

Thank you for posting about this issue.  I was able to reproduce it using the symb, courseID, domain, and username for one of the two instances where it was seen in a course in the fsu domain.

If the arguments passed to the &random_set_seed() routine in Math:Random fall outside the permitted range when rendering a problem (e.g., when executing a call to &random() in a script block in a homework problem in perl Safe space), then Math:Random will generate this error message.  

Apparently if the 64bit5 randomization algorithm is selected in LON-CAPA, then certain combinations of symb, courseID, domain, and username (which are used in combination as the seed) can result in a "raw" random seed that contains one or more parts that do not satisfy the requirements of Math:Random::random_set_seed().  This is a rare event.

Anyway I have filed a bug ( see: bugs.loncapa.org/show_bug.cgi?id=6903 ), and implemented a solution which will be included in LON-CAPA 2.11.3.  Comment #1 in that bug also contains information about patching a 2.11.2 instance if you happen to run into this in the next week or two, before 2.11.3 is available.

Stuart Raeburn
LON-CAPA Academic Consortium

________________________________________
From: LON-CAPA-admin <lon-capa-admin-bounces at mail.lon-capa.org> on behalf of H. K. Ng <hkng at fsu.edu>
Sent: Monday, April 1, 2019 7:03 AM
To: list about administration and system updating
Subject: Re: [LON-CAPA-admin] Random seed issue

Funny that I got a similar message this morning for one of the problems. See below.

Regards,
-hk

 Usage: random_set_seed(@seed)
@seed[0,1] must be two integers in the range (1,1) to (2147483562,2147483398)
and usually comes from a call to random_get_seed() or
random_seed_from_phrase($phrase). at /usr/local/lib64/perl5/Safe/Hole.pm line 68.
This occurred while running:

$num=&random(1.,9.,.05);
$rand=&random(1.,9.,.05);
$freq=$num*1.e+06*3.e+08/2.;
$b=$rand*1.e+02/3.e+08;

On Sun, Mar 31, 2019 at 11:39 AM Lucas, Mark <lucasm at ohio.edu<mailto:lucasm at ohio.edu>> wrote:
I have a problem that has never really caused grief through the following error:

Usage: random_set_seed(@seed)
@seed[0,1] must be two integers in the range (1,1) to (2147483562,2147483398)
and usually comes from a call to random_get_seed() or
random_seed_from_phrase($phrase). at /usr/local/lib64/perl5/Safe/Hole.pm line 68

I don’t have any word of other issues.

Any thoughts as to what is going on?

Mark
--
Mark Lucas                                                              email: lucasm at ohio.edu<mailto:lucasm at ohio.edu>
252D Clippinger Lab                                             phone: (740)597-2984
Department of Physics and Astronomy                     fax: (740)593-0433
Ohio University
Athens, OH 45701

_______________________________________________
LON-CAPA-admin mailing list
LON-CAPA-admin at mail.lon-capa.org<mailto:LON-CAPA-admin at mail.lon-capa.org>


More information about the LON-CAPA-admin mailing list