You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ævar Arnfjörð Bjarmason <av...@gmail.com> on 2012/11/13 15:23:56 UTC
Re: apache2 + mod_perl + Catalyst + Session = Segmentation fault
On Sat, Sep 29, 2012 at 1:08 PM, Stefan Profanter
<ca...@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.
Re: apache2 + mod_perl + Catalyst + Session = Segmentation fault
Posted by Ævar Arnfjörð Bjarmason <av...@gmail.com>.
On Tue, Nov 13, 2012 at 3:48 PM, demerphq <de...@gmail.com> wrote:
> On 13 November 2012 15:23, Ævar Arnfjörð Bjarmason <av...@gmail.com> wrote:
>> On Sat, Sep 29, 2012 at 1:08 PM, Stefan Profanter
>> <ca...@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)"
Yes, sorry about that brainfart :)
Re: apache2 + mod_perl + Catalyst + Session = Segmentation fault
Posted by demerphq <de...@gmail.com>.
On 13 November 2012 15:23, Ævar Arnfjörð Bjarmason <av...@gmail.com> wrote:
> On Sat, Sep 29, 2012 at 1:08 PM, Stefan Profanter
> <ca...@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/"