Skip Menu |

This queue is for tickets about the perl-ldap CPAN distribution.

Report information
The Basics
Id: 44785
Status: resolved
Priority: 0/
Queue: perl-ldap

People
Owner: GBARR [...] CPAN.ORG
Requestors: matthew.seaman [...] thebunker.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: 'LDAP_SYNC_INFO' error under RT
Date: Fri, 03 Apr 2009 15:32:28 +0100
To: bug-perl-ldap [...] rt.cpan.org
From: Matthew Seaman <matthew.seaman [...] thebunker.net>
Hi there, We have experienced exactly the same problem as described in e-mail to the perl-ldap m/l by Johan Ström on Feb 12 2009. On a brand new installation of rt-3.8.2 on FreeBSD 7.1-RELEASE-p4, with (inter alia) the following ports installed: apache-2.2.11_3 mod_perl2-2.0.4_1,3 mysql-server-5.0.77_1 openldap-sasl-server-2.4.15 perl-5.8.9_2 rt-3.8.2 sendmail+tls+sasl2+ldap+db46-8.14.3 p5-RT-Authen-ExternalAuth-0.08 p5-perl-ldap-0.39 (plus dependencies) We got the following stack trace for the second and any subsequent login to RT after an apache restart: Can't continue after import errors at /usr/local/lib/perl5/site_perl/5.8.9/Net/LDAP/Intermediate.pm line 10 Stack: [/usr/local/lib/perl5/5.8.9/Carp.pm:44] [/usr/local/lib/perl5/site_perl/5.8.9/Net/LDAP/Constant.pm:28] [/usr/local/lib/perl5/site_perl/5.8.9/Net/LDAP/Intermediate.pm:10] [/usr/local/lib/perl5/site_perl/5.8.9/Net/LDAP/Intermediate.pm:12] [/usr/local/lib/perl5/site_perl/5.8.9/Net/LDAP/Intermediate.pm:12] [/usr/local/share/rt38/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:312] [/usr/local/share/rt38/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:356] [/usr/local/share/rt38/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:106] [/usr/local/share/rt38/plugins/RT-Authen-ExternalAuth/html/Callbacks/ExternalAuth/autohandler/Auth:25] [/usr/local/share/rt38/html/autohandler:256] BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.8.9/Net/LDAP/Intermediate.pm line 12. Stack: [/usr/local/lib/perl5/site_perl/5.8.9/Net/LDAP/Intermediate.pm:12] [/usr/local/lib/perl5/site_perl/5.8.9/Net/LDAP/Intermediate.pm:12] [/usr/local/share/rt38/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:312] [/usr/local/share/rt38/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:356] [/usr/local/share/rt38/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:106] [/usr/local/share/rt38/plugins/RT-Authen-ExternalAuth/html/Callbacks/ExternalAuth/autohandler/Auth:25] [/usr/local/share/rt38/html/autohandler:256] Compilation failed in require at /usr/local/lib/perl5/site_perl/5.8.9/Net/LDAP/Search.pm line 11. Stack: [/usr/local/lib/perl5/site_perl/5.8.9/Net/LDAP/Search.pm:11] [/usr/local/lib/perl5/site_perl/5.8.9/Net/LDAP/Intermediate.pm:11] [/usr/local/share/rt38/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:312] [/usr/local/share/rt38/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:356] [/usr/local/share/rt38/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:106] [/usr/local/share/rt38/plugins/RT-Authen-ExternalAuth/html/Callbacks/ExternalAuth/autohandler/Auth:25] [/usr/local/share/rt38/html/autohandler:256] BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.8.9/Net/LDAP/Search.pm line 11. Stack: [/usr/local/lib/perl5/site_perl/5.8.9/Net/LDAP/Search.pm:11] [/usr/local/share/rt38/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:312] [/usr/local/share/rt38/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:356] [/usr/local/share/rt38/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:106] [/usr/local/share/rt38/plugins/RT-Authen-ExternalAuth/html/Callbacks/ExternalAuth/autohandler/Auth:25] [/usr/local/share/rt38/html/autohandler:256] Compilation failed in require at /usr/local/lib/perl5/site_perl/5.8.9/Net/LDAP.pm line 433. and entries like the following in the rt-log: [Fri Apr 3 13:23:24 2009] [debug]: Attempting to use external auth service: localLDAP (/usr/local/share/rt38/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:64) [Fri Apr 3 13:23:24 2009] [debug]: Calling UserExists with $username (matthew) and $service (localLDAP) (/usr/local/share/rt38/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:105) [Fri Apr 3 13:23:24 2009] [debug]: UserExists params: username: matthew , service: localLDAP (/usr/local/share/rt38/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:274) [Fri Apr 3 13:23:24 2009] [debug]: LDAP Search === Base: dc=thebunker,dc=net == Filter: (&(objectclass=inetOrgPerson)(uid=matthew)) == Attrs: cn,mail,uid (/usr/local/share/rt38/plugins/RT-Authen-ExternalA uth/lib/RT/Authen/ExternalAuth/LDAP.pm:304) [Fri Apr 3 13:23:24 2009] [warning]: "LDAP_SYNC_INFO" is not exported by the Net::LDAP::Constant module at /usr/local/lib/perl5/site_perl/5.8.9/Net/LDAP/Intermediate.pm line 10 (/usr/local/lib/perl5/5.8.9/ Carp.pm:46) In our attempts to debug the problem we have stumbled upon the following modifications, which together cause RT to function correctly. Note: *both* of these patches are apparently required despite the fact that the only thing that gets added to Constants.pm are some comments. annoyed:...5.8.9/Net/LDAP:# diff -u Intermediate.pm{.save,} --- Intermediate.pm.save 2009-04-02 14:17:34.000000000 +0100 +++ Intermediate.pm 2009-04-03 14:37:52.000000000 +0100 @@ -7,7 +7,7 @@ use vars qw($VERSION); use strict; -use Net::LDAP::Constant qw( +use Net::LDAP qw( LDAP_SYNC_INFO ); annoyed:...5.8.9/Net/LDAP:# diff -u Constant.pm{.save,} --- Constant.pm.save 2009-04-03 14:31:31.000000000 +0100 +++ Constant.pm 2009-04-03 14:31:37.000000000 +0100 @@ -13,7 +13,9 @@ sub import { shift; my $callpkg = caller(0); + #warn("_find: ", join(",", @_), "\n"); _find(@_); + #warn("_found: ", join(",", keys %const), "\n"); my $oops; my $all = grep /:all/, @_; foreach my $sym ($all ? keys %const : @_) { @@ -30,16 +32,20 @@ sub _find { if (my @need = grep { ! $const{$_} } @_) { + #warn("in find: ", join(",", @need), "\n"); my %need; @need{@need} = (); my $all = exists $need{':all'}; seek(DATA,0,0); local $/=''; # paragraph mode local $_; + #warn("about to DATA\n"); while(<DATA>) { + #warn("need: ", join(",", keys %need), "\n"); next unless /^=item\s+(LDAP_\S+)\s+\((.*)\)/ and ($all or exists $need{$1}); my ($name, $value) = ($1,$2); delete $need{$name}; $const{$name} = sub () { $value }; + #warn("stored: $name\n"); last unless keys %need; } } Very bizarre. Cheers, Matthew -- Dr Matthew Seaman The Bunker, Ash Radar Station PGP: 0x60AE908C on servers Marshborough Rd Tel: +44 1304 814890 Sandwich Fax: +44 1304 814899 Kent, CT13 0PL, UK
Download signature.asc
application/pgp-signature 259b

Message body not shown because it is not plain text.

There is no way that adding comments should be required to fix a bug. And Net::LDAP::import is just a proxy to Net::LDAP::Constant::import. So there is something else happening here and I suspect it has todo with apache and Net::LDAP::Constant using __DATA__ It is odd that your traceback is skipping levels. for example ... [/usr/local/lib/perl5/site_perl/5.8.9/Net/LDAP/Intermediate.pm:12] [/usr/local/share/rt38/plugins/RT-Authen- ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:312] ... Line 312 calls ->search which is in Net::LDAP, which does a require Net::LDAP::Search which in turn does a use Net::LDAP::Intermediate where it goes bang. Could you try instead --- a/lib/Net/LDAP/Constant.pm +++ b/lib/Net/LDAP/Constant.pm @@ -4,12 +4,14 @@ package Net::LDAP::Constant; -$VERSION = "0.07"; +$VERSION = "0.08"; use Carp; my %const; +_find(':all') if $ENV{'MOD_PERL'}; + sub import { shift; my $callpkg = caller(0);