Troubleshooting Request Tracker version 3 Error – Attempt to free unreferenced scalar, Perl interpreter

Updated on September 4, 2017

I have been using Request Tracker version 3 for quite sometime and it worked great. But suddenly the RT server crashed and the Apache error log had the below error message:

Attempt to free unreferenced scalar: SV 0x811ef70, Perl interpreter: 0x7f5a010 at
 /usr/lib/perl5/5.8.8/ExtUtils/Liblist.pm line 6.
 Segmentation fault

It seemed like many of the perl scripts had problems and in fact, the perl and cpan commands resulted with the same error as above:

# cpan
 Attempt to free unreferenced scalar: SV 0x811ef70, Perl interpreter: 0x7f5a010 at
 /usr/lib/perl5/5.8.8/ExtUtils/Liblist.pm line 6.
 Segmentation fault

Solution:

I was not sure what would have caused this error, but after spending sometime in Google, I understood that some of the perl modules or the operating system might have been updated. But the scary thing is, I didn’t update anything recently. Whatever, I started to troubleshoot the issue.

The only option I had was to install Perl and its modules again.

Re-install Perl

To be on a safer side, I took a backup of the old Perl installation files as below:

#mv /usr/lib/perl5 /usr/lib/perl5.bak
#mv /usr/lib64/perl5 /usr/lib64/perl5.bak

Now, I re-installed Perl using Yum

#yum reinstall perl

Good, now I was able to execute at least the ‘perl‘ command (which I was not able to earlier)

# perl -v
This is perl, v5.8.8 built for x86_64-linux-thread-multi

Install Perl CPAN

# perl -MCPAN -e shell
Can't locate CPAN.pm in @INC (@INC contains:

I installed perl-CPAN module using yum

#yum install perl-CPAN

Now, the cpan also worked (without the segmentation fault error)

# cpan
cpan shell -- CPAN exploration and modules installation (v1.7602)
ReadLine support available (try 'install Bundle::CPAN')
cpan>

Check if RT configurations are proper in httpd.conf

Below is the sample configuration:

NameVirtualHost rt_server:443
<VirtualHost rt_server:443>
ServerName rt_server_in
DocumentRoot /opt/rt3/share/html
AddDefaultCharset UTF-8
PerlModule Apache::DBI
PerlRequire "/opt/rt3/bin/webmux.pl"
<Location /NoAuth/images>
SetHandler default
</Location>
<Location />
SetHandler perl-script
PerlResponseHandler RT::Mason
</Location>
ErrorLog logs/error_log
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/rt_server_cert.pem
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/rt_server_key.pem
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
</VirtualHost>

Start httpd and mysqld server : 

Remember, we haven’t installed any Perl module that are required to start RT. To know what are the perl modules required, we’ll start httpd server and solve the errors thrown in httpd error_log.

As expected, the ‘httpd‘ server failed to start and the error_log indicated that RT’s webmux.pl require the below modules:

Note: The httpd error_log will not provide all these module information at once, but it will hint which module is currently causing the issue. You’ll have to install one module at a time and try starting httpd service. If it fails, check error_log to find which module is the culprit (now!). Keep doing this step, until you find no error messages in error_log.

Below are the few modules I remembered to capture for writing this post. But you might have to install more….

Apache2/Response.pm
Can't locate Log::Dispatch
Params::Validate.pm
Can't locate Module::Implementation
Attribute::Handlers
Can't locate File::ShareDir
Can't locate Locale::Maketext::Lexicon
[error] Base class package "Locale::Maketext::Fuzzy" is empty.\n (Perhaps
you need to 'use' the module which defines that package first.)\n at /opt/rt3/bin/../lib/RT/I18N.pm line
62.\nBEGIN failed--compilation aborted at /opt/rt3/bin/../lib/RT/I18N.pm line 62.\nCompilation failed in
require at /opt/rt3/bin/../lib/RT.pm line 152.\nBEGIN failed--compilation aborted at
/opt/rt3/bin/webmux.pl line 102.\nCompilation failed in require at (eval 2) line 1.\n
Can't locate MIME::Entity
Can't locate DBIx::SearchBuilder
Can't locate Email::Address
Can't locate UNIVERSAL::require
Text::Template
Can't locate File::Slurp
HTML::Element
HTML::FormatText
Font::Metrics::Courier
Can't locate Text::Wrapper
Time::ParseDate
Test::EOL
HTML::Scrubber
Test/Memory/Cycle.pm
Test/CPAN/Meta.pm
Base class package "HTML::Mason::Request" is empty.\n
install_driver(mysql) failed: Can't locate DBD/mysql.pm

Install Perl modules via CPAN

For example, if the httpd error_log reports : Can’t locate Log/Dispatch.pm @ INC….then you have to install that module via CPAN as below

cpan> install Log::Dispatch

Replace the above command to install other modules.

During the perl module installation, I landed up with version compatibility issue for DBD::MySQL module. The httpd error_log had the below message:

install_driver(mysql) failed: DBD::mysql object version 4.013 does not match bootstrap parameter 4.031

We have to move ‘mysql‘ folder under ‘/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD‘ and ‘/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI‘.

Now install ‘DBD::MySQL‘ module again via CPAN

cpan> install DBD::MySQL

Finally, the httpd server started and the error_log was clean without any messages.  I tried accessing RT webpage via browser, to only see a dialog asking me to save a file ‘download‘. Ufff…what was that? I checked the httpd error_log and it didn’t have any message to help. All I did was to save the file ‘download’ from the browser and just opened it with a text editor. Fortunately, it had some message to help:

Can't located Apache/Session/MySQL.pm @ INC....

I installed ‘Apache/Session/MySQL.pm‘ via CPAN as below

cpan > install Apache::Session::MySQL

RT webpage loaded without Style/CSS

After installing all the necessary Perl modules, I restarted the httpd server and tried accessing the RT webpage. The page loaded, but without any Style as below:

RT webpage loads without style

To fix the issue, you have to install a Perl module called ‘CSS:Squish

cpan > install CSS:Squish

That’s it. I was able to load RT webpage successfully. Hope this information might help someone out there.

Request tracker login page error

You might also read : RT error : Mailgate undefined server error.

Was this article helpful?

Related Articles

Leave a Comment