6.0.0-git
2020-04-02

[#14490] serialization failed
Summary serialization failed
Queue IMP
Queue Version 6.2.16
Type Bug
State No Feedback
Priority 1. Low
Owners
Requester marth (at) tsvschlieben (dot) de
Created 2016-10-18 (1262 days ago)
Due
Updated 2018-11-17 (502 days ago)
Assigned 2016-10-21 (1259 days ago)
Resolved 2016-11-05 (1244 days ago)
Milestone
Patch No

History
2018-11-17 21:36:34 ngabor (at) brc (dot) hu Comment #16 Reply to this comment
I'm tested the php7.3, but nothing has changed:
This is a totally different error which you need to fix first.
ok! Its working fine the php7.2 
(7.2.12-1+0~20181112102304.11+stretch~1.gbp55f215)
But, the php5.6, php7.0, php7.1 not, serialization error...

horde is a stable and flexible system.
Which distribution and php is stable with the horde 5.2.22?
Can you know what can cause the problem in php5.6 versions?


2018-11-14 12:07:30 build+horde (at) de-korte (dot) org Comment #15 Reply to this comment
I'm tested the php7.3, but nothing has changed:
This is a totally different error which you need to fix first.
2018-11-14 12:00:42 ngabor (at) brc (dot) hu Comment #14 Reply to this comment
Under PHP 7.0 it is not reproducible here. I can remember that with 
PHP 5.6 the workaround https://bugs.horde.org/ticket/14490#c3 was 
necessary...
I'm tested the php7.3, but nothing has changed:

Nov 14 12:56:42 horde4 HORDE: Load config file (conf.php; app: horde) 
[pid 4252 on line 109 of "/usr/share/php/Horde/Registry/Loadconfig.php"]
Nov 14 12:56:42 horde4 HORDE: PHP ERROR: ini_set(): Cannot set 'user' 
save handler by ini_set() or session_module_name() [pid 4252 on line 
95 of "/usr/share/php/Horde/SessionHandler.php"]
Nov 14 12:56:42 horde4 HORDE: 1. Horde_Registry::appInit() 
/var/www/horde/services/ajax.php:37
Nov 14 12:56:42 horde4 HORDE: 2. Horde_Registry->__construct() 
/usr/share/php/Horde/Registry.php:287
Nov 14 12:56:42 horde4 HORDE: 3. Horde_Session->setup() 
/usr/share/php/Horde/Registry.php:535
Nov 14 12:56:42 horde4 HORDE: 4. Horde_Injector->createInstance() 
/usr/share/php/Horde/Session.php:185
Nov 14 12:56:42 horde4 HORDE: 5. 
Horde_Injector_Binder_Factory->create() 
/usr/share/php/Horde/Injector.php:238
Nov 14 12:56:42 horde4 HORDE: 6. 
Horde_Core_Factory_SessionHandler->create() 
/usr/share/php/Horde/Injector/Binder/Factory.php:119
Nov 14 12:56:42 horde4 HORDE: 7. Horde_SessionHandler->__construct() 
/usr/share/php/Horde/Core/Factory/SessionHandler.php:95
Nov 14 12:56:42 horde4 HORDE: 8. ini_set() 
/usr/share/php/Horde/SessionHandler.php:95
Nov 14 12:56:42 horde4 HORDE: 9. Horde_ErrorHandler::errorHandler()
Nov 14 12:56:42 horde4 HORDE:
Nov 14 12:56:42 horde4 HORDE: Horde_HashTable_Predis: Retrieved keys 
(38eip4uctmphu8lahi2kdsmche) [pid 4252 on line 232 of 
"/usr/share/php/Horde/HashTable/Base.php"]
Nov 14 12:56:42 horde4 HORDE: Read session data 
(38eip4uctmphu8lahi2kdsmche) [pid 4252]
Nov 14 12:56:42 horde4 HORDE: [imp] Load config file (conf.php; app: 
imp) [pid 4252 on line 109 of 
"/usr/share/php/Horde/Registry/Loadconfig.php"]
Nov 14 12:56:42 horde4 HORDE: [imp] Load config file (hooks.php; app: 
imp) [pid 4252 on line 109 of 
"/usr/share/php/Horde/Registry/Loadconfig.php"]
Nov 14 12:56:42 horde4 HORDE: [imp] PHP ERROR: The each() function is 
deprecated. This message will be suppressed on further calls [pid 4252 
on line 438 of 
"/var/www/horde/imp/lib/Ajax/Application/ListMessages.php"]
Nov 14 12:56:42 horde4 HORDE: 1. 
Horde_Core_Ajax_Application->doAction() 
/var/www/horde/services/ajax.php:61
Nov 14 12:56:42 horde4 HORDE: 2. 
IMP_Ajax_Application_Handler_Common->viewPort() 
/usr/share/php/Horde/Core/Ajax/Application.php:175
Nov 14 12:56:42 horde4 HORDE: 3. IMP_Ajax_Application->viewPortData() 
/var/www/horde/imp/lib/Ajax/Application/Handler/Common.php:108
Nov 14 12:56:42 horde4 HORDE: 4. 
IMP_Ajax_Application_ListMessages->listMessages() 
/var/www/horde/imp/lib/Ajax/Application.php:262
Nov 14 12:56:42 horde4 HORDE: 5. 
IMP_Ajax_Application_ListMessages->_getOverviewData() 
/var/www/horde/imp/lib/Ajax/Application/ListMessages.php:388
Nov 14 12:56:42 horde4 HORDE: 6. each() 
/var/www/horde/imp/lib/Ajax/Application/ListMessages.php:438
Nov 14 12:56:42 horde4 HORDE: 7. Horde_ErrorHandler::errorHandler()
Nov 14 12:56:42 horde4 HORDE:
Nov 14 12:56:42 horde4 HORDE: [imp] Horde_HashTable_Predis: Retrieved 
keys (38eip4uctmphu8lahi2kdsmche) [pid 4252 on line 232 of 
"/usr/share/php/Horde/HashTable/Base.php"]
Nov 14 12:56:42 horde4 HORDE: [imp] Read session data 
(38eip4uctmphu8lahi2kdsmche) [pid 4252]
Nov 14 12:56:42 horde4 HORDE: [imp] Max memory usage: 2097152 bytes 
[pid 4252 on line 613 of "/usr/share/php/Horde/Registry.php"]
Nov 14 12:56:42 horde4 HORDE: [imp] Horde_HashTable_Predis: Set key 
(38eip4uctmphu8lahi2kdsmche) [pid 4252 on line 288 of 
"/usr/share/php/Horde/HashTable/Base.php"]
Nov 14 12:56:42 horde4 HORDE: [imp] Wrote session data 
(38eip4uctmphu8lahi2kdsmche) [pid 4252]

2018-11-13 17:58:54 ngabor (at) brc (dot) hu Comment #13 Reply to this comment
Under PHP 7.0 it is not reproducible here. I can remember that with 
PHP 5.6 the workaround https://bugs.horde.org/ticket/14490#c3 was 
necessary...
I Try it php7, i would like just take a few days.

2018-11-13 11:09:59 ngabor (at) brc (dot) hu Comment #12 Reply to this comment
Works fine here.
I setup debug, if I click the folder:

Nov 13 11:59:32 horde4 HORDE: Load config file (conf.php; app: horde) 
[pid 507 on line 110 of "/usr/share/php/Horde/Registry/Loadconfig.php"]
Nov 13 11:59:32 horde4 HORDE: Horde_HashTable_Predis: Retrieved keys 
(tgqe7pn2572ive7cpo8s02hpv3) [pid 507 on line 233 of 
"/usr/share/php/Horde/HashTable/Base.php"]
Nov 13 11:59:32 horde4 HORDE: Read session data 
(tgqe7pn2572ive7cpo8s02hpv3) [pid 507]
Nov 13 11:59:32 horde4 HORDE: [imp] Load config file (conf.php; app: 
imp) [pid 507 on line 110 of 
"/usr/share/php/Horde/Registry/Loadconfig.php"]
Nov 13 11:59:32 horde4 HORDE: [imp] Load config file (hooks.php; app: 
imp) [pid 507 on line 110 of 
"/usr/share/php/Horde/Registry/Loadconfig.php"]
Nov 13 11:59:32 horde4 HORDE: [imp] Horde_HashTable_Predis: Retrieved 
keys (tgqe7pn2572ive7cpo8s02hpv3) [pid 507 on line 233 of 
"/usr/share/php/Horde/HashTable/Base.php"]
Nov 13 11:59:32 horde4 HORDE: [imp] Read session data 
(tgqe7pn2572ive7cpo8s02hpv3) [pid 507]
Nov 13 11:59:32 horde4 HORDE: [imp] Max memory usage: 4456448 bytes 
[pid 507 on line 613 of "/usr/share/php/Horde/Registry.php"]
Nov 13 11:59:32 horde4 HORDE: [horde] Wrote session data 
(tgqe7pn2572ive7cpo8s02hpv3) [pid 507]

Firebug 58.0.1 ->  http://127.0.0.1:8080/services/ajax.php/imp/viewPort
------------------------------------------------------------------------------------------------
Response payload:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of 
the JSON data
/*-secure-{"response":null,"msgs":[{"message":"Serialization 
failed.","type":"horde.error"}]}*/

I remembered, I use redis cache.

2018-11-13 11:09:43 marth (at) tsvschlieben (dot) de Comment #11 Reply to this comment
Under PHP 7.0 it is not reproducible here. I can remember that with 
PHP 5.6 the workaround https://bugs.horde.org/ticket/14490#c3 was 
necessary...
2018-11-13 10:27:12 build+horde (at) de-korte (dot) org Comment #10 Reply to this comment
Works fine here.
2018-11-13 10:03:40 ngabor (at) brc (dot) hu Comment #9
New Attachment: 1541439381.M460365P20811.imap5,S=28022,W=28366:2,S Download
Reply to this comment
attach the problematic whole leaf.
Recently many letters are received (~700users).

If you copy this mail to /new directory, then the dynamic view 
indicates, automatic mark read all new message (move all mails from 
/new to /cur), and reads the "serialization failed" message  maildox 
is empty)

