You are here: Foswiki>Tasks Web>Item1819 (08 Jun 2015, IngoKappler)Edit Attach

Item1819: undefined symbol: apreq_handle_apache2 when using mod_perl

pencil
Priority: Normal
Current State: Closed
Released In:
Target Release: n/a
Applies To: Extension
Component: ModPerlEngineContrib
Branches: master
Reported By: IngoKappler
Waiting For:
Last Change By: IngoKappler
The following setup is used:
  1. mod_perl engine is activated
  2. template login is used
  3. ldap contrib is active for authentication

There is no problem with the login when using CGI. But when activating mod_perl all pages can be browsed but the login fails presenting a white empty screen. The error log holds this:

[Fri Jul 10 00:55:48 2009] [error] [client 192.168.129.1] Apache2::RequestIO::print: (104) Connection reset by peer at /path/to/foswiki/lib/Foswiki/Engine/Apache.pm line 243, referer: https://hostname/foswiki/bin/login/Offices/Duesseldorf/WikiInstallationLdapNGPluginTests?origurl=/foswiki/Offices/Duesseldorf/WikiInstallationLdapNGPluginTests%3frefreshldap%3don%26refresh%3don
/usr/sbin/apache2: symbol lookup error: /usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so: undefined symbol: apreq_handle_apache2

-- IngoKappler - 09 Jul 2009

Seems as if your apache is flawed. Which operating system is it? Which linux distro? Try ldd /usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so and watch out for any undefined symbol library.

-- MichaelDaum - 10 Jul 2009

Debian Linux alias Lenny.

ldd /usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so
        linux-gate.so.1 =>  (0xb7f22000)
        libapreq2.so.3 => /usr/lib/libapreq2.so.3 (0xb7f0b000)
        libaprutil-1.so.0 => /usr/lib/libaprutil-1.so.0 (0xb7eed000)
        libapr-1.so.0 => /usr/lib/libapr-1.so.0 (0xb7ec1000)
        libuuid.so.1 => /lib/libuuid.so.1 (0xb7ebd000)
        librt.so.1 => /lib/i686/cmov/librt.so.1 (0xb7eb4000)
        libcrypt.so.1 => /lib/i686/cmov/libcrypt.so.1 (0xb7e82000)
        libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb7e69000)
        libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb7e65000)
        libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7d09000)
        libldap_r-2.4.so.2 => /usr/lib/libldap_r-2.4.so.2 (0xb7cc6000)
        liblber-2.4.so.2 => /usr/lib/liblber-2.4.so.2 (0xb7cb9000)
        libdb-4.6.so => /usr/lib/libdb-4.6.so (0xb7b86000)
        libpq.so.5 => /usr/lib/libpq.so.5 (0xb7b67000)
        libmysqlclient_r.so.15 => /usr/lib/libmysqlclient_r.so.15 (0xb797b000)
        libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0xb790c000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb78e6000)
        /lib/ld-linux.so.2 (0xb7f23000)
        libresolv.so.2 => /lib/i686/cmov/libresolv.so.2 (0xb78d2000)
        libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0xb78bb000)
        libgnutls.so.26 => /usr/lib/libgnutls.so.26 (0xb781d000)
        libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8 (0xb77d7000)
        libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8 (0xb7684000)
        libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0xb75f0000)
        libcom_err.so.2 => /lib/libcom_err.so.2 (0xb75ed000)
        libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0xb75c2000)
        libnsl.so.1 => /lib/i686/cmov/libnsl.so.1 (0xb75a9000)
        libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7583000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb756e000)
        libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0xb755e000)
        libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0xb7559000)
        libgcrypt.so.11 => /usr/lib/libgcrypt.so.11 (0xb74f1000)
        libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0xb74cd000)
        libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0xb74c5000)
        libkeyutils.so.1 => /lib/libkeyutils.so.1 (0xb74c2000)

-- IngoKappler - 10 Jul 2009

Issue most probably isn't related to LdapContrib because when logging in while using normal CGI and afterwards switching to use mod_perl, the issue also occures when trying to save with an editor or to use preview from the raw editor. The error reamins thes same:

/usr/sbin/apache2: symbol lookup error: /usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so: undefined symbol: apreq_handle_apache2
/usr/sbin/apache2: symbol lookup error: /usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so: undefined symbol: apreq_handle_apache2
/usr/sbin/apache2: symbol lookup error: /usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so: undefined symbol: apreq_handle_apache2

Now put the issue to ModPerlEngineContrib.

Oh, this doesn't look good indifferent, speechless :

