|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68343 CLI shutdown process exits mid-shutdown
Submitted: 2014-11-04 15:28 UTC Modified: 2021-09-26 04:22 UTC
From: Danack at basereality dot com Assigned: cmb (profile)
Status: No Feedback Package: CGI/CLI related
PHP Version: 5.6.2 OS: N/A
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-11-04 15:28 UTC] Danack at basereality dot com
The PHP shutdown process does not seem to complete when PHP is passed a filename. Instead the function clean_non_persistent_constants appears to abort the process on this line:

I found this by trying to enable the Garbage Collector benchmark as described on:

After recompiling PHP with `export CFLAGS=-DGC_BENCH=1` I expect to see GC benchmarks after every php script is run. Instead only scripts that are piped in to PHP give benchmarks.


Running `php < memTest.php` - this appears to exit properly and shows the GC benchmarks

Running `php memTest.php` - this appears to exit prematurely in the clean_non_persistent_constants function.

To be honest, it may have been like this for such a long time that fixing this is a bad idea...and that just moving the GC benchmark output to above where it exits early would be more appropriate.

Test script:

echo "Hello world!";

Expected result:
GC Benchmark output after every script is run.

Actual result:
GC Benchmark output only after scripts are piped into PHP, rather than php running file names.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-09-16 14:00 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-09-16 14:00 UTC]
Apparently, clean_non_persistent_constants() has been removed
(renamed?) as of PHP 7.2.0, so I wonder whether this issue has
been fixed altogether in the meantime.
 [2021-09-26 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 01:01:27 2024 UTC