Skip Menu |
 

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

Report information
The Basics
Id: 74454
Status: rejected
Priority: 0/
Queue: CGI-Session

People
Owner: Nobody in particular
Requestors: blair [...] copelands.info
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 4.48
Fixed in: (no value)



Download (untitled) / with headers
text/plain 1.8k
Running perl 5.12.4 and CGI:Session 4.48 In short, when perl exits with $session closed, it flushes an OLD state of $session, prior to any forks and/or forks modifying $session STATE. If perl dies intentionally (die;), erroneous flush is prevented. Full Explaination: This is all done through a web page. I open a session and insert a value and close the session. I dump variables by opening, reading and then closing the $session. I reopen the session and insert another value and close the session. I fork a sub proces. I am modifying the $session in a fork. In the main process, I have closed the $session. In the one and only (hope to fork many later) child process I open and modify the $session and close the session. After the fork closes, I return to the parent process and reopen the $session and I see all my values. I close the $session and then allow the program to exit. When the web page reloads I reopen the $session, the first value set is present, the second valud set is present, but the child process values are no longer there. If I die the process instead of letting it exit, my values are all present on reload, but if I allow the code to exit with the session closed, it APPEARS that the program is flusing a PREVIOUS $session state. FYI, before I JUST upgraded the CGI:Session from an older version, stored HASHes were not present either, but that test just worked. If my $session is closed, I do not think the auto-flush should happen. I want to be able to disable auto-flush to prevent it writing what it thinks is correct, but is entirely destructive. I do not have a test code snippet, but if you really want it I can pair the application down. it is over 10,000 lines but I am sure with some work I can make it a frame to exhibit the problem if need-be. I think the problem should be pretty clear though.
Subject: [rt.cpan.org #74454]
From: blair [...] copelands.info
There seems to have been a rouge clear([variable]). It seems to be working correctly, sorry for the report. bc On Fri Jan 27 14:20:27 2012, blair_copeland wrote: Show quoted text
> Running perl 5.12.4 and CGI:Session 4.48 > > In short, when perl exits with $session closed, it flushes an OLD state > of $session, prior to any forks and/or forks modifying $session STATE. > If perl dies intentionally (die;), erroneous flush is prevented. > > Full Explaination: > This is all done through a web page. I open a session and insert a > value and close the session. I dump variables by opening, reading and > then closing the $session. I reopen the session and insert another > value and close the session. I fork a sub proces. > > I am modifying the $session in a fork. In the main process, I have > closed the $session. In the one and only (hope to fork many later) > child process I open and modify the $session and close the session. > After the fork closes, I return to the parent process and reopen the > $session and I see all my values. I close the $session and then allow > the program to exit. > > When the web page reloads I reopen the $session, the first value set is > present, the second valud set is present, but the child process values > are no longer there. > > If I die the process instead of letting it exit, my values are all > present on reload, but if I allow the code to exit with the session > closed, it APPEARS that the program is flusing a PREVIOUS $session > state. > > FYI, before I JUST upgraded the CGI:Session from an older version, > stored HASHes were not present either, but that test just worked. > > If my $session is closed, I do not think the auto-flush should happen. > > I want to be able to disable auto-flush to prevent it writing what it > thinks is correct, but is entirely destructive. > > I do not have a test code snippet, but if you really want it I can pair > the application down. it is over 10,000 lines but I am sure with some > work I can make it a frame to exhibit the problem if need-be. I think > the problem should be pretty clear though.


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.