php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75669 mysqli_stmt_bind_result causes Segmentation Fault with lighttpd
Submitted: 2017-12-12 04:27 UTC Modified: 2021-10-10 04:22 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:3 (100.0%)
From: humairm at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: MySQLi related
PHP Version: 7.1.12 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
46 - 21 = ?
Subscribe to this entry?

 
 [2017-12-12 04:27 UTC] humairm at gmail dot com
Description:
------------
running php 7 using php-fpm on lighttpd with mysqli on mariadb causes segmentation fault at mysqli_stmt_bind_result as reported in php-fpm.log:
[pool www] child 24047 exited on signal 11 (SIGSEGV) after 6.518082 seconds from start
lighttpd logs report the following error:
mod_fastcgi.c.2424 unexpected end-of-file (perhaps the fastcgi process died)

2 key observations:

1. commenting out the bind_result line eliminates the error - so something triggers the segmentation fault when bind_result is called under php 7 (7.1.2)

2. running php 5 (5.5.9) instead of php 7 (7.1.2) does not have the same issue - so it seems there is something in php version 7.1.2 that is triggering the sigsegv

Test script:
---------------
$stmt = $db->prepare($sql);
$stmt->execute();
$stmt->bind_result($id, $name); //This is where segmentation fault occurs - if this line is commented out then the error goes away but so does the logic! Same line does not cause any issue with php 5 and works as desired returning the result set successfully.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-08 15:55 UTC] josh at servebyte dot com
I'm seeing the same issue with PHP 7.4.11, except no SIGSEGV with 7.3.23
 [2021-01-12 18:35 UTC] dharman@php.net
-Summary: Segmentation Fault +Summary: mysqli_stmt_bind_result causes Segmentation Fault with lighttpd
 [2021-09-30 13:03 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-09-30 13:03 UTC] cmb@php.net
That doesn't look particularly related to lighttpd.  But
regardless, we need a stack backtrace[1] to proceed on this issue.

[1] <https://bugs.php.net/bugs-generating-backtrace.php>
 [2021-10-10 04:22 UTC] 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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 23:01:29 2024 UTC