#91664TYPO3 9.5 "Cannot unserialize TYPO3\CMS\Core\Locking\FileLockStrategy" during cache reading
Description
Hi,
after several issues related to the caches (we’re using LazyObjects) now there’s an issue with the reading from cache.
Error page is attached.
As reference for the model structure you can look into https://forge.typo3.org/issues/91364 where I added the models that are used to be stored in cache (ticket is from the original issue related to v10).
Since 9.5.17 these issues are also in v9.
The error always occurs after the page rendering itself worked once, but it seems to be also a general issue cause this also happens if we run a Command that deletes the cache entries for specific products.
Happy to answer any additional questions that may come up to get this solved asap – cause it prevents us from updating our app we currently run on 9.5.16 which did not had these issues.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 2
Files 1
History 9
-
Carsten Hülsmann changed Related to #91364 <span data-processor="relativetime" data-value="2020-06-17T08:29:16+00:00" > 06/17/20, 08:29 </span>
-
Carsten Hülsmann commented <span data-processor="relativetime" data-value="2020-06-22T22:54:32+00:00" > 06/22/20, 22:54 </span>
Oliver Hader wrote:
> Is there a possibility to get a slim version of that extension (narrowed down to the actual problem causing this problem)?
> There also should be an error on serializingFileLockStrategy– this was introduced with #88573 in terms of security hardening.I’m not sure if this will be possible. The extension is just part of a whole TYPO3 project.
There are services that rely on env vars – which are required to render a page (e.g. to fetch additional Data from a PIM on the fly).
I’ll check what I can do, to narrow it down as far as I can without breaking the other stuff.Regarding the missing error on “serializing” – we had that before the latest update (unfortunately I can’t say anymore if it was actually a FileLockStrategy issue). Then everything seemed to work well but than this issue appeared.
Just a heads up: I’m currently clarifying if I’m allowed to share the whole Extension.
-
Carsten Hülsmann commented <span data-processor="relativetime" data-value="2020-06-29T21:49:22+00:00" > 06/29/20, 21:49 </span>
@Oliver
Instead of sharing the whole extension here (which wouldn’t work as mentioned above) and to narrow it down is nearly impossible in this project so I wouldn’t like to share it for now.However I build a work around now by putting the rendered view into the cache instead of the product object including it’s relations.
Unfortunately I’ve seen this error also occuring by manually starting scheduler tasks – so I believe this is not neccessarily related to the Product Object itself but maybe a configuration issue (which I couldn’t find by now).In case I am able to reproduce this issue (e.g. in the Scheduler) I can mention it here or in another ticket.
-
Devid Messner commented <span data-processor="relativetime" data-value="2020-07-23T19:02:23+00:00" > 07/23/20, 19:02 </span>
I had the same problem when updating to version TYPO3 9.5.19
The cause was the passing of a domain object to a typoscript USER_INT function via FluidViewHelper “f:cObject”.<f:cObject typoscriptObjectPath="lib.UserIntFunc" data="{domainObject: object}" />The object in the attribute “data” is no longer serialized correctly.
Maybe this information helps to locate the problem. -
Jacco van der Post commented <span data-processor="relativetime" data-value="2020-08-25T13:14:44+00:00" > 08/25/20, 13:14 </span>
I get this bug on
<v:render.uncache partial="..TYPO3 9.5.18, 9.5.19 and 9.5.20
VHS 6.0.3Clearing frontend cache helps
-
Vasyl Mosiychuk commented <span data-processor="relativetime" data-value="2020-11-13T10:25:13+00:00" > 11/13/20, 10:25 </span>
For me too, it is not resolved! I still get this error…
-
Benni Mack changed Related to #91766 <span data-processor="relativetime" data-value="2021-10-22T09:08:24+00:00" > 10/22/21, 09:08 </span>
-
Georg Ringer commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-10-16T15:07:45+00:00" > 10/16/26, 15:07 </span>Thanks for the report.
The exception is intended. Since the security hardening in #88573, classes that hold runtime resources, such as
FileLockStrategy(and the other locking strategies and log writers), use theBlockSerializationTraitand throw an exception when they are unserialized. This is still the case in main.The error therefore means that an object which (indirectly) references such a class has been stored in a cache or passed through a serialized channel. The comments show two typical cases: a domain object handed over via
dataoff:cObjectto a USER_INT object, and uncached partials of VHS. Domain objects that carry injected services should not be serialized. Cache and pass on the rendered output, or plain values such as identifiers and arrays, and re-fetch the object afterwards, which is the workaround already used in the report.There has been no reproducible case without extension code since the request for a reduced example in 2020, and TYPO3 v9 is out of support. I’m therefore closing this issue.
If this is still valid for you in v14, please open a new issue and provide information how to reproduce it. Thanks!
Is there a possibility to get a slim version of that extension (narrowed down to the actual problem causing this problem)?
There also should be an error on serializing
FileLockStrategy– this was introduced with #88573 in terms of security hardening.