Bug #73933 [NEW]: error/segfault with ldap_mod_replace and opcache

From: Date: Sat, 14 Jan 2017 11:37:31 +0000
Subject: Bug #73933 [NEW]: error/segfault with ldap_mod_replace and opcache
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206610@lists.php.net to get a copy of this message
From: ryan dot brothers at gmail dot com Operating system: Linux PHP version: 7.1.0 Package: opcache Bug Type: Bug Bug description:error/segfault with ldap_mod_replace and opcache Description: ------------ I am running into an intermittent issue when using ldap_mod_replace with opcache enabled over php-fpm. Sometimes the script succeeds and other times, the same script fails or has a segfault. It's tricky to simulate, but I believe the below script shows the issue. The script returns the error "Can't contact LDAP server" correctly on the first run, but later runs sometime return the error "Encoding error" or a segfault. I was expecting the error message to be the same on each run. The issue only occurs with opcache enabled. When opcache is disabled, the error message is the same on each run. The issue also only happens over php-fpm. When I run the script over CLI, the error message is the same on each run. I am running PHP 7.1 on CentOS 7, but the problem appears to have started in PHP 7 as PHP 5.6.29 seems ok. Test script: --------------- <?php define('AAA', 1); error_reporting(E_ALL); $ldap = ldap_connect('127.0.0.1', 5000); ldap_mod_replace($ldap, null, array( 'lockoutTime' => array(0), )); ldap_close($ldap); Expected result: ---------------- Warning: ldap_mod_replace(): Modify: Can't contact LDAP server in /var/www/html/ldap.php on line 9 Actual result: -------------- Sometimes: Warning: ldap_mod_replace(): Modify: Can't contact LDAP server in /var/www/html/ldap.php on line 9 Other times: Warning: ldap_mod_replace(): Modify: Encoding error in /var/www/html/ldap.php on line 9 or a segfault -- Edit bug report at https://bugs.php.net/bug.php?id=73933&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73933&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73933&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73933&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=73933&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=73933&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=73933&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=73933&r=needscript Try newer version: https://bugs.php.net/fix.php?id=73933&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=73933&r=support Expected behavior: https://bugs.php.net/fix.php?id=73933&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=73933&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=73933&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=73933&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73933&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=73933&r=dst IIS Stability: https://bugs.php.net/fix.php?id=73933&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=73933&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=73933&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=73933&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=73933&r=mysqlcfg

« previous php.bugs (#206610) next »