Bug 243100

Summary: lang/php74: php-fpm exited on signal 10
Product: Ports & Packages Reporter: iron.udjin
Component: Individual Port(s)Assignee: Torsten Zuehlsdorff <tz>
Status: In Progress ---    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (tz)
Priority: ---    
Version: Latest   
Hardware: amd64   
OS: Any   

Description iron.udjin 2020-01-05 00:22:22 UTC
Hello,

OS: FreeBSD 12.1-STABLE r355967
php74-7.4.1

Sometimes in dmesg appear messages like this:

pid 2863 (php-fpm), jid 0, uid 80: exited on signal 10 (core dumped)

Here is backtrace:

#0  0x0000000800dfd75a in memcpy () from /lib/libc.so.7
#1  0x00000000007d69f3 in php_output_handler_append (handler=0x801859000, buf=0x7fffffffabe8) at main/output.c:895
#2  0x00000000007d34db in php_output_handler_op (handler=0x801859000, context=0x7fffffffabe0) at main/output.c:943
#3  0x00000000007d3267 in php_output_op (op=0, str=0x80c418000 "", len=4135) at main/output.c:1059
#4  0x00000000007d3114 in php_output_write (str=0x80c418000 "", len=4135) at main/output.c:254
#5  0x00000000006f37f1 in php_stream_output_write (stream=0x80cf22900, buf=0x80c418000 "", count=4135) at ext/standard/php_fopen_wrapper.c:36
#6  0x00000000007db97b in _php_stream_write_buffer (stream=0x80cf22900, buf=0x80c418000 "", count=4135) at main/streams/streams.c:1127
#7  0x00000000007da928 in _php_stream_write (stream=0x80cf22900,
    buf=0x80c408000 "<?xml version=\"1.0\"?>\n<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\"><channel><title>&#x41D;&#x412;</title><description>&#x413;&#x43B;&#x430;&#x432;&#x43D;&#x44B;&#x435; &#x43D;&#x43E;&#x"..., count=69671)
    at main/streams/streams.c:1254
#8  0x00000000007dccf1 in _php_stream_copy_to_stream_ex (src=0x80cf22800, dest=0x80cf22900, maxlen=0, len=0x7fffffffcf90, __php_stream_call_depth=0, __zend_filename=0x264462 "/tmpfs/usr/ports/lang/php74/work/php-7.4.1/ext/standard/streamsfuncs.c",
    __zend_lineno=489, __zend_orig_filename=0x0, __zend_orig_lineno=0) at main/streams/streams.c:1568
#9  0x0000000000714509 in zif_stream_copy_to_stream (execute_data=0x8018151c0, return_value=0x7fffffffd008) at ext/standard/streamsfuncs.c:489
#10 0x000000000094d7fc in ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_UNUSED_HANDLER (execute_data=0x801815130) at Zend/zend_vm_execute.h:1441
#11 0x00000000008e1c1b in execute_ex (ex=0x801815020) at Zend/zend_vm_execute.h:53379
#12 0x00000000008e1e1e in zend_execute (op_array=0x801865000, return_value=0x0) at Zend/zend_vm_execute.h:57664
#13 0x000000000086b518 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at Zend/zend.c:1663
#14 0x00000000007b3e9e in php_execute_script (primary_file=0x7fffffffeae0) at main/main.c:2619
#15 0x0000000000993d9a in main (argc=1, argv=0x7fffffffed30) at sapi/fpm/fpm/fpm_main.c:1940

Is there a way to fix it?

Thank you!
Comment 1 Torsten Zuehlsdorff freebsd_committer 2020-02-09 22:30:17 UTC
Hi, i am sorry for the late response. I tried to reproduce this issue but failed. Does it still occur with 7.4.2?

After some investigation and checks i would judge, that this is an PHP issue. In PHP 7.1 was an issue like this based on strange chars in the stream, which also let to segfaults. I would suggest that you wrote a PHP issue if the issue still persists.

Greetings,
Torsten
Comment 2 iron.udjin 2020-02-09 22:59:13 UTC
(In reply to Torsten Zuehlsdorff from comment #1)

Yes, it still occur with 7.4.2:

# uptime
 0:56  up 17 days, 40 mins, 2 users, load averages: 6,58 6,12 5,98

# php -v
PHP 7.4.2 (cli) (built: Jan 25 2020 05:57:13) ( NTS DEBUG )

# dmesg | grep php-fpm | grep 'exited on signal 10' | wc -l
    4446