title: Laravel + PHP 8 fpm SIGSEGV (signal 11)
body: <p>Really strange thing happening on PHP 8 fpm (using anything Eloquent triggers it) and unable to debug the coredump (PHP 7.3 is ok)</p>
  <p>Environment is Debian 10 (Vagrant VM and also DO droplet)</p>
  <ul>
  <li>Vagrant php -v shows <code>PHP 8.0.3</code></li>
  <li>DO droplet php -v shows <code>PHP 8.0.5</code></li>
  </ul>
  <p>Composer shows and just did a composer global update</p>
  <pre><code>...
    &quot;require&quot;: {
          &quot;php&quot;: &quot;^7.3|^8.0&quot;,
          &quot;aws/aws-sdk-php&quot;: &quot;^3.176&quot;,
          &quot;barryvdh/laravel-cors&quot;: &quot;^2.0&quot;,
          &quot;barryvdh/laravel-debugbar&quot;: &quot;^3.5&quot;,
          &quot;barryvdh/laravel-ide-helper&quot;: &quot;^2.9&quot;,
          &quot;barryvdh/laravel-snappy&quot;: &quot;^0.4.8&quot;,
          &quot;beyondcode/laravel-dump-server&quot;: &quot;^1.7&quot;,
          &quot;dyrynda/laravel-nullable-fields&quot;: &quot;^4.1&quot;,
          &quot;fideloper/proxy&quot;: &quot;^4.4&quot;,
          &quot;fruitcake/laravel-cors&quot;: &quot;^2.0&quot;,
          &quot;google/apiclient&quot;: &quot;^2.&quot;,
          &quot;guzzlehttp/guzzle&quot;: &quot;^7.3&quot;,
          &quot;hashids/hashids&quot;: &quot;^4.1&quot;,
          &quot;laracasts/flash&quot;: &quot;^3.2&quot;,
          &quot;laravel/cashier&quot;: &quot;^12.10&quot;,
          &quot;laravel/framework&quot;: &quot;^8.40&quot;,
          &quot;laravel/horizon&quot;: &quot;^5.7&quot;,
          &quot;laravel/sanctum&quot;: &quot;^2.9&quot;,
          &quot;laravel/scout&quot;: &quot;^8.6&quot;,
          &quot;laravel/socialite&quot;: &quot;^5.2&quot;,
          &quot;laravel/telescope&quot;: &quot;^4.4&quot;,
          &quot;laravel/tinker&quot;: &quot;^2.6&quot;,
          &quot;laravel/ui&quot;: &quot;^3.2&quot;,
          &quot;laravelcollective/html&quot;: &quot;^6.2&quot;,
          &quot;league/csv&quot;: &quot;^9.7&quot;,
          &quot;league/flysystem-aws-s3-v3&quot;: &quot;^1.0&quot;,
          &quot;phery/phery&quot;: &quot;^2.7&quot;,
          &quot;php-parallel-lint/php-console-color&quot;: &quot;^1.0&quot;,
          &quot;plivo/plivo-php&quot;: &quot;^4.18&quot;,
          &quot;predis/predis&quot;: &quot;^1.1&quot;,
          &quot;sofa/eloquence&quot;: &quot;dev-master&quot;,
          &quot;vinkla/hashids&quot;: &quot;^9.1&quot;,
          &quot;wildbit/postmark-php&quot;: &quot;^4.0&quot;,
          &quot;wildbit/swiftmailer-postmark&quot;: &quot;^3.3&quot;
    },
    &quot;require-dev&quot;: {
          &quot;facade/ignition&quot;: &quot;^2.5&quot;,
          &quot;fakerphp/faker&quot;: &quot;^1.9.1&quot;,
          &quot;laravel/breeze&quot;: &quot;^1.1&quot;,
          &quot;laravel/sail&quot;: &quot;^1.0.1&quot;,
          &quot;mockery/mockery&quot;: &quot;^1.4.2&quot;,
          &quot;nunomaduro/collision&quot;: &quot;^5.0&quot;,
          &quot;phpunit/phpunit&quot;: &quot;^9.3.3&quot;
      },
  </code></pre>
  <h2>Nginx + php7.4-fpm</h2>
  <p>Laravel (PHP) code works in php7.4-fpm (normal setup of nginx + fpm)
  If there is a syntax error, the browser shows a nice web page with the error (and link to telescope)</p>
  <h2>Nginx + php8.0-fpm</h2>
  <p>Most of the &quot;simple&quot; PHP pages work (a quick phpinfo.php also works fine) .. however it starts showing &quot;502 Bad Gateway&quot; (nginx) when you click on submit on the login page of <a href="https://laravel.com/docs/8.x/starter-kits#laravel-breeze" rel="nofollow noreferrer">https://laravel.com/docs/8.x/starter-kits#laravel-breeze</a> (it shows the initial form)</p>
  <p>This is only happening on <strong>php8.0-fpm</strong> (using a Vagrant VM and also replicated on a DO droplet)</p>
  <p>Something is causing php8.0-fpm to SIGSEGV (signal 11).  It doesn't even hit the laravel logs and nginx displays &quot;502 Bad Gateway&quot; (standard nginx error page) from the response of php8.0-fpm</p>
  <p>On the <code>/var/log/php8.0-fpm.log</code></p>
  <pre><code>WARNING: [pool www] child 3956 exited on signal 11 (SIGSEGV - core dumped) after 63.502325 seconds from start
  </code></pre>
  <p>I have been able to generate core dumps, however the <code>bt</code> is not showing much information.  The core dumps (on a vagrant VM) is over 200MB (huge file for a page refresh?) and this goes from #0 to #38286 (lots and lots of lines) with pretty much the same stuff with no function like I was expecting to see (function or frame) and it seems to be in an infinite loop ...</p>
  <pre><code>Reading symbols from /usr/sbin/php-fpm8.0...(no debugging symbols found)...done.
  [New LWP 3956]
  [Thread debugging using libthread_db enabled]
  Using host libthread_db library &quot;/lib/x86_64-linux-gnu/libthread_db.so.1&quot;.
  Core was generated by `php-fpm: pool www                                                            '.
  Program terminated with signal SIGSEGV, Segmentation fault.
  #0  0x000056483469fa4e in zend_is_callable_at_frame ()
  (gdb) bt
  #0  0x000056483469fa4e in zend_is_callable_at_frame ()
  #1  0x00005648346a09a7 in zend_is_callable_ex ()
  #2  0x00005648346a0adc in zend_fcall_info_init ()
  #3  0x00005648345ca7ec in ?? ()
  #4  0x0000564834701268 in execute_ex ()
  #5  0x000056483468c5d2 in zend_call_function ()
  #6  0x00005648345ca820 in ?? ()
  #7  0x0000564834701268 in execute_ex ()
  #8  0x000056483468c5d2 in zend_call_function ()
  #9  0x00005648345ca820 in ?? ()
  #10 0x0000564834701268 in execute_ex ()
  #11 0x000056483468c5d2 in zend_call_function ()
  #12 0x00005648345ca820 in ?? ()
  ...
  #38280 0x00005648345ca820 in ?? ()
  #38281 0x0000564834701268 in execute_ex ()
  #38282 0x0000564834702c3c in zend_execute ()
  #38283 0x0000564834699e0d in zend_execute_scripts ()
  #38284 0x0000564834636b0b in php_execute_script ()
  #38285 0x00005648344f0109 in ?? ()
  #38286 0x00007f7c0e98109b in __libc_start_main (main=0x5648344ef280, argc=4, argv=0x7ffd1785e398, init=&lt;optimized out&gt;, fini=&lt;optimized out&gt;, rtld_fini=&lt;optimized out&gt;, stack_end=0x7ffd1785e388) at ../csu/libc-start.c:308
  #38287 0x00005648344f0f1a in _start ()
  </code></pre>
  <p>On the code side, I have been able to isolate it to perhaps Eloquent but the database is working</p>
  <p>The following lines work</p>
  <pre class="lang-php prettyprint-override"><code>$users = DB::table('users')-&gt;get();
  //dd($users);
  echo count($users);  // show 31
  </code></pre>
  <p>but then adding the following gets the <strong>SIGSEGV</strong></p>
  <pre class="lang-php prettyprint-override"><code>$user = User::find(10001);
  </code></pre>
  <p>or</p>
  <pre class="lang-php prettyprint-override"><code>$users = User::all(); // only 31 records in the database
  </code></pre>
  <p>Any ideas?  Maybe downgrade back to php 7.4 (which does not seem like a good way to go)</p>
  <p>Maybe it is how php 8 is handling the errors vs exceptions?</p>