Symfony 4 - segmentaion fault 11

Hi, I’ve been having issues with Homebrew PHP installs (macOS 10.14.5). Getting segmentation fault 11 errors when running Symfony 4 CLI . I tried using php@7.2, php@7.3 (latest), kept getting segfaults. I fixed it by uninstalling Homebrew PHP and using MAMP PHP instead (same version), segfaults where gone. I thought I would leave a note about this in case someone has the same issue.

1 Like

Do you have some way to reproduce this?

I also have the same problem, you can find a crash report here:

https://pastebin.com/4VAnR3d8

and i reproduce it by running:

  • composer create-project symfony/website-skeleton example.com

Then i get the following message:

Loading composer repositories with package information .

Installing dependencies (including require-dev) from lock file
Package operations: 106 installs, 0 updates, 0 removals
- Installing ocramius/package-versions (1.4.0): Loading from cache
- Installing symfony/flex (v1.2.7): Loading from cache
Segmentation fault: 11

Yeah, the current version of curl (that php depends on) seems to have an issue that could cause segfaults. I guess you’ll have to wait for the next version

Ah, that sucks - but thanks for looking into it anyway :slight_smile: . I’ll stick to the max built in php for now then - that seems to be working.

@SMillerDev Thanks for the info.

Same error for me after brew update

Stack trace php@7.2 :

composer update -vvv

Reading ./composer.json
Loading config file /Users/geoffrey/.composer/auth.json
Loading config file ./composer.json
Checked CA file /private/etc/ssl/cert.pem: valid
Executing command (/Users/geoffrey/Sites/myProject): git branch --no-color --no-abbrev -v
Reading /Users/geoffrey/.composer/composer.json
Loading config file /Users/geoffrey/.composer/auth.json
Loading config file /Users/geoffrey/.composer/composer.json
Loading config file /Users/geoffrey/.composer/auth.json
Reading /Users/geoffrey/.composer/auth.json
Reading /Users/geoffrey/Sites/myProject/vendor/composer/installed.json
Reading /Users/geoffrey/.composer/vendor/composer/installed.json
Loading plugin PackageVersions\Installer
Loading plugin Symfony\Flex\Flex
Reading /Users/geoffrey/.composer/cache/repo/httpsβ€”flex.symfony.com/versions.json from cache
Downloading https://flex.symfony.com/versions.json

Composer update stop here

Stack trace php@7.3 :

composer update -vvv

Reading ./composer.json
Loading config file /Users/geoffrey/.composer/auth.json
Loading config file ./composer.json
Checked CA file /private/etc/ssl/cert.pem: valid
Executing command (/Users/geoffrey/Sites/myProject): git branch --no-color --no-abbrev -v
Reading /Users/geoffrey/.composer/composer.json
Loading config file /Users/geoffrey/.composer/auth.json
Loading config file /Users/geoffrey/.composer/composer.json
Loading config file /Users/geoffrey/.composer/auth.json
Reading /Users/geoffrey/.composer/auth.json
Reading /Users/geoffrey/Sites/myProject/vendor/composer/installed.json
Reading /Users/geoffrey/.composer/vendor/composer/installed.json
Loading plugin PackageVersions\Installer
Loading plugin Symfony\Flex\Flex
Reading /Users/geoffrey/.composer/cache/repo/httpsβ€”flex.symfony.com/versions.json from cache
Downloading https://flex.symfony.com/versions.json
Segmentation fault: 11

Composer update stop here

What can I do to fix it ?

Thanks for confirming the known issue, but the answer is still the same

1 Like

Hm, that’s a pretty unsatisfactory answer for a developer who has to work with it on a daily basis. What now? What can we do? Submit for vacation?

However, how can you downgrade curl to a working version?

We do not work for you or your organisation. You are responsible for fixing your issues experienced at work, not us.

In addition to that we don’t work for curl either. If curl is broken it’s not really up to us to fix it. We just package curl

