Opened 5 months ago

Last modified 5 months ago

#342 new defect

accessing to restoring from xcache variable crash php-fpm

Reported by: ntman Owned by: moo
Priority: major Milestone: undecided
Component: cacher Version: 3.1.0
Keywords: Cc:
Application: PHP Version: 5.5.12
Other Exts: SAPI: FastCGI
Probability: Always Blocked By:
Blocking:

Description

Code for reproduce problem:

<?php
	if(xcache_isset('boroda')) $a = xcache_get('boroda'); else $a = array();
	print_r($a);
	$db = new PDO('mysql:dbname=BPLnew;unix_socket=/var/lib/mysql/mysql.sock','root','');
	$a[] = $db->query("SELECT 1");
	xcache_set('boroda', $a, 3000);
?>
  • First request put in cache array with PDOStatement
  • Second request when attempting to display the restored from cache variable crash PHP with SEGV

Attachments (1)

bug-php.php (249 bytes) - added by ntman 5 months ago.

Download all attachments as: .zip

Change History (3)

Changed 5 months ago by ntman

comment:1 follow-up: Changed 5 months ago by moo

  • Resolution set to invalid
  • Status changed from new to closed

This is a known problem that object cannot be cached in xcache directly, use serialize/unserialize instead

comment:2 in reply to: ↑ 1 Changed 5 months ago by ntman

  • Resolution invalid deleted
  • Status changed from closed to new

Replying to moo:

This is a known problem that object cannot be cached in xcache directly, use serialize/unserialize instead

This is not feature request for adding the ability to storing a objects. This is request to add checks that would throw Fatal Error that can catch through Try Catch. Because that is so difficult to understand because of what crash server when in xcache stored complex multi-dimensional arrays. I investigated for over a week on steps that happens in the big CRM system to make this simple example.

Please don't close this bug, please add checks.

Note: See TracTickets for help on using tickets.