[rt-users] Memory leak when merging tickets, RT 4.2.2

Jonah Hirsch Jonah.Hirsch at nau.edu
Tue Jan 28 16:12:58 EST 2014


I got the upgrades to run successfully, but I still get the memory issue when merging tickets.

I noticed that System_Vendor.pm wasn't a stock RT file either, but I'm not sure where it came from. Here's its contents:

package RT::System;

use strict;
no warnings qw(redefine);

sub AvailableRights {
    my $self = shift;

    my $queue = RT::Queue->new(RT->SystemUser);
    my $group = RT::Group->new(RT->SystemUser);
    my $cf    = RT::CustomField->new(RT->SystemUser);
    my $class = RT::Class->new(RT->SystemUser);
#    my $type =  RTx::AssetTracker::Type->new(RT->SystemUser);

    my $qr = $queue->AvailableRights();
    my $gr = $group->AvailableRights();
    my $cr = $cf->AvailableRights();
    my $clr = $class->AvailableRights();
    #my $tr = $type->AvailableRights();

    # Build a merged list of all system wide rights, queue rights and group rights.
    my %rights = (%{$RT::System::RIGHTS}, %{$gr}, %{$qr}, %{$cr}, %{$clr});#, %$tr);
    delete $rights{ExecuteCode} if RT->Config->Get('DisallowExecuteCode');

    return(\%rights);
}

sub RightCategories {
    my $self = shift;

    my $queue = RT::Queue->new(RT->SystemUser);
    my $group = RT::Group->new(RT->SystemUser);
    my $cf    = RT::CustomField->new(RT->SystemUser);
    my $class = RT::Class->new(RT->SystemUser);
#    my $type =  RTx::AssetTracker::Type->new(RT->SystemUser);

    my $qr = $queue->RightCategories();
    my $gr = $group->RightCategories();
    my $cr = $cf->RightCategories();
    my $clr = $class->RightCategories();
   # my $tr = $type->RightCategories();

    # Build a merged list of all system wide rights, queue rights and group rights.
    my %rights = (%{$RT::System::RIGHT_CATEGORIES}, %{$gr}, %{$qr}, %{$cr}, %{$clr});#, %$tr);

    return(\%rights);
}

1;

-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Alex Vandiver
Sent: Tuesday, January 28, 2014 12:41 PM
To: rt-users at lists.bestpractical.com
Subject: Re: [rt-users] Memory leak when merging tickets, RT 4.2.2

On Tue, 2014-01-28 at 19:18 +0000, Jonah Hirsch wrote:
> I just remembered that when upgrading I had some database upgrade 
> errors.  I checked the upgrade history in RT and saw that it failed 
> upgrading the DB schema from 4.1.12 on. When I try to run
> 
> /opt/rt4/sbin/rt-setup-database --action insert --datafile content
> 
>  From the /rt-4.2.2/etc/upgrade/4.1.12 directory I get the following including an error:

The right way to try to resume the upgrade is

    /opt/rt4/sbin/rt-setup-database --action upgrade

...and enter 4.1.12 as the starting version.

> Now inserting data.
> [52450] [Tue Jan 28 19:16:07 2014] [debug]: Going to load 'content' 
> data file (/opt/rt4/sbin/../lib/RT/Handle.pm:814)
> [52450] [Tue Jan 28 19:16:07 2014] [debug]: Creating ACL... 
> (/opt/rt4/sbin/../lib/RT/Handle.pm:1017)
> [52450] [Tue Jan 28 19:16:07 2014] [critical]: Can't use an undefined 
> value as a HASH reference at /opt/rt4/sbin/../lib/RT/System_Vendor.pm line 22, <$handle> line 1. (/opt/rt4/sbin/../lib/RT.pm:393) Can't use an undefined value as a HASH reference at /opt/rt4/sbin/../lib/RT/System_Vendor.pm line 22, <$handle> line 1.

RT doesn't ship a System_Vendor.pm, so color me extremely suspicious.
 - Alex



More information about the rt-users mailing list