[TYPO3-dev] malformed cached config files
Roland Hager
roland.hager at tu-berlin.de
Tue Nov 1 09:46:38 CET 2011
Hello Jigal,
On 28.10.2011 11:02, Jigal van Hemert wrote:
> Hi,
>
> On 28-10-2011 10:11, Roland Hager wrote:
>> 1. In the serialized Array $TYPO3_LOADED_EXT the key "ext_tables.php"
>> was just missing for one extension. The Array was not corrupted, there
>> where just three instead of four Arraykeys for that extension.
>>
>> => This does not look like a concurrency issue to me.
>> Can anyone point me to the place where this line is generated?
>
> The contents of both temp_CACHED files are generated in
> t3lib_extMgm::writeCacheFiles()
Thanks for that hint, it really helped me to dig into it!
Since the function typo3_loadExtensions() searches all extension dirs
recursively for ext_* files, it seems that the missing array key is the
result of a not-found-file. This could indeed be a problem of our
network filesystem, maybe a timeout under high load or something like
that. That's not fine but good to know.
>> 2. The last line of the file was inserted twice.
>> The first line was correct, the second line only contained the second
>> half of that line, which leads to a wrong syntax. The first half seems
>> to be cut off.
>>
>> => This looks more like a concurrency issue to me.
>
> Which is very strange because the contents of the file are first
> generated and then written to disk entirely. It's not written in parts,
> what could explain the concurrency.
>
Yes, it is strange. Before the cached config file is written all opening
and closing php tags (<?php, ?>) are wiped and all is surrounded by one
pair of them. But in our corrupted Version the last line exists twice
with a closing php tag. So this cannot be the result of wrong input when
reading in the extensions ext_* files. This error must have happened
when writing the file.
I now have written a check-routine that is called directly after writing
the files. If something is wrong, the files are moved and generated
again for a maximum of three times. Maybe we can track that error this way.
Again, thanks for the hint to the corresponding code.
best regards
Roland
More information about the TYPO3-dev
mailing list