Closed Bug 631487 Opened 13 years ago Closed 13 years ago

Undefined subroutine &Math::Random::Secure::irand called at Bugzilla/Util.pm line 580

Categories

(Bugzilla :: Installation & Upgrading, defect)

3.6.4
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: po_500.osto, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Build Identifier: 

After upgrading from 3.6.3 to 3.6.4:
1. When I am logged in I cannot view any bug details. Browser results in 500 Internal Server Error. However when I not logged in I can view any bug details. 
2. In /var/log/httpd/error_log there is error "Undefined subroutine &Math::Random::Secure::irand called at /var/www/html/bugzilla/Bugzilla/Util.pm line 580"
3. When restarting httpd some warnings arrive:
Starting httpd: Unable to locate Mouse or Moose in INC at /var/www/html/bugzilla/lib/Any/Moose.pm line 41.
Use of uninitialized value in string eq at /var/www/html/bugzilla/lib/Any/Moose.pm line 197.
Use of uninitialized value in string eq at /var/www/html/bugzilla/lib/Any/Moose.pm line 197.
Use of uninitialized value in string eq at /var/www/html/bugzilla/lib/Any/Moose.pm line 197.
Use of uninitialized value in string eq at /var/www/html/bugzilla/lib/Any/Moose.pm line 197.
Use of uninitialized value in string eq at /var/www/html/bugzilla/lib/Any/Moose.pm line 197.
Use of uninitialized value in string eq at /var/www/html/bugzilla/lib/Any/Moose.pm line 197.
Use of uninitialized value in string eq at /var/www/html/bugzilla/lib/Any/Moose.pm line 197.
Use of uninitialized value in string eq at /var/www/html/bugzilla/lib/Any/Moose.pm line 198.

running ./checksetup.pl is OK
running ./sanitycheck.pl emails me OK



Reproducible: Always




I was making upgrade on the test server and cant reproduce this because of no backup copy. My steps were:
1. upgrading using patch
2. ./checksetup.pl
3. /usr/bin/perl install-module.pl --all
4. ./checksetup.pl one more time
In addition I didn't make one step from instruction "Shut down your Bugzilla installation by putting some HTML or text in the shutdownhtml parameter"

Is this so important?
Looks like Math::Random::Secure hasn't been installed correctly, or one of its dependencies hasn't.
Assignee: general → installation
Component: Bugzilla-General → Installation & Upgrading
Version: unspecified → 3.6.4
You may need to restart your web server if you're running under mod_perl.

You may also need to run checksetup.pl again--it is important to actually read what it says.
Bugzilla is working in cgi mod

output of ./checksetup.pl
* This is Bugzilla 3.6.4 on perl 5.8.8
* Running on Linux 2.6.18-194.17.1.el5 #1 SMP Wed Sep 29 12:51:33 EDT 2010

Checking perl modules...
Checking for              CGI.pm (v3.51)   ok: found v3.51
Checking for          Digest-SHA (any)     ok: found v5.50
Checking for            TimeDate (v2.21)   ok: found v2.24
Checking for            DateTime (v0.28)   ok: found v0.66
Checking for   DateTime-TimeZone (v0.71)   ok: found v1.27
Checking for                 DBI (v1.41)   ok: found v1.616
Checking for    Template-Toolkit (v2.22)   ok: found v2.22
Checking for          Email-Send (v2.00)   ok: found v2.198
Checking for          Email-MIME (v1.861)  ok: found v1.906
Checking for Email-MIME-Encodings (v1.313)  ok: found v1.313
Checking for Email-MIME-Modifier (v1.442)  ok: found v1.906
Checking for                 URI (any)     ok: found v1.58

Checking available perl DBD modules...
Checking for              DBD-Pg (v1.45)   ok: found v1.49
Checking for           DBD-mysql (v4.00)   ok: found v4.018
Checking for          DBD-Oracle (v1.19)    not found

The following Perl modules are optional:
Checking for                  GD (v1.20)   ok: found v2.45
Checking for               Chart (v2.1)    ok: found v2.4.2
Checking for         Template-GD (any)     ok: found v1.56
Checking for          GDTextUtil (any)     ok: found v0.86
Checking for             GDGraph (any)     ok: found v1.44
Checking for            XML-Twig (any)     ok: found v3.37
Checking for          MIME-tools (v5.406)  ok: found v5.500
Checking for         libwww-perl (any)     ok: found v5.835
Checking for         PatchReader (v0.9.4)  ok: found v0.9.5
Checking for           perl-ldap (any)     ok: found v0.4001
Checking for         Authen-SASL (any)     ok: found v2.15
Checking for          RadiusPerl (any)     ok: found v0.20
Checking for           SOAP-Lite (v0.710.06) ok: found v0.712
Checking for            JSON-RPC (any)     ok: found v0.96
Checking for          Test-Taint (any)     ok: found v1.04
Checking for         HTML-Parser (v3.40)   ok: found v3.68
Checking for       HTML-Scrubber (any)     ok: found v0.08
Checking for Email-MIME-Attachment-Stripper (any)     ok: found v1.316
Checking for         Email-Reply (any)     ok: found v1.202
Checking for         TheSchwartz (any)     ok: found v1.10
Checking for      Daemon-Generic (any)     ok: found v0.71
Checking for            mod_perl (v1.999022) ok: found v2.000004
Checking for  Math-Random-Secure (v0.05)   ok: found v0.06
Reading ./localconfig...
Checking for           DBD-mysql (v4.00)   ok: found v4.018
Checking for           MySQL (v4.1.2)  ok: found v5.0.77

Removing existing compiled templates...
Precompiling templates...done.
Fixing file permissions...
If you get warnings about Bugzilla when you are restarting httpd, then you are running under mod_perl, not under mod_cgi. I suspect that one way or another, this is a support issue--try asking on the support-bugzilla mailing list, described here:

  http://www.bugzilla.org/support/
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
Summary: Internal Server Error → Undefined subroutine &Math::Random::Secure::irand called at Bugzilla/Util.pm line 580
(In reply to comment #5)
> If you get warnings about Bugzilla when you are restarting httpd, then you are
> running under mod_perl, not under mod_cgi. I suspect that one way or another,
> this is a support issue--try asking on the support-bugzilla mailing list,
> described here:
> 
>   http://www.bugzilla.org/support/

Yes. switching to cgi resolves  all error messages
Note that we also get several people coming on IRC who have the same problem. Mouse seems to be the culprit.
The culprit actually seems to be that Math::Random::ISAAC and Math::Random::ISAAC::XS have a circular dependency on each other, and so they don't get installed properly. I'd say that this is a bug in CPAN (it should fail to install Math::Random::Secure in this case) but it's also a bug in Math::Random::ISAAC.
Ah ha! I see LpSolit filed a bug about that already, even, and the maintainer is going to fix it. :-) https://rt.cpan.org/Public/Bug/Display.html?id=65841

Awesome!
I've implemented a patch on my version (default CentOS version - 3.2.10).

I'm no Perl programmer, nor could I fix things up playing around with CPAN.

My error report indicated that the problem was in Util.pm @ line 533.  Around that area is a conditional which chooses between using SecureRandom and some other way.  I just forced the conditional to choose the other way.

It fixed my problem (unable to modify multiple bugs).

    if (0) {
    # if (eval { require Math::Random::Secure; 1; }) {

If this is stupid or there is a better way to solve this, let me know.
You need to log in before you can comment on or make changes to this bug.