php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81006 Segmentation fault 11 on OSX 11
Submitted: 2021-05-02 16:14 UTC Modified: 2021-05-11 06:41 UTC
Votes:8
Avg. Score:4.6 ± 0.7
Reproduced:8 of 8 (100.0%)
Same Version:8 (100.0%)
Same OS:2 (25.0%)
From: sulcmil at gmail dot com Assigned: krakjoe (profile)
Status: Closed Package: *General Issues
PHP Version: 8.0.5 OS: OSX 11.3
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 !
Your email address:
MUST BE VALID
Solve the problem:
33 + 26 = ?
Subscribe to this entry?

 
 [2021-05-02 16:14 UTC] sulcmil at gmail dot com
Description:
------------
Hi. After upgrading to PHP 8.0.5, me and my colleagues are hitting Segmentation fault 11 on OSX 11.

We're using homebrew and default php formula.

- install brew
- brew update
- brew install php@8.0

I have homebrew default PHP configuration with APCu extension.

```
➜ php --ini
Configuration File (php.ini) Path: /usr/local/etc/php/8.0
Loaded Configuration File:         /usr/local/etc/php/8.0/php.ini
Scan for additional .ini files in: /usr/local/etc/php/8.0/conf.d
Additional .ini files parsed:      /usr/local/etc/php/8.0/conf.d/ext-apcu.ini
```

There is Symfony Console + Doctrine library in our project.

- bin/console doctrine:fixtures:load --append --no-interaction --fixtures=app/fixtures

This command is working well on PHP 8.0.3, but on PHP 8.0.5 it ends with segmentation fault 11.

From my observation, same error occurs also using PHP development server.

Here is output from lldb.

```
❯ lldb php bin/console doctrine:fixtures:load -- --append --no-interaction --fixtures=app/fixtures/Plan/Dev
(lldb) target create "php"
Current executable set to 'php' (x86_64).
(lldb) settings set -- target.run-args  "bin/console" "doctrine:fixtures:load" "--append" "--no-interaction" "--fixtures=app/fixtures"
(lldb) run
Process 11978 launched: '/usr/local/bin/php' (x86_64)
  > loading [1] App\Fixtures\UserFixture
Process 11978 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1a)
    frame #0: 0x00007fff205cadc6 libsystem_c.dylib`strtoll_l + 77
libsystem_c.dylib`strtoll_l:
->  0x7fff205cadc6 <+77>: movb   (%rbx), %sil
    0x7fff205cadc9 <+80>: movzbl %sil, %eax
    0x7fff205cadcd <+84>: testb  %al, %al
    0x7fff205cadcf <+86>: js     0x7fff205cadd8            ; <+95>
Target 0: (php) stopped.
(lldb) exit
```

Thank you for your help.

Test script:
---------------
➜ php bin/console doctrine:fixtures:load --append --no-interaction --fixtures=app/fixture
  > loading [1] App\Fixtures\UserFixture

Expected result:
----------------
It should works without segmentation fault.

Actual result:
--------------
Segmentation fault: 11

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-05-03 10:51 UTC] mark dot roeling at cordeo dot com
(since the voting seems to have a bug as well)

Yes, encountering same/similar issue since upgrade to php8.0.5 this morning, on Ubuntu 18.04.5 using ppa:ondrej/php for php and nginx.

I tried to use apport-retrace to retrieve additional information:


Reading symbols from /usr/sbin/php-fpm8.0...(no debugging symbols found)...done.
[New LWP 17091]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `php-fpm: pool www                                                            '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __GI_____strtol_l_internal (nptr=0x18 <error: Cannot access memory at address 0x18>, endptr=0x0, base=10, group=<optimized out>, loc=0x7f975972a560 <_nl_global_locale>) at ../stdlib/strtol_l.c:292
292	../stdlib/strtol_l.c: Bestand of map bestaat niet.

(last line translates to: File or folder doesn't exist)


Similar errors occur on MacOS and Ubuntu server (18.04.5) as well.

[03-May-2021 12:07:55] WARNING: [pool **EDITED-appname**] child 99 exited on signal 11 (SIGSEGV) after 671.400078 seconds from start
 [2021-05-03 10:52 UTC] nikic@php.net
Do you use postgres?
 [2021-05-03 10:56 UTC] sulcmil at gmail dot com
Yes, I use Postgres.
 [2021-05-03 10:57 UTC] nikic@php.net
Specifically, the strol in the backtrace makes me think that this may be caused by https://github.com/php/php-src/pull/6801. The involvement of Doctrine also points to something database related.

Due to the referenced change, binding a null value with PDO::PARAM_INT using PDO PgSql can lead to a segfault.
 [2021-05-03 11:23 UTC] mark dot roeling at cordeo dot com
Yes, postgres and Doctrine here as well. 

Links point to probably related issue: https://bugs.php.net/bug.php?id=81002
Seems that the change in pdo_pgsql will be reverted in upcoming 8.0.6 version.
 [2021-05-03 12:20 UTC] nikic@php.net
Yes, the change has already been reverted from both 7.4 and 8.0, though it's still a while until the next releases are planned.

The change has also been reverted from ondrej/php just now (see https://github.com/oerdnj/deb.sury.org/issues/1598), so you may be able to fetch a fixed version from there soon.
 [2021-05-04 20:48 UTC] mehdi dot bounya at gmail dot com
Facing the same issue when loading fixtures in a postgres database.

https://github.com/hautelook/AliceBundle/issues/540
 [2021-05-11 06:41 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2021-05-11 06:41 UTC] krakjoe@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at
http://www.php.net/downloads.php


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 08:02:42 2024 UTC