Closed enumag closed 3 years ago
What I find curious is that the problem is gone if I remove
docker-php-ext-install sockets
. Does it mean that ext-uv is incompatible with ext-sockets or something?
It might be issue with just docker-php-ext-install
you are using, cause ext-uv requires the socket to be enabled to work.
I have travis ci building the extension on tests, using somewhat the same steps you have.
Nah, that part is fine. docker-php-ext-install
does enable the extension. It's not a priority issue either. Sockets extension is in the configuration sooner than uv.
Sockets extension is in the configuration sooner than uv.
Yes, on default PHP Linux system installs, not so with Windows, needs php.ini changes.
I have auto build setups for the following systems without issue:
For Debian like distributions, Ubuntu...
apt-get install libuv1-dev php-pear -y
For RedHat like distributions, CentOS...
yum install libuv-devel php-pear -y
Now have Pecl auto compile, install, and setup.
pecl channel-update pecl.php.net
pecl install uv-beta
Might be an Alpine-specific issue then. I didn't have any problems with ext-uv on Ubuntu either.
It might just be an general issue with PHP ZTS versions, after reading thru some of the other issues posted.
I have been testing uv_spawn
with a wrapper for it, and getting segmentation faults/stalls or the build would pass, but then fail/error the build on code coverage creation.
This would not happen with the NTS, just ZTS.
@techno-express I tried again with NTS, the segfault still happens so it's not a ZTS problem. I've updated the Dockerfile in the first post accordingly.
I managed to get backtrace:
Program received signal SIGSEGV, Segmentation fault.
0x00007fe98602bce6 in zm_startup_uv (type=<optimized out>,
module_number=<optimized out>) at /tmp/pear/temp/uv/php_uv.c:2679
2679 /tmp/pear/temp/uv/php_uv.c: No such file or directory.
(gdb) bt
#0 0x00007fe98602bce6 in zm_startup_uv (type=<optimized out>,
module_number=<optimized out>) at /tmp/pear/temp/uv/php_uv.c:2679
#1 0x0000563cad879a17 in zend_startup_module_ex ()
#2 0x0000563cad879aac in zend_startup_module_zval ()
#3 0x0000563cad886c02 in zend_hash_apply ()
#4 0x0000563cad879d8a in zend_startup_modules ()
#5 0x0000563cad817ac6 in php_module_startup ()
#6 0x0000563cad8fcebd in php_cli_startup ()
#7 0x0000563cad5c5425 in main ()
I simplified the Dockerfile to this:
ARG PHP_VERSION=7.4
FROM wodby/base-php:${PHP_VERSION}-debug
RUN apk add --no-cache libuv-dev ${PHPIZE_DEPS} && \
docker-php-ext-install sockets && \
pecl install uv-beta && \
docker-php-ext-enable uv
RUN apk add --no-cache libuv gdb
and then:
docker build .
docker run -it <image> sh
gdb php
run
bt
@bwoebi Is this enough for you to fix it?
Any news on this?
Note: I simplified the Dockerfile as much as possible. The segfault still happens.
Do you have the same issue with on non-alpine base, docker images? There is a reason why Alpine Linux sizes are so. The build, the tooling and everything based on musl libc https://musl.libc.org/ and Busybox http://busybox.net/.
Might be a issue it can't resolve by not being glibc
base.
Yeah, this seems to be an alpine-specific issue. No other PHP extensions have any problem with it though and I'm using quite a few.
bump
Any news on this?
ping @bwoebi
Thanks @bwoebi! Would you mind releasing v0.2.3 with fixes like this one? There is a lot of unreleased ones. v0.3 might take a while to finish and afaik changes the API as well so it would be best to have a fixed 0.2 version available.
When I added ext-uv into my Dockerfile I started getting a segfault. I then simplified my Dockerfile as much as possible to give you a reproducer.
What I find curious is that the problem is gone if I remove
docker-php-ext-install sockets
. Does it mean that ext-uv is incompatible with ext-sockets or something?Anyway here is the Dockerfile: