Skip Menu |
 

This queue is for tickets about the CGI-Session CPAN distribution.

Report information
The Basics
Id: 4861
Status: resolved
Priority: 0/
Queue: CGI-Session

People
Owner: MARKSTOS [...] cpan.org
Requestors: cpan [...] philsplace.org
Cc:
AdminCc:

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



Subject: segfault when using file and storable serializer
Download (untitled) / with headers
text/plain 983b
When using the following code, the program segfaults during object destruction. --- #! /usr/bin/perl use strict; use CGI::Session::File; my $session = new CGI::Session("driver:File;serializer:Storable", undef, {Directory => '/tmp/'}); sub skip_this{ $session->debug(); } print "done\n"; --- I found that if I used the default or FreezeThaw serializer it would not setfault. This initially led me to believe it might be the serializer, however, if I use a mysql store and the Storable serializer it does not segfault. So, I'm not sure if it is the serializer or the storage mechanism, or something else. That is why I'm posting this under CGI::Session instead of CGI::Session::File... I tried to reduce the problem further, but I've not been able to cause the Storable module (used in CGI::Session::File for freeze/thawing) itself to segfault and the fact that it works for the mysql driver also leads me to think it is somewhere in the session code. Thanks, --Phillip
Download (untitled) / with headers
text/plain 1.1k
[guest - Wed Jan 7 16:27:04 2004]: Show quoted text
> When using the following code, the program segfaults during object > destruction. > > --- > > #! /usr/bin/perl > > use strict; > use CGI::Session::File; > > my $session = new CGI::Session("driver:File;serializer:Storable", > undef, {Directory => '/tmp/'}); > > sub skip_this{ > $session->debug(); > } > > print "done\n"; > > --- > > I found that if I used the default or FreezeThaw serializer it would > not setfault. This initially led me to believe it might be the > serializer, however, if I use a mysql store and the Storable > serializer it does not segfault. > > So, I'm not sure if it is the serializer or the storage mechanism, or > something else. That is why I'm posting this under CGI::Session > instead of CGI::Session::File... > > I tried to reduce the problem further, but I've not been able to cause > the Storable module (used in CGI::Session::File for freeze/thawing) > itself to segfault and the fact that it works for the mysql driver > also leads me to think it is somewhere in the session code. > > Thanks, > > --Phillip
More info... this is perl version 5.8.0 running on Debian Linux 2.4.20 SMP
From: markstos [...] cpan.org
Download (untitled) / with headers
text/plain 1.4k
[guest - Wed Jan 7 16:27:04 2004]: Show quoted text
> When using the following code, the program segfaults during object > destruction. > > --- > > #! /usr/bin/perl > > use strict; > use CGI::Session::File; > > my $session = new CGI::Session("driver:File;serializer:Storable", > undef, {Directory => '/tmp/'}); > > sub skip_this{ > $session->debug(); > } > > print "done\n"; > > --- > > I found that if I used the default or FreezeThaw serializer it would > not setfault. This initially led me to believe it might be the > serializer, however, if I use a mysql store and the Storable > serializer it does not segfault. > > So, I'm not sure if it is the serializer or the storage mechanism, or > something else. That is why I'm posting this under CGI::Session > instead of CGI::Session::File... > > I tried to reduce the problem further, but I've not been able to
cause Show quoted text
> the Storable module (used in CGI::Session::File for
freeze/thawing) Show quoted text
> itself to segfault and the fact that it works for the mysql driver > also leads me to think it is somewhere in the session code. > > Thanks, > > --Phillip
I reproduced this on FreeBSD 4.10. But I don't think this is a bug with CGI::Session, because you are calling the debug() method, which has never existed! (Maybe you meant dump()? ). Changing debug() to dump() makes the code work. Also, I think you meant 'use CGI::Session', not 'use CGI::Session::File'; I think this bug report is safe to close.
Download (untitled) / with headers
text/plain 1.8k
[MARKSTOS - Mon Jul 4 15:08:20 2005]: Show quoted text
> [guest - Wed Jan 7 16:27:04 2004]: >
> > When using the following code, the program segfaults during object > > destruction. > > > > --- > > > > #! /usr/bin/perl > > > > use strict; > > use CGI::Session::File; > > > > my $session = new CGI::Session("driver:File;serializer:Storable", > > undef, {Directory => '/tmp/'}); > > > > sub skip_this{ > > $session->debug(); > > } > > > > print "done\n"; > > > > --- > > > > I found that if I used the default or FreezeThaw serializer it would > > not setfault. This initially led me to believe it might be the > > serializer, however, if I use a mysql store and the Storable > > serializer it does not segfault. > > > > So, I'm not sure if it is the serializer or the storage mechanism,
> or
> > something else. That is why I'm posting this under CGI::Session > > instead of CGI::Session::File... > > > > I tried to reduce the problem further, but I've not been able to
> cause
> > the Storable module (used in CGI::Session::File for
> freeze/thawing)
> > itself to segfault and the fact that it works for the mysql
> driver
> > also leads me to think it is somewhere in the session code. > > > > Thanks, > > > > --Phillip
> > I reproduced this on FreeBSD 4.10. > > But I don't think this is a bug with CGI::Session, because you are > calling the debug() method, which has never existed! (Maybe you meant > dump()? ). Changing debug() to dump() makes the code work.
Yep, I'm stupid. That fixes it. (tho I've long moved past this...) Show quoted text
> > Also, I think you meant 'use CGI::Session', not 'use > CGI::Session::File';
Hm... Just rechecked the docs... that does appear to be what the docs give as an example. That shouldn't cause a problem tho, should it? Especially since CGI::Session::File uses CGI::Session as a base class... Show quoted text
> > I think this bug report is safe to close.
Yes, I agree.


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.