Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APCU error on property accessor #25819

Closed
wants to merge 1 commit into from
Closed

APCU error on property accessor #25819

wants to merge 1 commit into from

Conversation

arno14
Copy link

@arno14 arno14 commented Jan 17, 2018

Q A
Branch 3.4
Bug fix yes
New feature no
BC breaks no
Deprecations no
Tests pass yes/no
Fixed tickets
License MIT
Doc PR

Sometime I see this kind of error in my logs:

apache error logs:
Got error 'PHP message: PHP Notice: apcu_fetch(): Error at offset 0 of 426 bytes in .../vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php on line 53

Followed by a symfony log
Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Call to a member function getLength() on null" at .../vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessor.php line 194

Once this problem occured theses errors are repeated until the apcu cache is cleared (which can take hours).

As this problem occured randomly, I can not repeat it when I want.

Serveur Debian 9 / apache 2.4.25 with php-fpm / PHP 7.0.27 / apcu 5.1.3

Sometime I see this kind of error in my logs:

apache error logs:
Got error 'PHP message: PHP Notice: apcu_fetch(): Error at offset 0 of 426 bytes in .../vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php on line 53

Followed by a symfony log
Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Call to a member function getLength() on null" at .../vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessor.php line 194

Once this problem occured theses errors are repeated until the apcu cache is cleared (which can take hours).

As this problem occured randomly, I can not repeat it when I want.

Serveur Debian 9 / apache 2.4.25 with php-fpm / PHP 7.0.27 / apcu 5.1.3
@nicolas-grekas
Copy link
Member

The issue is in the Cache component to me. isHit should return false when this happens in the first place. So 👎 for the patch as it is, but definitely 👍 for the report, thanks for it. We now need to figure out a proper way to fix the issue in Cache.

@nicolas-grekas
Copy link
Member

Replaced by #25822
Note that the report mentioning line 53 is for 3.1, but the bug will be fixed on 3.3, which is the lowest maintained branch where it applies.
@arno14 can you please try #25822 and see if it fixed the issue? (the patch should be easy to apply even on 3.1.)

fabpot added a commit that referenced this pull request Jan 17, 2018
…s-grekas)

This PR was merged into the 3.3 branch.

Discussion
----------

[Cache] Fix handling of apcu_fetch() edgy behavior

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Replaces #25819. Cannot be tested as I don't know how to trigger this behavior.

Commits
-------

c707c4c [Cache] Fix handling of apcu_fetch() edgy behavior
@arno14
Copy link
Author

arno14 commented Jan 18, 2018

As this happen randomly, I can not recreate the bug.
But I applied the patch on one of my production server, I'll see if the error occurs again in the next weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants