I'm using Catalyst::Plugin::Session along with Catalyst::Plugin::Session::Store::DBIC and CatalystX::SimpleLogin. I've used these multiple times before, but I'm getting some strange behavior currently. What I'm seeing is that once I login the session is created, then deleted, and then there is an attempt to update the session row that doesn't exist and this causes a crash. Here are the queries that are being run:
INSERT INTO sessions ( id) VALUES ( ? ): 'session:ff4732c1779d955a73d31b967db50ba59d3c0573'
DELETE FROM sessions WHERE ( id = ? ): 'session:ff4732c1779d955a73d31b967db50ba59d3c0573'
DELETE FROM sessions WHERE ( id = ? ): 'flash:ff4732c1779d955a73d31b967db50ba59d3c0573'
UPDATE sessions SET expires = ?, session_data = ? WHERE ( id = ? ): '1467954773', 'BQoDAAAABQp5TW96aWxsYS81LjAgKE1hY2ludG9zaDsgSW50ZWwgTWFjIE9TIFggMTBfMTFfNCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzUxLjAuMjcwNC4xMDMgU2FmYXJpLzUzNy4zNgAAAAxfX3VzZXJfYWdlbnQJV33k1QAAAAlfX2NyZWF0ZWQJV33k1QAAAAlfX3VwZGF0ZWQKBXVzZXJzAAAADF9fdXNlcl9yZWFsbQQDAAAAAQiBAAAAAmlkAAAABl9fdXNlcg==', 'session:ff4732c1779d955a73d31b967db50ba59d3c0573'
Here is the debug output I'm seeing:
[debug] Created session "ff4732c1779d955a73d31b967db50ba59d3c0573"
[debug] Created session "aec058e68a823f5711d64b18ad8c53611b1b832f"
[debug] change_sessid: deleting session data from "ff4732c1779d955a73d31b967db50ba59d3c0573"
[debug] change_sessid: storing session data to "aec058e68a823f5711d64b18ad8c53611b1b832f"
And here is the crash:
I checked and the function that is calling delete_session_data
is Catalyst::Plugin::Session::change_session_id
.
Also, this works when I use Catalyst::Plugin::Session::Store::File instead of Catalyst::Plugin::Session::Store::DBIC.
Does anyone know what could be going wrong?
UPDATE:
I checked on one of my other servers that works, and it looks like for some reason the delete queries aren't there:
INSERT INTO sessions ( id) VALUES ( ? ): 'session:08844c28572b99acd3603d50c2c3975d13c3a4b8'
UPDATE sessions SET expires = ?, session_data = ? WHERE ( id = ? ): '1467956394', 'BQcDAAAABgp5TW96aWxsYS81LjAgKE1hY2ludG9zaDsgSW50ZWwgTWFjIE9TIFggMTBfMTFfNCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzUxLjAuMjcwNC4xMDMgU2FmYXJpLzUzNy4zNgAAAAxfX3VzZXJfYWdlbnQKBXVzZXJzAAAADF9fdXNlcl9yZWFsbQoONTAuMTc0LjI0Mi4yNTMAAAAJX19hZGRyZXNzBAMAAAABCgExAAAAAmlkAAAABl9fdXNlcgoKMTQ2Nzg2OTk5NAAAAAlfX2NyZWF0ZWQKCjE0Njc4Njk5OTQAAAAJX191cGRhdGVk', 'session:08844c28572b99acd3603d50c2c3975d13c3a4b8'
Further update:
I'm using perl 5.24. I thought that might be relevant. I'm going to try downloading an older perl version and seeing if that works.