Skip Menu |
 

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 52538
Status: rejected
Priority: 0/
Queue: Moose

People
Owner: Nobody in particular
Requestors: harv [...] ruin.nu
Cc:
AdminCc:

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



Subject: Memory leak (cycle) Moose::Meta::Method::Accessor and Moose::Meta::Method::Constructor through $meta from environment
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain
Charset: utf8
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1776
Download (untitled) / with headers
text/plain 1.7k
Both have '$meta' set to \$self in their environments for _compile_code, which then seems to add this variable to the closure of generated code, resulting in a cycle. This is done in: Moose::Meta::Method::Constructor::__initialize_body() Moose::Meta::Method::Accessor::_eval_code() Not sure how to weaken those references though. Cycle (1): $Class::MOP::Class::Immutable::Moose::Meta::Class::A-> {'__immutable'} => \%B $B->{'inlined_methods'} => \@C $C->[0] => \ %Moose::Meta::Method::Constructor::D $Moose::Meta::Method::Constructor::D->{'body'} => \&E $E variable $meta => \$F $$F => \ %Moose::Meta::Method::Constructor::D ----------------------------------------------------------- Cycle (1): $Class::MOP::Class::Immutable::Moose::Meta::Class::A-> {'__immutable'} => \%B $B->{'inlined_methods'} => \@C $C->[0] => \ %Moose::Meta::Method::Constructor::D $Moose::Meta::Method::Constructor::D->{'attributes'} => \@E $E->[0] => \%Moose::Meta::Attribute::F $Moose::Meta::Attribute::F->{'associated_methods'} => \@G $G->[0] => \ %Moose::Meta::Method::Accessor::H $Moose::Meta::Method::Accessor::H->{'body'} => \&I $I variable $meta => \$J $$J => \ %Moose::Meta::Method::Accessor::H
MIME-Version: 1.0 (Apple Message framework v936)
X-Spam-Status: No, hits=0.0 required=8.0 tests=
In-Reply-To: <rt-3.6.HEAD-9877-1260216086-1282.52538-4-0 [...] rt.cpan.org>
X-Mailer: Apple Mail (2.936)
References: <RT-Ticket-52538 [...] rt.cpan.org> <rt-3.6.HEAD-9877-1260216086-1282.52538-4-0 [...] rt.cpan.org>
Message-ID: <5DB9A83A-D02A-4712-B9AF-B062C350CC69 [...] iinteractive.com>
Content-Type: text/plain; charset="utf-8"; delsp="yes"; format="flowed"
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id B983B4D801E for <bug-Moose [...] rt.cpan.org>; Mon, 7 Dec 2009 15:05:39 -0500 (EST)
Received: (qmail 12547 invoked by uid 103); 7 Dec 2009 20:05:24 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 7 Dec 2009 20:05:24 -0000
Received: from qw-out-2122.google.com (HELO qw-out-2122.google.com) (74.125.92.27) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Mon, 07 Dec 2009 12:05:22 -0800
Received: by qw-out-2122.google.com with SMTP id 9so817215qwb.27 for <bug-Moose [...] rt.cpan.org>; Mon, 07 Dec 2009 12:05:19 -0800 (PST)
Received: by 10.224.118.81 with SMTP id u17mr3898713qaq.301.1260216318777; Mon, 07 Dec 2009 12:05:18 -0800 (PST)
Received: from ?10.0.1.3? (c-71-234-68-135.hsd1.ct.comcast.net [71.234.68.135]) by mx.google.com with ESMTPS id 7sm15159726qwb.32.2009.12.07.12.05.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 07 Dec 2009 12:05:17 -0800 (PST)
Delivered-To: cpan-bug+Moose [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #52538] Memory leak (cycle) Moose::Meta::Method::Accessor and Moose::Meta::Method::Constructor through $meta from environment
Return-Path: <stevan.little [...] iinteractive.com>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-Moose [...] rt.cpan.org
Date: Mon, 7 Dec 2009 15:05:15 -0500
X-Spam-Level: *
To: bug-Moose [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Stevan Little <stevan.little [...] iinteractive.com>
RT-Message-ID: <rt-3.6.HEAD-9877-1260216442-1922.52538-0-0 [...] rt.cpan.org>
Content-Length: 2363
Download (untitled) / with headers
text/plain 2.3k
Michael, As mentioned in the other bug reports, a cycle does not mean a leak. Can you perhaps explain what it is your doing and why this is presenting an issue for you? Are you on IRC? It would be ideal to take the conversation into real- time. Please join us in #moose-dev on irc.perl.org. - Stevan On Dec 7, 2009, at 3:01 PM, Michael Andreen via RT wrote: Show quoted text
> Mon Dec 07 15:01:25 2009: Request 52538 was acted upon. > Transaction: Ticket created by harv > Queue: Moose > Subject: Memory leak (cycle) Moose::Meta::Method::Accessor and > Moose::Meta::Method::Constructor through $meta from environment > Broken in: 0.93 > Severity: Normal > Owner: Nobody > Requestors: harv@ruin.nu > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=52538 > > > > Both have '$meta' set to \$self in their environments for > _compile_code, which then seems to add this variable to the closure of > generated code, resulting in a cycle. This is done in: > > Moose::Meta::Method::Constructor::__initialize_body() > Moose::Meta::Method::Accessor::_eval_code() > > Not sure how to weaken those references though. > > Cycle (1): > $Class::MOP::Class::Immutable::Moose::Meta::Class::A-> > {'__immutable'} => \%B > $B->{'inlined_methods'} => \@C > $C->[0] => \ > %Moose::Meta::Method::Constructor::D > $Moose::Meta::Method::Constructor::D->{'body'} => > \&E > $E variable $meta => \$F > $$F => \ > %Moose::Meta::Method::Constructor::D > > ----------------------------------------------------------- > > Cycle (1): > $Class::MOP::Class::Immutable::Moose::Meta::Class::A-> > {'__immutable'} => \%B > $B->{'inlined_methods'} => \@C > $C->[0] => \ > %Moose::Meta::Method::Constructor::D > $Moose::Meta::Method::Constructor::D->{'attributes'} => > \@E > $E->[0] => \%Moose::Meta::Attribute::F > $Moose::Meta::Attribute::F->{'associated_methods'} => > \@G > $G->[0] => \ > %Moose::Meta::Method::Accessor::H > $Moose::Meta::Method::Accessor::H->{'body'} => > \&I > $I variable $meta => \$J > $$J => \ > %Moose::Meta::Method::Accessor::H >
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-14812-1265329175-468.52538-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 45
RT isn't the right place for this discussion.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.