Transfer closed for httpd parent and subrequest double bailout
Nessuno ha ancora preso questa issue.
- #17653 di @bukka — chiusa senza merge
- Lingua principale
- C
- Stelle
- 40.4k
- Fork
- 8.1k
- Merge medio
- 2g 13h
- PR unite (30g)
- 96
Descrizione
Description
This can be recreated by setting memory_limit to 128MB and hitting virtual.php script that calls subrequest.php script
The following code:
<?php
// subrequest.php
$mep = str_repeat('test', 256 * 1000000);
echo count($mem);
<?php
// virtual.php
virtual('/subrequest.php');
echo "test";
$mep = str_repeat('test', 256 * 1000000);
echo "virtual!\n";
Resulted in this curl result:
* transfer closed with outstanding read data remaining
* Closing connection 0
curl: (18) transfer closed with outstanding read data remaining
The error logs showed following:
[Sat Jan 18 14:07:36.162766 2025] [php:error] [pid 86048:tid 86048] [client 127.0.0.1:48464] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted at /home/jakub/prog/php/81/Zend/zend_string.h:163 (tried to allocate 1024000032 bytes) in /home/jakub/prog/php/tests/apache2handler/basic/subrequest.php on line 3
[Sat Jan 18 14:07:36.162842 2025] [php:error] [pid 86048:tid 86048] [client 127.0.0.1:48464] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted at /home/jakub/prog/php/81/Zend/zend_string.h:163 (tried to allocate 1024000032 bytes) in /home/jakub/prog/php/tests/apache2handler/basic/virtual.php on line 7
/home/jakub/prog/php/81/Zend/zend_alloc.c(393) : Bailed out without a bailout address!
But I expected normal output with 2 errors for allowed memory size
I tested this with 8.1 but it will be the same for supported version I'm sure - will double check later.
PHP Version
PHP 8.1+
Operating System
Ubuntu 20.04
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Riprodurre il problema facendo chiamare subrequest.php da virtual.php con un limite di memoria di 128MB, quindi esaminare i percorsi segnalati in Zend/zend_string.h e Zend/zend_alloc.c. Confrontare l’output di trasferimento e degli errori di Apache con i due errori di limite di memoria previsti, senza un errore di bailout-address né una risposta troncata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- apache, php
- Ambito
- backend
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100