php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81674 Segmentation fault when running composer
Submitted: 2021-11-30 08:03 UTC Modified: 2024-07-28 04:22 UTC
Votes:18
Avg. Score:4.5 ± 0.8
Reproduced:16 of 16 (100.0%)
Same Version:11 (68.8%)
Same OS:3 (18.8%)
From: patrick at heppler dot net Assigned: cmb (profile)
Status: No Feedback Package: *General Issues
PHP Version: 8.1.0 OS: Red Hat 8.5
Private report: No CVE-ID: None
 [2021-11-30 08:03 UTC] patrick at heppler dot net
Description:
------------
Running composer fails with "Segmentation fault (core dumped)"

Test script:
---------------
composer create-project laravel/laravel test

Output of composer diagnose:

Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: Segmentation fault (core dumped)

Output of composer create-project laravel/laravel test -vvv:

Running 2.1.12 (2021-11-09 16:02:04) with PHP 8.1.0 on Linux / 4.18.0-348.2.1.el8_5.x86_64
Reading ./composer.json (/usr/share/nginx/html/composer.json)
Loading config file ./composer.json (/usr/share/nginx/html/composer.json)
Checked CA file /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem: valid
Executing command (/usr/share/nginx/html): git branch -a --no-color --no-abbrev -v
Executing command (/usr/share/nginx/html): git describe --exact-match --tags
Executing command (CWD): git --version
Executing command (/usr/share/nginx/html): git log --pretty="%H" -n1 HEAD --no-show-signature
Executing command (/usr/share/nginx/html): hg branch
Executing command (/usr/share/nginx/html): fossil branch list
Executing command (/usr/share/nginx/html): fossil tag list
Executing command (/usr/share/nginx/html): svn info --xml
Failed to initialize global composer: Composer could not find the config file: /root/.config/composer/composer.json

Creating a "laravel/laravel" project at "./test"
Executing command (/usr/share/nginx/html): git branch -a --no-color --no-abbrev -v
Executing command (/usr/share/nginx/html): git describe --exact-match --tags
Executing command (/usr/share/nginx/html): git log --pretty="%H" -n1 HEAD --no-show-signature
Executing command (/usr/share/nginx/html): hg branch
Executing command (/usr/share/nginx/html): fossil branch list
Executing command (/usr/share/nginx/html): fossil tag list
Executing command (/usr/share/nginx/html): svn info --xml
Failed to initialize global composer: Composer could not find the config file: /root/.config/composer/composer.json

Downloading https://repo.packagist.org/packages.json
Segmentation fault (core dumped)


Expected result:
----------------
composer creating a new Laravel Project in test


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-11-30 09:18 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2021-11-30 09:18 UTC] requinix@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2021-12-01 08:05 UTC] patrick at heppler dot net
-Status: Feedback +Status: Open
 [2021-12-01 08:05 UTC] patrick at heppler dot net
This is my first time using gdb, so I'm not sure if this is the right output:
 
GNU gdb (GDB) Red Hat Enterprise Linux 8.2-16.el8
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/php...Reading symbols from /usr/lib/debug/usr/bin/php-8.1.0-1.el8.remi.x86_64.debug...done.
done.

warning: Can't open file (null) during file-backed mapping note processing
[New LWP 28247]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `php /usr/local/bin/composer create-project laravel/laravel test'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  zend_gc_delref (p=0x696c41746f6f5274) at /usr/src/debug/php-8.1.0-1.el8.remi.x86_64/Zend/zend_types.h:1203
1203            return --(p->refcount);
(gdb) bt
#0  zend_gc_delref (p=0x696c41746f6f5274) at /usr/src/debug/php-8.1.0-1.el8.remi.x86_64/Zend/zend_types.h:1203
#1  i_zval_ptr_dtor (zval_ptr=<optimized out>) at /usr/src/debug/php-8.1.0-1.el8.remi.x86_64/Zend/zend_variables.h:43
#2  zval_ptr_dtor (zval_ptr=<optimized out>) at /usr/src/debug/php-8.1.0-1.el8.remi.x86_64/Zend/zend_variables.c:84
#3  0x00007ff006aca179 in _php_curl_verify_handlers (ch=ch@entry=0x7feffb3a5890, reporterror=reporterror@entry=1) at /usr/src/debug/php-8.1.0-1.el8.remi.x86_64/ext/curl/interface.c:146
#4  0x00007ff006acbf5c in zif_curl_multi_add_handle (execute_data=0x7ff007a1be40, return_value=0x7ff007a1bc70) at /usr/src/debug/php-8.1.0-1.el8.remi.x86_64/ext/curl/multi.c:91
#5  0x000055f008d33efd in ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php-8.1.0-1.el8.remi.x86_64/Zend/zend_vm_execute.h:1558
#6  execute_ex (ex=0x696c41746f6f5274) at /usr/src/debug/php-8.1.0-1.el8.remi.x86_64/Zend/zend_vm_execute.h:54543
#7  0x000055f008d3588c in zend_execute (op_array=0x7ff007a74100, return_value=0x0) at /usr/src/debug/php-8.1.0-1.el8.remi.x86_64/Zend/zend_vm_execute.h:58882
#8  0x000055f008cc5f25 in zend_execute_scripts (type=type@entry=8, retval=retval@entry=0x0, file_count=file_count@entry=3) at /usr/src/debug/php-8.1.0-1.el8.remi.x86_64/Zend/zend.c:1761
#9  0x000055f008c6144a in php_execute_script (primary_file=<optimized out>) at /usr/src/debug/php-8.1.0-1.el8.remi.x86_64/main/main.c:2534
#10 0x000055f008dadea1 in do_cli (argc=5, argv=0x55f009f40820) at /usr/src/debug/php-8.1.0-1.el8.remi.x86_64/sapi/cli/php_cli.c:965
#11 0x000055f008b11bf3 in main (argc=5, argv=0x55f009f40820) at /usr/src/debug/php-8.1.0-1.el8.remi.x86_64/sapi/cli/php_cli.c:1367
 [2024-07-19 19:52 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2024-07-19 19:52 UTC] cmb@php.net
Is that still an issue with any of the actively supported PHP
versions[1]?

[1] <https://www.php.net/supported-versions>
 [2024-07-28 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: Tue Oct 15 02:01:27 2024 UTC