Bug #78295 [Com]: session_create_id causes SIGSEGV

From: Date: Mon, 29 Jul 2019 18:15:55 +0000
Subject: Bug #78295 [Com]: session_create_id causes SIGSEGV
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222003@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78295&edit=1 ID: 78295 Comment by: ilija dot tovilo at me dot com Reported by: ilija dot tovilo at me dot com Summary: session_create_id causes SIGSEGV Status: No Feedback Type: Bug Package: Session related Operating System: Linux/Windows PHP Version: 7.3.6 Block user comment: N Private report: N New Comment: Sorry for the late response. I'm on vacation right now. I've been trying to get a stack trace or core dump but did not succeed. I'll try again next week when I'm back. In the meantime, there are reports in the SimpleSaml issue that the same thing happens on PHP 7.2. So apparently it's not exclusive to PHP 7.3. Previous Comments: ------------------------------------------------------------------------ [2019-07-28 04:22:05] php-bugs at lists dot php dot net 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. ------------------------------------------------------------------------ [2019-07-16 09:00:45] nikic@php.net I've been staring at the code, but don't see why it would crash. A stack strace would be very helpful. ------------------------------------------------------------------------ [2019-07-15 21:29:06] ilija dot tovilo at me dot com Adjust tested PHP version ------------------------------------------------------------------------ [2019-07-15 21:24:54] ilija dot tovilo at me dot com Description: ------------ We've upgraded to from PHP 7.0 to PHP 7.3 and started experiencing PHP-FPM crashes in production. Turns out it was caused by a call to session_create_id() in the SimpleSaml library: https://github.com/simplesamlphp/simplesamlphp/issues/1158 The issue would arise randomly about 2-3 times a day. We've tried to get a core dump but have not managed to do so yet. In the meantime SimpleSaml has switched back to use bin2hex(openssl_random_pseudo_bytes(16)) for session id generation for PHP 7.3. This has completely resolved the issue for us. No more crashes. Test script: --------------- Unfortunately, the issue only occurred in our production environment. We could not reproduce the issue in a short test script. Expected result: ---------------- No crash. Actual result: -------------- /var/log/kern.log: Jul 5 16:00:03 servername kernel: [265630.815422] traps: php-fpm7.3[21032] general protection ip:5580a3494efd sp:7fff8cff8498 error:0 Jul 5 16:00:03 servername kernel: [265630.815428] in php-fpm7.3[5580a3231000+3ee000] /var/log/php7.3-fpm.log: [05-Jul-2019 16:24:44] WARNING: [pool www] child 21558 exited on signal 11 (SIGSEGV) after 0.454303 seconds from start [05-Jul-2019 16:24:44] NOTICE: [pool www] child 21561 started ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78295&edit=1

« previous php.bugs (#222003) next »