|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2019-01-08 10:10 UTC] claudiu_beta at yahoo dot com
Description:
------------
I'm using php 7.3 RC1 from Remi repo. PHP 7.1, 7.2 and 7.3 running on the same machine with same php-fpm configuration and same pool configuration. I only have issues with php 7.3 which is going down frequently.
Redirecting to /bin/systemctl status php73-php-fpm.service
● php73-php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php73-php-fpm.service; disabled; vendor preset: disabled)
Active: failed (Result: core-dump) since Mon 2019-01-07 14:56:05 EET; 54s ago
Process: 9541 ExecStart=/opt/remi/php73/root/usr/sbin/php-fpm --nodaemonize (code=dumped, signal=SEGV)
Main PID: 9541 (code=dumped, signal=SEGV)
Status: "Processes active: 0, idle: 2, Requests: 225, slow: 3, Traffic: 0.9req/sec"
Jan 07 14:48:12 serv systemd[1]: Starting The PHP FastCGI Process Manager...
Jan 07 14:48:12 serv systemd[1]: Started The PHP FastCGI Process Manager.
Jan 07 14:56:05 serv systemd[1]: php73-php-fpm.service: Main process exited, code=dumped, status=11/SEGV
Jan 07 14:56:05 serv systemd[1]: php73-php-fpm.service: Failed with result 'core-dump'.
Installed packages:
php73-php-debuginfo-7.3.1~RC1-1.fc28.remi.x86_64
php73-php-common-7.3.1~RC1-1.fc28.remi.x86_64
php73-php-devel-7.3.1~RC1-1.fc28.remi.x86_64
php73-php-pecl-zip-1.15.4-1.fc28.remi.x86_64
php73-php-bcmath-7.3.1~RC1-1.fc28.remi.x86_64
php73-php-xml-7.3.1~RC1-1.fc28.remi.x86_64
php73-php-gd-7.3.1~RC1-1.fc28.remi.x86_64
php73-php-ioncube-loader-10.3.2-1.fc28.remi.x86_64
php73-php-mysqlnd-7.3.1~RC1-1.fc28.remi.x86_64
php73-php-soap-7.3.1~RC1-1.fc28.remi.x86_64
php73-php-fpm-debuginfo-7.3.1~RC1-1.fc28.remi.x86_64
php73-build-1.0-1.fc28.remi.x86_64
php73-php-intl-7.3.1~RC1-1.fc28.remi.x86_64
php73-php-pear-1.10.7-4.fc28.remi.noarch
php73-php-mbstring-7.3.1~RC1-1.fc28.remi.x86_64
php73-php-gmp-7.3.1~RC1-1.fc28.remi.x86_64
php73-php-pecl-imagick-3.4.3-13.fc28.remi.x86_64
php73-1.0-1.fc28.remi.x86_64
php73-php-pecl-memcached-3.1.3-1.fc28.remi.x86_64
php73-runtime-1.0-1.fc28.remi.x86_64
php73-php-imap-7.3.1~RC1-1.fc28.remi.x86_64
php73-php-pdo-7.3.1~RC1-1.fc28.remi.x86_64
php73-php-fpm-7.3.1~RC1-1.fc28.remi.x86_64
php73-php-json-7.3.1~RC1-1.fc28.remi.x86_64
php73-php-pecl-igbinary-2.0.8-1.fc28.remi.x86_64
php73-php-xmlrpc-7.3.1~RC1-1.fc28.remi.x86_64
php73-php-process-7.3.1~RC1-1.fc28.remi.x86_64
php73-php-cli-7.3.1~RC1-1.fc28.remi.x86_64
php73-php-pecl-msgpack-2.0.3-1.fc28.remi.x86_64
(gdb) bt
#0 0x000055a8f4f64703 in zlog_stream_set_msg_suffix (stream=stream@entry=0x200, suffix=suffix@entry=0x0, final_suffix=final_suffix@entry=0x55a8f4fc37f6 ", pipe is closed")
at /usr/src/debug/php73-php-7.3.1~RC1-1.fc28.remi.x86_64/sapi/fpm/fpm/zlog.c:602
#1 0x000055a8f4f61b99 in fpm_stdio_child_said (ev=<optimized out>, which=<optimized out>, arg=0x55a8f6b9bdd0) at /usr/src/debug/php73-php-7.3.1~RC1-1.fc28.remi.x86_64/sapi/fpm/fpm/fpm_stdio.c:199
#2 0x000055a8f4f67026 in fpm_event_epoll_wait (queue=<optimized out>, timeout=<optimized out>) at /usr/src/debug/php73-php-7.3.1~RC1-1.fc28.remi.x86_64/sapi/fpm/fpm/events/epoll.c:145
#3 0x000055a8f4f59914 in fpm_event_loop (err=err@entry=0) at /usr/src/debug/php73-php-7.3.1~RC1-1.fc28.remi.x86_64/sapi/fpm/fpm/fpm_events.c:409
#4 0x000055a8f4f53ca7 in fpm_run (max_requests=0x7ffc4910c26c) at /usr/src/debug/php73-php-7.3.1~RC1-1.fc28.remi.x86_64/sapi/fpm/fpm/fpm.c:113
#5 0x000055a8f4d31404 in main (argc=2, argv=0x7ffc4910c888) at /usr/src/debug/php73-php-7.3.1~RC1-1.fc28.remi.x86_64/sapi/fpm/fpm/fpm_main.c:1864
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
I have upgraded to Fedora 29 and php 7.3.1. This is a backtrace from a new coredump. #0 0x000055eb8b44fc73 in zlog_stream_set_msg_suffix (stream=stream@entry=0x100, suffix=suffix@entry=0x0, final_suffix=final_suffix@entry=0x55eb8b4aedf6 ", pipe is closed") at /usr/src/debug/php73-php-7.3.1-1.fc29.remi.x86_64/sapi/fpm/fpm/zlog.c:602 #1 0x000055eb8b44d109 in fpm_stdio_child_said (ev=<optimized out>, which=<optimized out>, arg=0x55eb8c536250) at /usr/src/debug/php73-php-7.3.1-1.fc29.remi.x86_64/sapi/fpm/fpm/fpm_stdio.c:199 #2 0x000055eb8b452596 in fpm_event_epoll_wait (queue=<optimized out>, timeout=<optimized out>) at /usr/src/debug/php73-php-7.3.1-1.fc29.remi.x86_64/sapi/fpm/fpm/events/epoll.c:145 #3 0x000055eb8b444e84 in fpm_event_loop (err=err@entry=0) at /usr/src/debug/php73-php-7.3.1-1.fc29.remi.x86_64/sapi/fpm/fpm/fpm_events.c:409 #4 0x000055eb8b43f217 in fpm_run (max_requests=0x7fff9540e34c) at /usr/src/debug/php73-php-7.3.1-1.fc29.remi.x86_64/sapi/fpm/fpm/fpm.c:113 #5 0x000055eb8b21c924 in main (argc=2, argv=0x7fff9540e968) at /usr/src/debug/php73-php-7.3.1-1.fc29.remi.x86_64/sapi/fpm/fpm/fpm_main.c:1864I think that I know what the issue is. The event can be received after the child is freed which means that the shared log stream is uninitialized and it can't be used. Are you able to test the following patch: diff --git a/sapi/fpm/fpm/fpm_stdio.c b/sapi/fpm/fpm/fpm_stdio.c index ba8f6d8213..0ff189c9f0 100644 --- a/sapi/fpm/fpm/fpm_stdio.c +++ b/sapi/fpm/fpm/fpm_stdio.c @@ -196,8 +196,10 @@ static void fpm_stdio_child_said(struct fpm_event_s *ev, short which, void *arg) } if (read_fail) { - zlog_stream_set_msg_suffix(log_stream, NULL, ", pipe is closed"); - zlog_stream_finish(log_stream); + if (!child->log_stream) { + zlog_stream_set_msg_suffix(log_stream, NULL, ", pipe is closed"); + zlog_stream_finish(log_stream); + } if (read_fail < 0) { zlog(ZLOG_SYSERROR, "unable to read what child say"); }Actually please try this one if you can: diff --git a/sapi/fpm/fpm/fpm_stdio.c b/sapi/fpm/fpm/fpm_stdio.c index ba8f6d8213..03d15cbf0d 100644 --- a/sapi/fpm/fpm/fpm_stdio.c +++ b/sapi/fpm/fpm/fpm_stdio.c @@ -122,7 +122,7 @@ static void fpm_stdio_child_said(struct fpm_event_s *ev, short which, void *arg) struct fpm_event_s *event; int fifo_in = 1, fifo_out = 1; int in_buf = 0; - int read_fail = 0, finish_log_stream = 0; + int read_fail = 0, finish_log_stream = 0, create_log_stream; int res; struct zlog_stream *log_stream; @@ -138,7 +138,8 @@ static void fpm_stdio_child_said(struct fpm_event_s *ev, short which, void *arg) event = &child->ev_stderr; } - if (!child->log_stream) { + create_log_stream = !child->log_stream; + if (create_log_stream) { log_stream = child->log_stream = malloc(sizeof(struct zlog_stream)); zlog_stream_init_ex(log_stream, ZLOG_WARNING, STDERR_FILENO); zlog_stream_set_decorating(log_stream, child->wp->config->decorate_workers_output); @@ -196,8 +197,10 @@ static void fpm_stdio_child_said(struct fpm_event_s *ev, short which, void *arg) } if (read_fail) { - zlog_stream_set_msg_suffix(log_stream, NULL, ", pipe is closed"); - zlog_stream_finish(log_stream); + if (create_log_stream) { + zlog_stream_set_msg_suffix(log_stream, NULL, ", pipe is closed"); + zlog_stream_finish(log_stream); + } if (read_fail < 0) { zlog(ZLOG_SYSERROR, "unable to read what child say"); }