Bug #80376 [Opn->Fbk]: last day of the month causes runway cpu usage

From: Date: Tue, 15 Dec 2020 13:17:58 +0000
Subject: Bug #80376 [Opn->Fbk]: last day of the month causes runway cpu usage
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231098@lists.php.net to get a copy of this message
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: Open +Status: Feedback Type: Bug Package: Date/time related Operating System: OS X 10.11.6 El Capitan PHP Version: 7.4.12 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [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? ------------------------------------------------------------------------ [2020-11-22 05:55:54] requinix@php.net No. Xdebug provides a backtrace of PHP code, but what we need here is a backtrace of PHP's own internals. I don't know Macs well, but if you can install gdb then using it is pretty simple: 1. Put the PHP code into a file so you can execute it more easily 2. Start gdb by telling it to load PHP (as in the program) 3. Have it run PHP, passing an argument of the file name so PHP will run the file 4. Let it run for a couple seconds so that it's definitely hung somewhere 5. Interrupt PHP with... Cmd+C? Or maybe Ctrl+C. 6. Have gdb create a backtrace with the bt command Basically, your terminal window will probably end up looking something like > gdb /path/to/php (gdb loads) > (gdb) run /path/to/file.php (no output while php hangs) Cmd+C > (gdb) bt (backtrace output) Take a look at the output, see if it appears like it might be useful, and post it. Ideally you would use a debug build of PHP for this, which includes more information than regular builds do, but with some luck that won't be necessary. For bonus points, repeat that process a few times, and compare the backtraces to see what is and isn't common between them. ------------------------------------------------------------------------ [2020-11-22 01:57:08] mav2287 at aol dot com Haven't done a debug backtrace like that before and don't have gdb on that system is this something I can do with Xdebug? ------------------------------------------------------------------------ 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

« previous php.bugs (#231098) next »