Bug #78198 [Fbk->NoF]: segmentation fault php build-in server 7.3.2

From: Date: Sun, 08 Aug 2021 04:22:19 +0000
Subject: Bug #78198 [Fbk->NoF]: segmentation fault php build-in server 7.3.2
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-235676@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78198&edit=1 ID: 78198 Updated by: php-bugs@lists.php.net Reported by: oleg at andreyev dot lv Summary: segmentation fault php build-in server 7.3.2 -Status: Feedback +Status: No Feedback Type: Bug Package: Built-in web server Operating System: MacOS PHP Version: 7.3Git-2019-06-22 (Git) Assigned To: cmb Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2021-07-28 15:25:40] cmb@php.net Is that still an issue for you with any of the actively supported PHP versions[1]? [1] <https://www.php.net/supported-versions.php> ------------------------------------------------------------------------ [2019-07-20 15:04:10] welkom at webist dot nl Solved for my personal use on MacOS, PHP 7.3.7 that comes with brew, by setting output_buffering = Off in php.ini file. Requests from Firefox browser do not cause the problem, however Chrome based browser, I am using Brave, cause following Apache error log [core:notice] [pid 1511] AH00052: child pid <..> exit signal Segmentation fault (11) It should be noticed that in every PHP 7 sub version there seem to be similar type of errors were fixed. There are different memory allocation policies on different OS's. For example MacOS allows very limited space for Shared Memory while Ubuntu allows a huge number, essentially unlimited. MacOS also do not allow to cleanup segments that was created by the original user. So the function shmop_delete works same on both MacOS and ubuntu? On MacOS I am, as sudo user, using manually the following command to clean up memory. "ipcs -ma | awk '/^m / { if ($9 == 0) { print $2 }}' | xargs -n 1 ipcrm -m > /dev/null 2>/dev/null &" Which implies Shared memory on MacOS is essentially unusable. ------------------------------------------------------------------------ [2019-06-22 21:36:35] oleg at andreyev dot lv Description: ------------ Running php 7.3.2 build-in servers and getting segmentation fault lldb ``` ➜ MinkSelenium2Driver lldb -d -p 42319 (lldb) process attach --pid 42319 Process 42319 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP frame #0: 0x00007fff6be1161a libsystem_kernel.dylib`__select + 10 libsystem_kernel.dylib`__select: -> 0x7fff6be1161a <+10>: jae 0x7fff6be11624 ; <+20> 0x7fff6be1161c <+12>: movq %rax, %rdi 0x7fff6be1161f <+15>: jmp 0x7fff6be0a421 ; cerror 0x7fff6be11624 <+20>: retq Target 0: (php) stopped. Executable module set to "/Users/oandreyev/.phpenv/versions/7.3.2/bin/php". Architecture set to: x86_64h-apple-macosx-. (lldb) continue Process 42319 resuming Process 42319 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x196e33e88) frame #0: 0x0000000105ac34ed php`timelib_get_time_zone_info + 221 php`timelib_get_time_zone_info: -> 0x105ac34ed <+221>: cmpq %rbx, (%rsi,%rax) 0x105ac34f1 <+225>: jge 0x105ac34e0 ; <+208> 0x105ac34f3 <+227>: xorl %ecx, %ecx 0x105ac34f5 <+229>: subl 0x8(%rsi,%rax), %ecx Target 0: (php) stopped. (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x196e33e88) * frame #0: 0x0000000105ac34ed php`timelib_get_time_zone_info + 221 frame #1: 0x0000000105a9e015 php`date_format + 389 frame #2: 0x0000000105a9de68 php`php_format_date + 200 frame #3: 0x000000010609dc9b php`append_essential_headers + 347 frame #4: 0x000000010609e9d8 php`php_cli_server_recv_event_read_request + 1560 frame #5: 0x000000010609f19e php`php_cli_server_do_event_for_each_fd_callback + 158 frame #6: 0x000000010609d24e php`do_cli_server + 2254 frame #7: 0x0000000106097882 php`main + 1122 frame #8: 0x00007fff6bcd53d5 libdyld.dylib`start + 1 frame #9: 0x00007fff6bcd53d5 libdyld.dylib`start + 1 (lldb) BB ``` Test script: --------------- https://gist.github.com/oleg-andreyev/8d809dea15dcb7becdc3a45cff2c3841 Expected result: ---------------- build-in server should not fail with segmentation fault ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78198&edit=1

« previous php.bugs (#235676) next »