Crash with opcache_reset() under high load in fpm
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C
- Sterne
- 40.4k
- Forks
- 8.1k
- Ø Merge
- 2 T. 13 Std.
- Gemergte PRs (30 T.)
- 96
Beschreibung
Description
The following code:
<?php
class T {
}
new T;
opcache_reset();
Executed under php-fpm with the following fpm configuration (save this as custom.conf):
[global]
error_log = /dev/stderr
[www]
listen = 127.0.0.1:9000
pm = static
pm.max_children = 10
Ran using: valgrind ./php-fpm -F -y custom.conf with opcache enabled.
Put under load with: ab -c 24 -n 200000 http://localhost/index.php
Resulted in this output:
==150641== Process terminating with default action of signal 6 (SIGABRT)
==150641== at 0x4CCDE44: __pthread_kill_implementation (pthread_kill.c:44)
==150641== by 0x4C75A2F: raise (raise.c:26)
==150641== by 0x4C5D4C2: abort (abort.c:79)
==150641== by 0x4C5D3DE: __assert_fail_base.cold (assert.c:94)
==150641== by 0x4C6DC66: __assert_fail (assert.c:103)
==150641== by 0x702B6D: zend_gc_delref (zend_types.h:1228)
==150641== by 0x70317D: zend_string_release_ex (zend_string.h:332)
==150641== by 0x708F6E: _php_stream_open_wrapper_ex (streams.c:2291)
==150641== by 0x6E412B: php_stream_open_for_zend_ex (main.c:1564)
==150641== by 0x6E407E: php_stream_open_for_zend (main.c:1552)
==150641== by 0x7B538F9: persistent_stream_open_function (ZendAccelerator.c:2520)
==150641== by 0x8514F6: zend_stream_open (zend_stream.c:88)
And some similar crashes, also got one crash on time in zend_accelerator_util_funcs.c in ZSTR_SET_CE_CACHE_EX(ce->name, ce, 0);.
But I expected this output instead:
Obviously not that
PHP Version
8.2
Operating System
No response
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere den Fehler mit php-fpm, opcache, Valgrind und dem bereitgestellten ab-Lastbefehl. Beginne mit den gemeldeten Stack-Frames in ZendAccelerator.c, zend_accelerator_util_funcs.c, streams.c und zend_types.h und verfolge dann die Absturzpfade. Als erledigt gilt die Aufgabe, wenn die Arbeitslast nicht mehr abbricht und die erwartete Antwort erzeugt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- php
- Bereich
- backend, performance
- Issue-Typ
- Bug
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100