I can reproduce it at any time.

thx
G
2018-11-13 09:07:31 build+horde (at) de-korte (dot) org Comment #8 Reply to this comment
I read the forum a few years ago.
What do you think?
I have no idea what the above means.
How to mutilate the message?
I used 'okteta' to change a character in a message that was already in 
my Maildir. Horde didn't see to bother about that, but I'm running a 
more recent PHP version (so this may be different).
I'm using postfix. When I set up the "header_checks regexp":
  /[^[:print:]]{8}/       REJECT Sorry, ascii characters only 
permitted by this server
then many mail are reject.
The message that was posted before would *not* be rejected by the 
above expression. It matches 8 consecutive non-printable characters, 
so I don't think this is what you need (as the example you posted has 
only one non-ascii character in the subject field).

Postfix has a configuration parameter to reject messages which don't 
adhere to the requirement that headers must be 7-bit only:

strict_7bit_headers = yes (default: no)

I have never needed that though.
2018-11-12 09:06:36 ngabor (at) brc (dot) hu Comment #7 Reply to this comment
The problem as you also found out, the hexadecimal '80' character (? 
in the Windows-1252 characterset), is not allowed in the subject 
field. It needs to be encoded. Having said that, if I deliberately 
mutilate a message to contain this character, it renders fine here 
in Horde (even in the dynamic view).
I read the forum a few years ago.
What do you think?
How to mutilate the message?
I'm using postfix. When I set up the "header_checks regexp":
  /[^[:print:]]{8}/       REJECT Sorry, ascii characters only 
permitted by this server
then many mail are reject.
Which PHP version do you use?
PHP5.6 (5.6.35-1+0~20180405085504.12+stretch~1.gbpaa4624)

thx
G
2018-11-10 11:33:05 build+horde (at) de-korte (dot) org Comment #6 Reply to this comment
The problem as you also found out, the hexadecimal '80' character (? 
in the Windows-1252 characterset), is not allowed in the subject 
field. It needs to be encoded. Having said that, if I deliberately 
mutilate a message to contain this character, it renders fine here in 
Horde (even in the dynamic view).

Which PHP version do you use?
2018-11-06 17:29:33 ngabor (at) brc (dot) hu Comment #5 Reply to this comment
Can you provide a test case, or at least example data with steps to 
reproduce?

We really can't accept "partial output" since this would hide any 
errors and since we use serialized data all over the place (caching 
data, session data etc...) this would lead to numerous issues.
My problem is the same!

In Dynamic View, I get this error message for the following letter header:

"Delivered-To: my@same.com
Received: from wsip-174-79-150-104.cl.ri.cox.net ([174.79.150.104] 
helo=brightemailmarketing.com)
        by my.server.com with smtp (Exim 4.63)
        (envelope-from <CongressMed@brightemailmarketing.com>)
        id 1gJinW-0003Da-Tc
        for my@same.com; Mon, 05 Nov 2018 18:36:23 +0100
Received: from GHS70886 ([192.168.86.40]) by brightemailmarketing.com 
with Microsoft SMTPSVC(6.0.3790.4675);
        Mon, 5 Nov 2018 12:36:21 -0500
From: "COGI Congress" <CongressMed@brightemailmarketing.com>
To: emy@same.com
Reply-To: CogiReply@brightemailmarketing.com
Subject: Last Chance to Save .100 on Fees - Controversies in OB/GYN 
and Infertility
Date: Mon, 05 Nov 2018 12:36:21 -0500
Message-ID: <20181105-12362135-fe4@GHS70886>
MIME-Version: 1.0
Content-Type: text/html
?..
"
a possible header problem in HEX the 0x80 before 0x31:
?Subject: Last Chance to Save .100 ...?
53 75 62 6A 65 63 74 3A 20 4C 61 73 74 20 43 68 61 6E 63 65 20 74 6F 
20 53 61 76 65 20 80 31 30 30

serialization error... unable to load inbox!

After that, inbox will not load. This is independent of session and cache.
basic view all working.

Users love the dynamic view, it is difficult for them to tell the problem.
From a similar letter, the horde becomes unusable in a dynamic view.
I can send the problem mail to maildir format.

How to do this.
This is the BUG?


2016-11-05 00:51:27 Michael Rubinsky State ⇒ No Feedback
 
2016-10-21 16:12:44 Michael Rubinsky Comment #4
State ⇒ Feedback
Priority ⇒ 1. Low
Reply to this comment
Can you provide a test case, or at least example data with steps to reproduce?

We really can't accept "partial output" since this would hide any 
errors and since we use serialized data all over the place (caching 
data, session data etc...) this would lead to numerous issues.
2016-10-18 12:48:48 marth (at) tsvschlieben (dot) de Comment #3 Reply to this comment
The following code solved the issue for me

             $tmp = json_encode($data, JSON_PARTIAL_OUTPUT_ON_ERROR);

             /* Basic error handling attempts.
              * TODO: JSON_ERROR_UTF8 = 5; available as of PHP 5.3.3 */
             if (json_last_error() === 5) {
                 $data = 
json_encode(Horde_String::convertCharset($data, $params, 'UTF-8', 
true), JSON_PARTIAL_OUTPUT_ON_ERROR);
             } else {
                 $data = $tmp;
             }

This option is available since PHP5.5

Maybe one of the developers could take a look if this a valid 
workaround or bullshit...
2016-10-18 09:10:09 marth (at) tsvschlieben (dot) de Comment #2 Reply to this comment
Sorry - the error message is

"Serialization failed."  (not error)

The 16 is some debug - it's the "mode". 16 means json-data

The code that is responsible is in Horde/Serialize.php

case self::JSON:
             $tmp = json_encode($data);

             /* Basic error handling attempts.
              * TODO: JSON_ERROR_UTF8 = 5; available as of PHP 5.3.3 */
             if (json_last_error() === 5) {
                 $data = 
json_encode(Horde_String::convertCharset($data, $params, 'UTF-8', 
true));
             } else {
                 $data = $tmp;
             }
             break;
2016-10-18 08:31:52 marth (at) tsvschlieben (dot) de Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 3. High
Summary ⇒ serialization failed
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
Reply to this comment
Since a few weeks we encounter lots of problems because of the error:

serialization error... 16 unable to load inbox!

This is caused by (mostly spam) mails with broken header values (e.g. From).

We also saw that error when a user has not correctly encoded parts in 
their settings (for example a ISO-encoded Umlaut in PGP comment)

It seems that something has changed with the last version(s) that 
causes IMP to break instead of some graceful resolution (strip invalid 
char, ...)

Saved Queries