root@wiki-ngm-test:/etc/apache2# ldd -r /usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so
        linux-gate.so.1 =>  (0xb7fbf000)
        libapreq2.so.3 => /usr/lib/libapreq2.so.3 (0xb7fa8000)
        libaprutil-1.so.0 => /usr/lib/libaprutil-1.so.0 (0xb7f8a000)
        libapr-1.so.0 => /usr/lib/libapr-1.so.0 (0xb7f5e000)
        libuuid.so.1 => /lib/libuuid.so.1 (0xb7f5a000)
        librt.so.1 => /lib/i686/cmov/librt.so.1 (0xb7f51000)
        libcrypt.so.1 => /lib/i686/cmov/libcrypt.so.1 (0xb7f1f000)
        libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb7f06000)
        libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb7f02000)
        libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7da6000)
        libldap_r-2.4.so.2 => /usr/lib/libldap_r-2.4.so.2 (0xb7d63000)
        liblber-2.4.so.2 => /usr/lib/liblber-2.4.so.2 (0xb7d56000)
        libdb-4.6.so => /usr/lib/libdb-4.6.so (0xb7c23000)
        libpq.so.5 => /usr/lib/libpq.so.5 (0xb7c04000)
        libmysqlclient_r.so.15 => /usr/lib/libmysqlclient_r.so.15 (0xb7a18000)
        libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0xb79a9000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb7983000)
        /lib/ld-linux.so.2 (0xb7fc0000)
        libresolv.so.2 => /lib/i686/cmov/libresolv.so.2 (0xb796f000)
        libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0xb7958000)
        libgnutls.so.26 => /usr/lib/libgnutls.so.26 (0xb78ba000)
        libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8 (0xb7874000)
        libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8 (0xb7721000)
        libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0xb768d000)
        libcom_err.so.2 => /lib/libcom_err.so.2 (0xb768a000)
        libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0xb765f000)
        libnsl.so.1 => /lib/i686/cmov/libnsl.so.1 (0xb7646000)
        libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7620000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb760b000)
        libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0xb75fb000)
        libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0xb75f6000)
        libgcrypt.so.11 => /usr/lib/libgcrypt.so.11 (0xb758e000)
        libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0xb756a000)
        libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0xb7562000)
        libkeyutils.so.1 => /lib/libkeyutils.so.1 (0xb755f000)
undefined symbol: Perl_get_sv   (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: Perl_Imarkstack_ptr_ptr       (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: Perl_Isv_yes_ptr      (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: modperl_xs_sv2request_rec     (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: Perl_call_list        (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: Perl_Istack_sp_ptr    (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: Perl_sv_2mortal       (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: Perl_vstringify       (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: Perl_form     (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: Perl_vcmp     (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: Perl_sv_setref_pv     (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: Perl_Iscopestack_ix_ptr       (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: Perl_newSV    (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: apreq_handle_apache2  (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: Perl_Iunitcheckav_ptr (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: Perl_Istack_base_ptr  (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: Perl_newSVpv  (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: Perl_new_version      (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: Perl_croak    (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: Perl_newXS    (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: Perl_sv_derived_from  (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: Perl_sv_2pv_flags     (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)
undefined symbol: Perl_sv_magic (/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so)

-- IngoKappler - 11 Jul 2009

Check if there is a link in /etc/apache2/mods-enabled pointing to /etc/apache2/mods-available/apreq.load and another pointing to /etc/apache2/mods-available/perl.load. If not, create them, restart apache and test if it works.

-- GilmarSantosJr - 11 Jul 2009

Thanks! smile Putting the link for apreq.load solved the issue. Looks like this should be added to the documentation for the ModPerlEngineContrib.

Regards,
-- IngoKappler - 11 Jul 2009

yes, appropriate information should be added to the ModPerlEngineContrib documentation.

-- WillNorris - 16 Jul 2009

I plan to do that via subversion although it may take me a bit the first time.

-- IngoKappler - 23 Jul 2009

Good job, Ingo! smile

Just an observation: Apache2::Request is not required. It's recommended. The code try to use it, but if it's not available CGI.pm is used. It's already said in the Dependencies field, but it needs to be more explicit.

Feel free to update change history and version number in svn and release to foswiki.org.

-- GilmarSantosJr - 28 Jul 2009

Hi Gilmar,

right it is listed in the dependencies. If you try using CGI in case Apache2::Request is not available why did it fail for me then, while I had not loaded the apreq module? Could there be an issue with the fallback or the apreq verification? Maybe the fallback normally works and only under special conditions fails? Because for me everything looked ok until I tried to login. I double checked now my CGI version which is 3.29. So as of now and from my personal point of view apreq was required not recommended (optional). Don't get me wrong wink , recommeded is most probably the correct definition and I now aligned the documentation change accordingly. I am just asking/trying to understand. smile

-- IngoKappler - 28 Jul 2009

Uh, finally delivered wink and closed.

-- IngoKappler - 23 Oct 2009
Topic revision: r19 - 08 Jun 2015, IngoKappler - This page was cached on 15 Dec 2018 - 18:59.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy