|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-07-23 08:04 UTC] nikic@php.net
-Status: Open
+Status: Feedback
[2021-07-23 08:04 UTC] nikic@php.net
[2021-08-01 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 00:00:02 2025 UTC |
Description: ------------ when exec "opcache_reset()" by cacheTool, We offen get Fatal error:[25-Nov-2016 14:07:07 Asia/Shanghai] PHP Fatal error: Unknown: Failed opening required '/home/xxxx/index.php' (include_path='.:/home/php7/lib/php') in Unknown on line 0(just on error log,not warning), then I check ZendAccelerator.c, find this code: static zend_string *accel_find_interned_string(zend_string *str) { /* for now interned strings are supported only for non-ZTS build */ zend_ulong h; uint nIndex; uint idx; Bucket *arData, *p; if (IS_ACCEL_INTERNED(str)) { /* this is already an interned string */ return str; } if (!ZCG(counted)) { if (accel_activate_add() == FAILURE) { return str; } ZCG(counted) = 1; } h = zend_string_hash_val(str); nIndex = h | ZCSG(interned_strings).nTableMask; /* check for existing interned string */ idx = HT_HASH(&ZCSG(interned_strings), nIndex); arData = ZCSG(interned_strings).arData; while (idx != HT_INVALID_IDX) { p = HT_HASH_TO_BUCKET_EX(arData, idx); if ((p->h == h) && (ZSTR_LEN(p->key) == ZSTR_LEN(str))) { if (!memcmp(ZSTR_VAL(p->key), ZSTR_VAL(str), ZSTR_LEN(str))) { return p->key; } } idx = Z_NEXT(p->val); } return NULL; } it read shared memory, but I don't find read lock in function, because "opcache_rerest()" will execute "accel_interned_strings_restore_state()" function, it will write shared memory. I'm not an expert, so need your help,thanks!