Edit report at https://bugs.php.net/bug.php?id=80376&edit=1
ID: 80376
Updated by: cmb@php.net
Reported by: mav2287 at aol dot com
Summary: last day of the month causes runway cpu usage
-Status: Feedback
+Status: Open
Type: Bug
Package: Date/time related
Operating System: OS X 10.11.6 El Capitan
PHP Version: 7.4.12
-Assigned To: cmb
+Assigned To:
Block user comment: N
Private report: N
New Comment:
Thanks! I think somebody with access to macOS should have a closer look.
Previous Comments:
------------------------------------------------------------------------
[2020-12-16 14:10:57] ekl at woodwing dot com
I can repro with PHP 7.3.25 on our MacOSX 10.11.6 MacMini as follows:
$ sudo port install php73
$ sudo port install php73 +debug
$ sudo port activate php73
The following versions of php73 are currently installed:
1) php73 @7.3.25_2+debug+libedit
2) php73 @7.3.25_2+libedit (active)
Enter a number to select an option: 1
$ php73 -r 'print (new DateTime( "15 Dec 2020" ))->format("Ymd
H:i:s").PHP_EOL;'
20201215 00:00:00
$ php73 -v
PHP 7.3.25 (cli) (built: Dec 16 2020 14:43:06) ( NTS DEBUG )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.25, Copyright (c) 1998-2018 Zend Technologies
$ sudo port activate php73
The following versions of php73 are currently installed:
1) php73 @7.3.25_2+debug+libedit
2) php73 @7.3.25_2+libedit (active)
Enter a number to select an option: 2
$ php73 -r 'print (new DateTime( "15 Dec 2020" ))->format("Ymd
H:i:s").PHP_EOL;'
===>>> HANGS! <<<===
$ php73 -v
PHP 7.3.25 (cli) (built: Dec 6 2020 20:04:26) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.25, Copyright (c) 1998-2018 Zend Technologies
Notes:
- This problem suddenly occurred after upgrading from an older PHP 7.3 patch version. (I can't
remember the patch level that was still working. I assume it was something close to PHP 7.3.10, like
one year old.)
- This problem is a major show-stopper for us. We can't go back to an older PHP 7.3 patch level
anymore, as we thought it was smart to clear older installations first, once we ran into this
problem.
- Exactly the same problem happens for PHP 7.4.13 installed on the same machine.
- This problem does NOT happen on my MacOSX 10.13.6 MacBook Pro.
------------------------------------------------------------------------
[2020-12-15 13:17:58] cmb@php.net
If that hangs only with clang 8 non-debug builds, that may hint at
a bad optimization in that compiler. Without further information,
this is likely not actionable from our side.
------------------------------------------------------------------------
[2020-12-10 03:26:00] mav2287 at aol dot com
Sorry for the delay, things have been busy at work.
I did some additional testing and found the bug present in PHP 8.0 as well. Although I tried
everything I could think of I was never able to get a backtrace to run with gdb; it just kept saying
the symbols were not present no matter what I did.
I was able to get a compiled version of 7.3, 7.4 and 8.0 without enable-debug that did not have the
issue by using clang 10. It would appear that using the default version of clang on that machine (
full details below ) may have been the cause. I don't know what specifically about clang 8 it
didn't like though.
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
------------------------------------------------------------------------
[2020-11-22 10:03:59] requinix@php.net
Go ahead and get the backtrace anyway. It might not have as much useful information, but it's
better than nothing.
------------------------------------------------------------------------
[2020-11-22 09:03:33] mav2287 at aol dot com
I was able to get GDB installed and I was able to get both 7.3 and 7.4 re-compiled with
--enable-debug so that I could use GDB. That is when things got interesting or annoying depending on
how you look at it. The bug was not present and I couldn't replicate it after compiling with
--enable-debug as a sanity check I compiled both again with it and sure enough the bug was back. Any
ideas how to get a backtrace since the bug doesn't show up when the --enable-debug flag is set?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=80376
--
Edit this bug report at https://bugs.php.net/bug.php?id=80376&edit=1