[TYPO3-core] RFC: #8980: unlink of non existant lockfiles generates warnings in frontend

Ernesto Baschny [cron IT] ernst at cron-it.de
Tue Jul 21 10:49:58 CEST 2009


Hi Stucki,

I agree with you. Those warnings should never be reached under normal
circumstances. If they are shown, it is a bug which has to be fixed.

I guess the problem comes from the fact that t3lib_lock::acquire() (in
"simple" mode) will acquire a lock (touch a file) even if it is locked
by another process. This happens if the "loop X steps" (150 x 200ms =
3s) time passes without the other process releasing the lock. In this
situation the new process acquires the same lock again, thus two (or
more) processes will try to release the same lock, thus generating the
warning about the file that is already gone.

Since I have not really tested this, I cannot confirm or even suggest a
patch, but maybe this can give some inspiration get rid of the problem?

Cheers,
Ernesto

Michael Stucki schrieb:
> Hi Susanne,
> 
> I'm sorry to say but I don't really like that way of hiding warnings.
> After all the real problem is obviously that you have display_errors
> enabled in your PHP config, which is a bad thing anyway.
> 
> Normally, a productive environment should use log_errors rather than
> display_errors, and there the warnings are completely fine in my opinion.
> 
> So -1 for generally hiding the warnings (which would also be hidden from
> the logfile then).
> 
> - michael
> 
> Susanne Moog schrieb:
>> Hi,
>>
>> attached is v2 with @unlink instead of the file_exists check.
>>
>> Regards,
>>
>> Susanne
>>
>>
>> Rupert Germann schrieb:
>>> hi Susanne,
>>>
>>> wouldn't an @ sign at the beginning of unlink have the same effect?
>>> if (@unlink($this....
>>>
>>
> 
> 


More information about the TYPO3-team-core mailing list