Bug #79270 [NoF->Opn]: segfault in libodbc.so.2.0.0 with ReflectionFunction($functio)->getParameters()

From: Date: Fri, 16 Oct 2020 21:15:20 +0000
Subject: Bug #79270 [NoF->Opn]: segfault in libodbc.so.2.0.0 with ReflectionFunction($functio)->getParameters()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229677@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79270&edit=1

 ID:                 79270
 Updated by:         cmb@php.net
 Reported by:        martin dot aschenbrenner at erwinmueller dot de
 Summary:            segfault in libodbc.so.2.0.0 with
                     ReflectionFunction($functio)->getParameters()
-Status:             No Feedback
+Status:             Open
 Type:               Bug
 Package:            PDO ODBC
 Operating System:   Linux Ubuntu 18.04 x86_64
 PHP Version:        7.3.14
 Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

Thanks!  Would that also happen with the CLI SAPI, or is this FPM specific?


Previous Comments:
------------------------------------------------------------------------
[2020-10-16 21:10:23] alexander dot stix at erwinmueller dot de

I was able to consistently reproduce this behaviour with php-7.4.11 fpm but not when having the
--enable-debug option enabled

------------------------------------------------------------------------
[2020-10-11 04:22:15] 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.

------------------------------------------------------------------------
[2020-10-01 08:48:29] cmb@php.net

I cannot reproduce this.  If you're still experiencing this
segfault with any of the actively supported PHP versions[1], can
you please provide a backtrace[2]?

[1] <https://www.php.net/supported-versions.php>
[2] <https://bugs.php.net/bugs-generating-backtrace.php>

------------------------------------------------------------------------
[2020-02-13 11:22:14] martin dot aschenbrenner at erwinmueller dot de

Description:
------------
getting randomly (approximately each second request) following segfault:

kernel: php-fpm7.3[17905]: segfault at 860 ip 00007f7e4e77cec0 sp 00007ffdcda8b040 error 4 in
libodbc.so.2.0.0[7f7e4e765000+62000]

some strange behaviors:
- uncommenting line 17 fixes the issue.
- also execution someReflection() with same parameter and an even number of times the issue
doesn't occur.


additional info:
- libodbc1 package: 2.3.4-1.1ubuntu3
- php is executed by fpm
- affects php versions 7.1.33, 7.2.27, 7.3.14, 7.4.2 (not more tested)

Test script:
---------------
<?php
class Core {
  public $conn;
  public function __construct() {
    $this->circularReference = $this;
  }

  public function connect() {
    $this->conn = new PDO("odbc:mysql");
  }

  public $stm;

  function createStm( string $foo ) {
    $this->connect();
    $this->stm = $this->conn->prepare("SELECT * FROM mytable");
//    $this->stm = NULL;
  }
}

function someReflection( $function ) {
  $rParameters = (new \ReflectionFunction($function))->getParameters();
}

someReflection("implode");

$app = new Core;
$app->createStm("bar");



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



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


Thread (19 messages)

« previous php.bugs (#229677) next »