Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault on PHP 8.0.1 #93

Closed
Ethorsen opened this issue Jan 20, 2021 · 2 comments
Closed

Segmentation fault on PHP 8.0.1 #93

Ethorsen opened this issue Jan 20, 2021 · 2 comments

Comments

@Ethorsen
Copy link

Ethorsen commented Jan 20, 2021

Hi,

Simply pulled and compiled the latest branch. As soon as I enable uv.so, php is throwing segmentation fault.

System

#cat /etc/*release*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"

PHP Version

#php -v
PHP 8.0.1 (cli) (built: Jan 13 2021 08:22:35) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.1, Copyright (c) Zend Technologies

Core dump

#gdb /usr/bin/php core-php.3841128
Reading symbols from /usr/bin/php...
(No debugging symbols found in /usr/bin/php)

warning: core file may not match specified executable file.
[New LWP 3841128]
[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'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  zm_startup_uv (type=<optimized out>, module_number=<optimized out>)
    at /home/www/deps/php-uv/php_uv.c:2782
2782					socket_ce = *socket_ce_ptr;
(gdb) bt
#0  zm_startup_uv (type=<optimized out>, module_number=<optimized out>)
    at /home/www/deps/php-uv/php_uv.c:2782
#1  0x000056301dc601d8 in zend_startup_module_ex ()
#2  0x000056301dc60270 in ?? ()
#3  0x000056301dc6d4eb in zend_hash_apply ()
#4  0x000056301dbfa366 in php_module_startup ()
#5  0x000056301dcec9f1 in ?? ()
#6  0x000056301dab0fc3 in ?? ()
#7  0x00007f4ec90e80b3 in __libc_start_main (main=0x56301dab0e20, argc=1, argv=0x7ffef190ec18, 
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffef190ec08)
    at ../csu/libc-start.c:308
#8  0x000056301dab13ce in _start ()
(gdb)
@bwoebi
Copy link
Member

bwoebi commented Jan 21, 2021

If you revert the latest commit, does it work again then?

@Ethorsen
Copy link
Author

Actually yes it does.

commit 444acfb fixes #85 (arginfo)

All is well

TheTechsTech added a commit to symplely/ext-uv that referenced this issue Mar 30, 2023
**In reference to:** amphp#106, amphp#107, amphp#94, amphp#98, amphp#93, amphp#92, amphp#86, amphp#84, amphp#82, amphp#64

- BC signature changes has been revert since some of the tests wasn't changed to match, and too far off original design.
- Using current **Libuv** version or systems installed one, not `pecl`, this setup is not reliant on the really slow `pecl` system for updated installations.

The whole `uv_queue_work()` will need to be re implemented, the core internal `TSRM.c` thread related `tsrm_***_interpreter_context` functions used in PHP 7.4 has been removed since PHP 8.0.
TheTechsTech added a commit to symplely/ext-uv that referenced this issue Apr 4, 2023
- Linux tests pass as is, Windows after callback not executed and segfaults still.

In reference to issues: amphp#83, amphp#93, amphp#64
@trowski trowski closed this as completed Jun 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants