Bug 14844 - Corrupted storable string. When adding/editing an Item, cookie LastCreatedItem might be corrupted.
Summary: Corrupted storable string. When adding/editing an Item, cookie LastCreatedIte...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Olli-Antti Kivilahti
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-17 10:04 UTC by Olli-Antti Kivilahti
Modified: 2019-06-27 09:24 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 14844 - Corrupted storable string. When adding/editing an Item, cookie LastCreatedItem might be corrupted. (2.24 KB, patch)
2015-09-17 10:31 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 14844: Corrupted storable string. When adding/editing an Item, cookie LastCreatedItem might be corrupted. (2.29 KB, patch)
2016-07-28 14:35 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 14844: Corrupted storable string. When adding/editing an Item, cookie LastCreatedItem might be corrupted. (2.36 KB, patch)
2016-08-01 11:59 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Olli-Antti Kivilahti 2015-09-17 10:04:42 UTC
No idea how to replicate this issue but we have been getting several reports about the following error:

Software error:

Corrupted storable string (binary v2.9) at /usr/lib/perl/5.18/Storable.pm line 417, at /home/koha/kohaclone/cataloguing/additem.pl line 375.


This patch prevents the whole program from dying, because this error is not critical enough to warrant dying.
Also there is no centralized mechanism in Koha for showing messages to the user, so there is no easy and convenient way to warn the user that the:
'LastCreatedItem'-cookie or the systempreference 'PrefillItem' is malfunctioning.

So we instead just warn to the server logs with the malfunctioning cookie in hopes of nailing down what causes the issues.
Comment 1 Olli-Antti Kivilahti 2015-09-17 10:31:51 UTC Comment hidden (obsolete)
Comment 2 Frédéric Demians 2015-10-27 10:55:19 UTC
I've already seen that. What web server do you use? and what browsers?
Comment 3 Marc Véron 2016-06-02 09:36:02 UTC
Maybe the error occurs when the cookie is created (line 479).
Just a guess after reading:
http://stackoverflow.com/questions/1384702/should-i-use-storable-or-freezethaw-to-serialize-perl-data-as-a-cookie-value
Comment 4 Tomás Cohen Arazi (tcohen) 2016-07-28 14:35:10 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2016-08-01 11:59:15 UTC
Created attachment 53833 [details] [review]
Bug 14844: Corrupted storable string. When adding/editing an Item, cookie LastCreatedItem might be corrupted.

No idea how to replicate this issue but we have been getting several reports
about the following error:

Software error:

Corrupted storable string (binary v2.9) at /usr/lib/perl/5.18/Storable.pm line
417, at /home/koha/kohaclone/cataloguing/additem.pl line 375.

TEST PLAN:
1. Add or modify an Item.
2. No observed changes.
?. We don't know what causes this but we know that add/modify Item occasionally
   crashes due to failure of a cookie thawing.

This patch prevents the whole program from dying, because this error is not
critical enough to warrant dying.
Also there is no centralized mechanism in Koha for showing messages to the
user, so there is no easy and convenient way to warn the user that the:
'LastCreatedItem'-cookie or the systempreference 'PrefillItem' is
malfunctioning.

So we instead just warn to the server logs with the malfunctioning cookie in
hopes of nailing down what causes the issues.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Tomás Cohen Arazi (tcohen) 2016-08-16 14:14:24 UTC
Marking as Major, as it breaks production sites on upgrade.
Comment 7 Kyle M Hall (khall) 2016-08-17 18:00:29 UTC
Pushed to master for 16.11, thanks Olli!
Comment 8 Frédéric Demians 2016-08-23 10:26:07 UTC
Pushed in 16.05. Will be in 16.05.03.
Comment 9 Julian Maurice 2016-08-24 10:30:51 UTC
Pushed to 3.22.x, will be in 3.22.10
Comment 10 Fridolin Somers 2016-09-29 08:49:31 UTC
Why not empty the cookie if corrupted ?