Last Comment Bug 361149 - Auth modules generate warnings about deprecated pseudo-hashes
: Auth modules generate warnings about deprecated pseudo-hashes
Status: RESOLVED FIXED
:
Product: Bugzilla
Classification: Server Software
Component: Bugzilla-General (show other bugs)
: 2.23.3
: All All
: -- minor (vote)
: Bugzilla 3.2
Assigned To: Frédéric Buclin
: default-qa
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-18 10:21 PST by Teemu Mannermaa (:wicked)
Modified: 2008-06-29 16:52 PDT (History)
3 users (show)
mkanat: approval+
mkanat: blocking3.1.1+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch, v1 (5.30 KB, patch)
2007-08-09 05:22 PDT, Frédéric Buclin
mkanat: review+
Details | Diff | Splinter Review

Description Teemu Mannermaa (:wicked) 2006-11-18 10:21:02 PST
Every page request and collectstats.pl run end up with many warnings about Auth modules using deprecated pseudo-hashes. Pages seem to work still, not sure about collectstats.

This happens with "Bugzilla 2.23.3+ on perl 5.8.0" checked out few minutes ago. Doesn't seem to happen on 5.8.5, though.

For example, every night I get this from collectstats.pl cron job:

[Sat Nov 18 00:00:08 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth/Login/Stack.pm line 34.
[Sat Nov 18 00:00:08 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth/Login/Stack.pm line 37.
[Sat Nov 18 00:00:08 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth/Login/Stack.pm line 37.
[Sat Nov 18 00:00:08 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 47.
[Sat Nov 18 00:00:08 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth/Verify/Stack.pm line 29.
[Sat Nov 18 00:00:08 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth/Verify/Stack.pm line 32.
[Sat Nov 18 00:00:08 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 48.
[Sat Nov 18 00:00:08 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 51.
[Sat Nov 18 00:00:08 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 61.
[Sat Nov 18 00:00:08 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth/Login/Stack.pm line 46.
[Sat Nov 18 00:00:08 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth/Login/Stack.pm line 48.
[Sat Nov 18 00:00:08 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth/Login/Stack.pm line 51.
[Sat Nov 18 00:00:08 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth/Login/Stack.pm line 48.
[Sat Nov 18 00:00:08 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth/Login/Stack.pm line 51.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Use of uninitialized value in pattern match (m//) at (eval 40) line 4.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Use of uninitialized value in pattern match (m//) at (eval 40) line 4.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth/Login/Stack.pm line 34.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth/Login/Stack.pm line 37.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth/Login/Stack.pm line 37.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 47.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth/Verify/Stack.pm line 29.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth/Verify/Stack.pm line 32.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 48.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 51.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 125.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 125.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 126.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 127.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 127.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 128.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth/Verify/Stack.pm line 75.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth/Login/Stack.pm line 81.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 108.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 108.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 109.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth/Login/Stack.pm line 72.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 125.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 125.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 126.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 127.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 127.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 128.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth/Verify/Stack.pm line 75.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth/Login/Stack.pm line 81.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 108.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 108.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth.pm line 109.
[Sat Nov 18 00:00:09 2006] duplicates.cgi: Pseudo-hashes are deprecated at Bugzilla/Auth/Login/Stack.pm line 72.
Comment 1 Max Kanat-Alexander 2006-11-19 20:21:29 PST
That sounds like there's some bug in your "fields.pm" module that comes with perl.

Is this a stock perl 5.8.0 from perl.org, or an RPM? And have you done any major CPAN installations on it?
Comment 2 Teemu Mannermaa (:wicked) 2007-03-15 04:59:07 PDT
This happens with fields.pm v1.02 that comes in perl 5.8.0 but v2.03 of fields.pm that's included since perl 5.8.1 seems to work. Happens with any page that uses Auth modules.

I found this from the perl 5.8.1 changelog:

[ 19009] By: jhi                                   on 2003/03/17  11:08:20
        Log: Pseudohashes die hard -- go with Rick Delaney's idea
             of blessing the href at $phash->[0] as 'pseudohash',
             so the avhv_index() can then check for that.  Now:
             (1) thingies got via fields::new() do not warn
             (2) blessed manually constructed phashes warn
             (3) unblessed manually constructed phashes warn
             While the idea of using the Hash::Util lock_hash/unlock_hash
             on the href was enticing, it didn't quite work transparently
             since it changed the error message from "No such pseudo-hash
             field ..." to "Attempt to access disallowed key ...".

So it seems this fixed these warnings for fields::new() and I think that's what you use in all Auth modules. I tried to find more information about this change but couldn't find anything for this in the perl bug tracker or their mailing list that's referenced from that log.
Comment 3 Max Kanat-Alexander 2007-03-15 15:41:33 PDT
That's really lame. There are also other modules that we require that are kind of hard to build on perl 5.8.0 (one of the Email:: modules, as I recall, or some other module).

Would anybody object to just requiring 5.8.1? 5.8.0 *is* pretty old at this point.
Comment 4 Frédéric Buclin 2007-03-16 12:06:58 PDT
(In reply to comment #3)
> Would anybody object to just requiring 5.8.1? 5.8.0 *is* pretty old at this
> point.

Go for 5.8.1 on tip. r=LpSolit
Comment 5 Dave Miller [:justdave] (justdave@bugzilla.org) 2007-03-16 14:00:18 PDT
no objection from me, either.  r=justdave
Comment 6 Teemu Mannermaa (:wicked) 2007-03-18 03:29:27 PDT
(In reply to comment #3)
> Would anybody object to just requiring 5.8.1? 5.8.0 *is* pretty old at this
> point.

No objections here either as RHEL4 comes with 5.8.5 already. (However, RHEL3 users will be disappointed.) In fact, I was thinking that this would be your answer to this problem anyhow. :)
Comment 7 Max Kanat-Alexander 2007-03-18 11:58:58 PDT
Okay. So we'll change the requirement on the tip, and add a relnote for 3.0.
Comment 8 Max Kanat-Alexander 2007-05-08 13:36:51 PDT
Added to relnotes in bug 379777.
Comment 9 Frédéric Buclin 2007-08-07 15:33:24 PDT
Looks like |require 5.008001 if ON_WINDOWS;| can go away and |use 5.008;| should become |use 5.008001;|. It's probably good to change min requirements at the very beginning of the development.
Comment 10 Max Kanat-Alexander 2007-08-09 03:40:35 PDT
(In reply to comment #9)
> Looks like |require 5.008001 if ON_WINDOWS;| can go away and |use 5.008;|
> should become |use 5.008001;|. It's probably good to change min requirements at
> the very beginning of the development.

  Yes, also look for any other "use 5" or "require 5" statements in Bugzilla. I think there's one in runtests.pl.
Comment 11 Frédéric Buclin 2007-08-09 05:22:47 PDT
Created attachment 275963 [details] [diff] [review]
patch, v1
Comment 12 Max Kanat-Alexander 2007-08-09 05:28:14 PDT
Comment on attachment 275963 [details] [diff] [review]
patch, v1

>-# Bugzilla requires Perl 5.8.0 now.  Checksetup will tell you this if you run it, but
>+# Bugzilla requires Perl 5.8.1 now.  Checksetup will tell you this if you run it, but
> # it tests it in a polite/passive way that won't make it fail at compile time.  We'll

  That's actually not true--it does make it fail at compile time now. Not really part of this bug, though.

>-    # This only has an affect for Data::Dumper >= 2.12 (ie perl >= 5.8.0)
>     # Its just cosmetic, though, so that doesn't matter

  The rest of that comment doesn't make sense anymore, so we should remove it. You can do that on checkin.

  Otherwise, looks good to me!
Comment 13 Frédéric Buclin 2007-08-09 05:36:43 PDT
Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v  <--  checksetup.pl
new revision: 1.554; previous revision: 1.553
done
Checking in Bugzilla/Config.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config.pm,v  <--  Config.pm
new revision: 1.72; previous revision: 1.71
done
Checking in Bugzilla/Util.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Util.pm,v  <--  Util.pm
new revision: 1.59; previous revision: 1.58
done
Checking in docs/xml/Bugzilla-Guide.xml;
/cvsroot/mozilla/webtools/bugzilla/docs/xml/Bugzilla-Guide.xml,v  <--  Bugzilla-Guide.xml
new revision: 1.73; previous revision: 1.72
done
Checking in docs/xml/installation.xml;
/cvsroot/mozilla/webtools/bugzilla/docs/xml/installation.xml,v  <--  installation.xml
new revision: 1.142; previous revision: 1.141
done
Checking in t/001compile.t;
/cvsroot/mozilla/webtools/bugzilla/t/001compile.t,v  <--  001compile.t
new revision: 1.16; previous revision: 1.15
done
Comment 14 Max Kanat-Alexander 2008-06-29 16:52:10 PDT
I've added the Perl 5.8.1 requirement to the release notes on a patch in bug 432331.

Note You need to log in before you can comment on or make changes to this bug.