1 Like

@SMillerDev Out of curiosity, I tried with php 7.2 and 7.3 on Docker ( official php Images and same php version as brew 7.2.19 and 7.3.6 ) and it worked.

Does brew build its own php package ?

I’m going to refer everyone who wants to complain about this issue to the already fixed cURL issue for it: https://github.com/curl/curl/issues/3995


Brew builds it’s own PHP package and a lot of the parts underneath it. I don’t think there’s any component in a docker container that’s the same as the stack homebrew uses. Package management is a lot more than β€œwe compile the code of program X and it’ll always work the same way” I inlcuded a list of all dependencies that macOS doesn’t include below to give you an idea of all the possible configuration issues/conflicts that could occur.

php
β”œβ”€β”€ apr
β”œβ”€β”€ apr-util
β”‚   β”œβ”€β”€ apr
β”‚   └── openssl
β”œβ”€β”€ argon2
β”œβ”€β”€ aspell
β”œβ”€β”€ autoconf
β”œβ”€β”€ curl-openssl
β”‚   β”œβ”€β”€ brotli
β”‚   β”œβ”€β”€ c-ares
β”‚   β”œβ”€β”€ libidn
β”‚   β”œβ”€β”€ libmetalink
β”‚   β”œβ”€β”€ libssh2
β”‚   β”‚   └── openssl
β”‚   β”œβ”€β”€ nghttp2
β”‚   β”‚   β”œβ”€β”€ c-ares
β”‚   β”‚   β”œβ”€β”€ jansson
β”‚   β”‚   β”œβ”€β”€ jemalloc
β”‚   β”‚   β”œβ”€β”€ libev
β”‚   β”‚   β”œβ”€β”€ libevent
β”‚   β”‚   β”‚   └── openssl
β”‚   β”‚   └── openssl
β”‚   β”œβ”€β”€ openldap
β”‚   β”‚   └── openssl
β”‚   β”œβ”€β”€ openssl
β”‚   └── rtmpdump
β”‚       └── openssl
β”œβ”€β”€ freetds
β”‚   β”œβ”€β”€ openssl
β”‚   └── unixodbc
β”‚       └── libtool
β”œβ”€β”€ freetype
β”‚   └── libpng
β”œβ”€β”€ gettext
β”œβ”€β”€ glib
β”‚   β”œβ”€β”€ gettext
β”‚   β”œβ”€β”€ libffi
β”‚   β”œβ”€β”€ pcre
β”‚   └── python
β”‚       β”œβ”€β”€ gdbm
β”‚       β”œβ”€β”€ openssl
β”‚       β”œβ”€β”€ readline
β”‚       β”œβ”€β”€ sqlite
β”‚       β”‚   └── readline
β”‚       └── xz
β”œβ”€β”€ gmp
β”œβ”€β”€ icu4c
β”œβ”€β”€ jpeg
β”œβ”€β”€ libpng
β”œβ”€β”€ libpq
β”‚   └── openssl
β”œβ”€β”€ libsodium
β”œβ”€β”€ libzip
β”œβ”€β”€ openldap
β”‚   └── openssl
β”œβ”€β”€ openssl
β”œβ”€β”€ sqlite
β”‚   └── readline
β”œβ”€β”€ tidy-html5
β”œβ”€β”€ unixodbc
β”‚   └── libtool
└── webp
    β”œβ”€β”€ jpeg
    β”œβ”€β”€ libpng
    └── libtiff
        └── jpeg
1 Like

@SMillerDev Thank you for your explanation

For me this solution works: https://github.com/Homebrew/homebrew-core/issues/40812#issuecomment-500197510

1 Like

Yes thanks, these commands worked for me :

brew remove curl-openssl --ignore-dependencies curl-openssl
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/e47f3e2682fa3d8a6ee58ded40718a1326e08a6d/Formula/curl-openssl.rb --from-source
1 Like