Bug #77312 [Csd->Asn]: accel_replace_string_by_process_permanent: Assertion `0' failed

From: Date: Tue, 15 Jan 2019 12:08:47 +0000
Subject: Bug #77312 [Csd->Asn]: accel_replace_string_by_process_permanent: Assertion `0' failed
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-218954@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77312&edit=1

 ID:                 77312
 User updated by:    sjon at hortensius dot net
 Reported by:        sjon at hortensius dot net
 Summary:            accel_replace_string_by_process_permanent: Assertion
                     `0' failed
-Status:             Closed
+Status:             Assigned
 Type:               Bug
 Package:            opcache
 Operating System:   archlinux
-PHP Version:        7.3.0
+PHP Version:        7.3.1
 Block user comment: N
 Private report:     N

 New Comment:

Turns out FPM needed process.dumpable=true set as well to actually generate a coredump. Here is the
backtrace after replacing the assert with a segfault:

#0  accel_replace_string_by_process_permanent (str=0x56100556b3c0) at
ext/opcache/ZendAccelerator.c:737
#1  0x00007f2c06511144 in accel_copy_permanent_strings (new_interned_string=0x7f2c06511431
<accel_replace_string_by_process_permanent>) at ext/opcache/ZendAccelerator.c:689
#2  0x00007f2c06511540 in accel_use_permanent_interned_strings () at
ext/opcache/ZendAccelerator.c:765
#3  0x00005610031b7bff in zend_interned_strings_switch_storage (request=0 '\000') at
Zend/zend_string.c:322
#4  0x00005610030e0d1f in php_module_shutdown () at main/main.c:2473
#5  0x0000561003268912 in main (argc=4, argv=0x7ffdd655b968) at sapi/fpm/fpm/fpm_main.c:2004

This happens pretty frequently


Previous Comments:
------------------------------------------------------------------------
[2019-01-11 09:03:04] sjon at hortensius dot net

@lauri thanks for the hint - I already did that and was still unsuccessful. I'm happy to see if
it still happens in 7.3.1 and reopen this bug if it does

------------------------------------------------------------------------
[2019-01-10 18:06:28] lauri dot kentta at gmail dot com

@sjon, GDB detaches from forked processes by default. You can use "set follow-fork-mode
child" or "set detach-on-fork off" to debug the php-fpm child processes.

Also, just saying: since this bug was basically about a string not being found, it could have been
the one I mentioned (which caused memory corruption and sometimes invalid string values). But no
matter.

------------------------------------------------------------------------
[2019-01-10 12:01:30] sjon at hortensius dot net

This seems to be fixed in 7.3.1 - and while it happens frequently I cannot seem to obtain a coredump
or get gdb to catch it - closing for now

------------------------------------------------------------------------
[2019-01-09 09:05:58] nikic@php.net

Could you please provide a backtrace for the assertion failure? That way we'd know which string
it is trying to replace.

------------------------------------------------------------------------
[2019-01-09 08:50:59] sjon at hortensius dot net

@lauri thanks for trying - but we don't use persistent MySQL connections in our code. I also
find it highly unlikely that could cause opcache errors

------------------------------------------------------------------------


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=77312


--
Edit this bug report at https://bugs.php.net/bug.php?id=77312&edit=1


Thread (26 messages)

« previous php.bugs (#218954) next »