perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From demerphq <demer...@gmail.com>
Subject Re: apache2 + mod_perl + Catalyst + Session = Segmentation fault
Date Tue, 13 Nov 2012 14:48:22 GMT
On 13 November 2012 15:23, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
> On Sat, Sep 29, 2012 at 1:08 PM, Stefan Profanter
> <catalyst@s.profanter.me> wrote:
>>> >
>>> > Looks like you are using Storable to stream out cookies?  Looks like
>>> > something in there is causing Storable to puke.  I see things like
>>> > array_call, store_blessed, store_hash... So I'm guessing your passing
>>> > Storable some kind of object?  Does it have any recursive parts?
>>> >
>>> > I googled "perl storable seg fault" and it looks like people have
>>> > gotten Storable to seg fault before.  I'm not sure if the stack trace
>>> > is reading objects or writing them.  Maybe you can glean from other's
>>> > what makes Storable segfault.
>>> >
>>> > First figure out if its reading or writing that causes the problem,
>>> > then try to figure out what part of the object is so upsetting.
>>> >
>>> >> 3873            return newSVpv(mbase, MBUF_SIZE());
>>> >
>>> >
>>> > Hum... any chance that is really really big?
>>
>> Yes, you were right.
>> I stored a DBIX::ResultSet->single Object in session and it seems this
>> caused the SegFault. Now I stored only the ID instead of whole object and it
>> works.
>>
>>>
>>> Maybe look at Sereal as an alternative to Storable.
>>>
>>> https://github.com/Sereal/Sereal/
>>> http://search.cpan.org/~smueller/Sereal-Decoder/lib/Sereal/Decoder.pm
>>> http://search.cpan.org/~smueller/Sereal-Encoder/lib/Sereal/Encoder.pm
>>>
>>
>> This seems interesting! Do you know by chance how Catalyst::Plugin::Session
>> can be set to use Seareal instead of Storable?
>
> I don't have experience with that Catalyst plugin but for e.g.
> Apache::Session we've been using Data::FlexSerializer to migrate away
> from Sereal.

He meant "from Storable (to Sereal)"

Yves

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

Mime
View raw message