6.0.0-beta1
7/7/25

[#12067] Huge memory footprint while unserializing from cache
Summary Huge memory footprint while unserializing from cache
Queue IMP
Queue Version Git master
Type Bug
State Not A Bug
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester jan (at) horde (dot) org
Created 02/25/2013 (4515 days ago)
Due
Updated 04/03/2013 (4478 days ago)
Assigned 02/25/2013 (4515 days ago)
Resolved 04/03/2013 (4478 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
04/03/2013 11:01:12 AM Jan Schneider Comment #5
State ⇒ Not A Bug
Reply to this comment
Correct
04/02/2013 10:18:34 PM Michael Slusarz Comment #4 Reply to this comment
I'm assuming that hasn't happened again/is not reproducible?
02/25/2013 06:41:29 PM Michael Slusarz Comment #3
State ⇒ Feedback
Reply to this comment
The 8th element of the array contains an 512,648,440 element array:

i:8;a:512648440:{ [...]

I have no idea how that could happen.  You need to look at either UID 
103738 or 103731 in INBOX.horde.cvs to figure out why that is happening.
02/25/2013 10:33:46 AM Jan Schneider Comment #2 Reply to this comment
Emptying cache or logging out doesn't help either.
02/25/2013 10:29:26 AM Jan Schneider Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Huge memory footprint while unserializing from cache
Queue ⇒ IMP
Assigned to Michael Slusarz
Milestone ⇒
Patch ⇒ No
State ⇒ Assigned
Reply to this comment
[Mon Feb 25 11:23:41 2013] [error] [client 192.168.60.117] PHP Fatal 
error:  Allowed memory size of 268435456 bytes exhausted (tried to 
allocate 4294967296 bytes) in 
/home/jan/horde-develop/framework/Mime/lib/Horde/Mime/Part.php on line 
2275, referer: http://neo.wg.de/headhorde/imp/dynamic.php?page=mailbox
[Mon Feb 25 11:23:41 2013] [error] [client 192.168.60.117] PHP Stack 
trace:, referer: http://neo.wg.de/headhorde/imp/dynamic.php?page=mailbox
[Mon Feb 25 11:23:41 2013] [error] [client 192.168.60.117] PHP   1. 
{main}() /home/jan/horde-develop/horde/services/ajax.php:0, referer: 
http://neo.wg.de/headhorde/imp/dynamic.php?page=mailbox
[Mon Feb 25 11:23:41 2013] [error] [client 192.168.60.117] PHP   2. 
Horde_Core_Ajax_Application->doAction() 
/home/jan/horde-develop/horde/services/ajax.php:56, referer: 
http://neo.wg.de/headhorde/imp/dynamic.php?page=mailbox
[Mon Feb 25 11:23:41 2013] [error] [client 192.168.60.117] PHP   3. 
call_user_func(array (0 => class IMP_Ajax_Application_Handler_Common { 
protected $_base = class IMP_Ajax_Application { public $mbox = class 
IMP_Mailbox { ... }; public $queue = class IMP_Ajax_Queue { ... }; 
public $data = NULL; public $tasks = NULL; protected $_action = 
'showMessage'; protected $_app = 'imp'; protected $_handlers = array 
(...); protected $_vars = class Horde_Variables { ... } }; protected 
$_external = array (); protected $_ignored = array (); protected 
$_readOnly = array () }, 1 => 'showMessage')) 
/home/jan/horde-develop/framework/Core/lib/Horde/Core/Ajax/Application.php:155, referer: 
http://neo.wg.de/headhorde/imp/dynamic.php?page=mailbox
[Mon Feb 25 11:23:41 2013] [error] [client 192.168.60.117] PHP   4. 
IMP_Ajax_Application_Handler_Common->showMessage() 
/home/jan/horde-develop/framework/Core/lib/Horde/Core/Ajax/Application.php:155, referer: 
http://neo.wg.de/headhorde/imp/dynamic.php?page=mailbox
[Mon Feb 25 11:23:41 2013] [error] [client 192.168.60.117] PHP   5. 
IMP_Ajax_Application->viewPortData($change = TRUE) 
/home/jan/horde-develop/imp/lib/Ajax/Application/Handler/Common.php:680, 
referer: http://neo.wg.de/headhorde/imp/dynamic.php?page=mailbox
[Mon Feb 25 11:23:41 2013] [error] [client 192.168.60.117] PHP   6. 
IMP_Ajax_Application_ListMessages->listMessages($args = array 
('change' => TRUE, 'mbox' => 'INBOX.horde.cvs', 'applyfilter' => NULL, 
'cache' => 
'{20}SU5CT1guaG9yZGUuY3Zz70496,96466,98087,98466,98725,98727:98728,98852,99533,100174,100395,101508,103521,103729:103739', 'cacheid' => 'V991562206|H10668|3|1|D022513', 'delhide' => NULL, 'initial' => NULL, 'qsearch' => NULL, 'qsearchfield' => NULL, 'qsearchfilter' => NULL, 'qsearchflag' => NULL, 'qsearchflagnot' => NULL, 'qsearchmbox' => NULL, 'rangeslice' => NULL, 'sortby' => NULL, 'sortdir' => NULL, 'slice_start' => 1, 'slice_end' => 154)) /home/jan/horde-develop/imp/lib/Ajax/Application.php:241, referer: 
http://neo.wg.de/headhorde/imp/dynamic.php?page=mailbox
[Mon Feb 25 11:23:41 2013] [error] [client 192.168.60.117] PHP   7. 
IMP_Ajax_Application_ListMessages->_getOverviewData($mbox = class 
IMP_Mailbox { protected $_cache = array ('n' => array (0 => '.', 2 => 
'INBOX.', 4 => 1), 'd' => 'horde.cvs', 'l' => TRUE, 'ro' => FALSE, 'a' 
=> 'lrswipkxtea', 'v' => '991562206'); protected $_changed = 0; 
protected $_import = NULL; protected $_mbox = 'INBOX.horde.cvs' }, 
$msglist = array (0 => 3, 1 => 9)) 
/home/jan/horde-develop/imp/lib/Ajax/Application/ListMessages.php:395, 
referer: http://neo.wg.de/headhorde/imp/dynamic.php?page=mailbox
[Mon Feb 25 11:23:41 2013] [error] [client 192.168.60.117] PHP   8. 
IMP_Mailbox_List->getMailboxArray($msgnum = array (0 => 3, 1 => 9), 
$options = array ('headers' => TRUE, 'type' => '1')) 
/home/jan/horde-develop/imp/lib/Ajax/Application/ListMessages.php:435, 
referer: http://neo.wg.de/headhorde/imp/dynamic.php?page=mailbox
[Mon Feb 25 11:23:41 2013] [error] [client 192.168.60.117] PHP   9. 
IMP_Imap->fetch('INBOX.horde.cvs', class Horde_Imap_Client_Fetch_Query 
{ protected $_data = array (9 => TRUE, 10 => TRUE, 12 => TRUE, 13 => 
TRUE, 8 => array ('imp' => array (...))) }, array ('ids' => class 
Horde_Imap_Client_Ids { public $duplicates = FALSE; protected $_ids = 
array (0 => 103738, 1 => 103731); protected $_sequence = FALSE; 
protected $_sorted = FALSE })) 
/home/jan/horde-develop/imp/lib/Mailbox/List.php:180, referer: 
http://neo.wg.de/headhorde/imp/dynamic.php?page=mailbox
[Mon Feb 25 11:23:41 2013] [error] [client 192.168.60.117] PHP  10. 
IMP_Imap->__call($method = 'fetch', $params = array (0 => 
'INBOX.horde.cvs', 1 => class Horde_Imap_Client_Fetch_Query { 
protected $_data = array (9 => TRUE, 10 => TRUE, 12 => TRUE, 13 => 
TRUE, 8 => array (...)) }, 2 => array ('ids' => class 
Horde_Imap_Client_Ids { public $duplicates = FALSE; protected $_ids = 
array (...); protected $_sequence = FALSE; protected $_sorted = FALSE 
}))) /home/jan/horde-develop/imp/lib/Mailbox/List.php:180, referer: 
http://neo.wg.de/headhorde/imp/dynamic.php?page=mailbox
[Mon Feb 25 11:23:41 2013] [error] [client 192.168.60.117] PHP  11. 
call_user_func_array(array (0 => class Horde_Imap_Client_Socket { 
protected $_fetch = class Horde_Imap_Client_Fetch_Results { protected 
$_data = array (...); protected $_keyType = 1; protected $_obClass = 
'Horde_Imap_Client_Data_Fetch' }; protected $_statusFields = array 
('messages' => 1, 'recent' => 2, 'uidnext' => 4, 'uidvalidity' => 8, 
'unseen' => 16, 'firstunseen' => 64, 'flags' => 128, 'permflags' => 
256, 'uidnotsticky' => 4096, 'highestmodseq' => 512); protected 
$_stream = resource(19) of type (stream); protected $_tag = 10; public 
$cacheFields = array (9 => 'HICenv', 10 => 'HICflags', 8 => 'HIChdrs', 
11 => 'HICdate', 12 => 'HICsize', 1 => 'HICstruct'); public $changed = 
TRUE; protected $_cache = class Horde_Imap_Client_Cache { protected 
$_base = ...; protected $_cache = class Horde_Cache { ... }; protected 
$_data = array (...); protected $_debug = class 
Horde_Imap_Client_Base_Debug { ... }; protected $_loaded = array 
(...); protected $_params = array (...); protected $_slicemap = array 
(...); protected $_update = array (...) }; protected $_debug = class 
Horde_Imap_Client_Base_Debug { public $debug = TRUE; protected 
$_buffer = NULL; protected $_stream = resource(18) of type (stream); 
protected $_time = 1361787821.8279 }; protected $_fetchDataClass = 
'Horde_Imap_Client_Data_Fetch'; protected $_init = array ('enabled' => 
array (...), 'namespace' => array (...), 's_charset' => array (...), 
'imapproxy' => TRUE, 'authmethod' => 'LOGIN', 'capability' => array 
(...)); protected $_isAuthenticated = TRUE; protected $_isSecure = 
FALSE; protected $_mode = 2; protected $_params = array ('encryptKey' 
=> array (...), 'hostspec' => 'localhost', 'secure' => FALSE, 
'timeout' => 30, 'envelope_addrs' => 1000, 'envelope_string' => 2048, 
'capability_ignore' => array (...), 'debug' => '/tmp/imap.log', 
'password' => 'A\\027gr\xdf\xb6\xe0\x8a\xfa\\f\xf9\xdfd\x84\x8c\xd7', 
'port' => 1143, 'username' => 'jan', 'cache' => array (...), 
'_passencrypt' => TRUE); protected $_selected = class 
Horde_Imap_Client_Mailbox { protected $_utf7imap = TRUE; protected 
$_utf8 = 'INBOX.horde.cvs' }; protected $_temp = array ('loginerr' => 
class Horde_Imap_Client_Exception { ... }, 'referral' => NULL, 
'lastcmd' => class Horde_Imap_Client_Interaction_Client { ... }, 
'modseqs' => array (...), 'modseqs_nouid' => array (...), 'proxyreuse' 
=> TRUE, 'mailbox_ob' => array (...), 'fetchcmd' => array (...), 
'headers_caching' => array (...)) }, 1 => 'fetch'), array (0 => class 
Horde_Imap_Client_Mailbox { protected $_utf7imap = NULL; protected 
$_utf8 = 'INBOX.horde.cvs' }, 1 => class Horde_Imap_Client_Fetch_Query 
{ protected $_data = array (9 => TRUE, 10 => TRUE, 12 => TRUE, 13 => 
TRUE, 8 => array (...)) }, 2 => array ('ids' => class 
Horde_Imap_Client_Ids { public $duplicates = FALSE; protected $_ids = 
array (...); protected $_sequence = FALSE; protected $_sorted = FALSE 
}))) /home/jan/horde-develop/imp/lib/Imap.php:388, referer: 
http://neo.wg.de/headhorde/imp/dynamic.php?page=mailbox
[Mon Feb 25 11:23:41 2013] [error] [client 192.168.60.117] PHP  12. 
Horde_Imap_Client_Base->fetch($mailbox = class 
Horde_Imap_Client_Mailbox { protected $_utf7imap = NULL; protected 
$_utf8 = 'INBOX.horde.cvs' }, $query = class 
Horde_Imap_Client_Fetch_Query { protected $_data = array (9 => TRUE, 
10 => TRUE, 12 => TRUE, 13 => TRUE, 8 => array ('imp' => array (...))) 
}, $options = array ('ids' => class Horde_Imap_Client_Ids { public 
$duplicates = FALSE; protected $_ids = array (0 => 103738, 1 => 
103731); protected $_sequence = FALSE; protected $_sorted = FALSE })) 
/home/jan/horde-develop/imp/lib/Imap.php:388, referer: 
http://neo.wg.de/headhorde/imp/dynamic.php?page=mailbox
[Mon Feb 25 11:23:41 2013] [error] [client 192.168.60.117] PHP  13. 
Horde_Imap_Client_Cache->get($mailbox = class 
Horde_Imap_Client_Mailbox { protected $_utf7imap = TRUE; protected 
$_utf8 = 'INBOX.horde.cvs' }, $uids = array (0 => 103738, 1 => 
103731), $fields = array (0 => 'HICenv', 1 => 'HICflags', 2 => 
'HIChdrs', 3 => 'HICsize'), $uidvalid = '991562206') 
/home/jan/horde-develop/framework/Imap_Client/lib/Horde/Imap/Client/Base.php:2549, referer: 
http://neo.wg.de/headhorde/imp/dynamic.php?page=mailbox
[Mon Feb 25 11:23:41 2013] [error] [client 192.168.60.117] PHP  14. 
unserialize('a:5:{s:6:"HICenv";C:31:"Horde_Imap_Client_Data_Envelope":750:{a:2:{s:1:"d";C:18:"Horde_Mime_Headers":692:{a:3:{i:0;i:2;i:1;a:7:{s:4:"date";a:2:{s:1:"h";s:4:"date";s:1:"v";s:29:"Mon, 25 Feb 2013 00:33:33 GMT";}s:7:"subject";a:2:{s:1:"h";s:7:"subject";s:1:"v";s:80:"[commits] Horde branch imp_6_1 updated.\\td6b64567a2a42f722b042bd63024919f8f7c95ec";}s:4:"from";a:2:{s:1:"h";s:4:"from";s:1:"v";s:37:"Michael M Slusarz <slusarz@horde.org>";}s:6:"sender";a:2:{s:1:"h";s:6:"sender";s:1:"v";s:31:"commits-bounces@lists....') /home/jan/horde-develop/framework/Imap_Client/lib/Horde/Imap/Client/Cache.php:267, referer: 
http://neo.wg.de/headhorde/imp/dynamic.php?page=mailbox
[Mon Feb 25 11:23:41 2013] [error] [client 192.168.60.117] PHP  15. 
Horde_Mime_Part->unserialize($data = 
'a:20:{i:0;i:1;i:1;s:4:"text";i:2;s:5:"plain";i:3;s:4:"7bit";i:4;a:0:{}i:5;s:0:"";i:6;s:0:"";i:7;a:1:{s:4:"size";s:4:"1231";}i:8;a:512648440:{s:7:"charset";s:8:"us-ascii";}i:9;a:0:{}i:10;s:1:"1";i:11;s:1:"\\n";i:12;a:0:{}i:13;N;i:14;i:1231;i:15;N;i:16;N;i:17;b:0;i:18;b:0;i:19;N;}') /home/jan/horde-develop/framework/Imap_Client/lib/Horde/Imap/Client/Cache.php:267, referer: 
http://neo.wg.de/headhorde/imp/dynamic.php?page=mailbox
[Mon Feb 25 11:23:41 2013] [error] [client 192.168.60.117] PHP  16. 
unserialize('a:20:{i:0;i:1;i:1;s:4:"text";i:2;s:5:"plain";i:3;s:4:"7bit";i:4;a:0:{}i:5;s:0:"";i:6;s:0:"";i:7;a:1:{s:4:"size";s:4:"1231";}i:8;a:512648440:{s:7:"charset";s:8:"us-ascii";}i:9;a:0:{}i:10;s:1:"1";i:11;s:1:"\\n";i:12;a:0:{}i:13;N;i:14;i:1231;i:15;N;i:16;N;i:17;b:0;i:18;b:0;i:19;N;}') /home/jan/horde-develop/framework/Mime/lib/Horde/Mime/Part.php:2275, referer: 
http://neo.wg.de/headhorde/imp/dynamic.php?page=mailbox

Saved Queries