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

[0.2.3] segfault in test suite #66

Closed
remicollet opened this issue Apr 29, 2019 · 7 comments
Closed

[0.2.3] segfault in test suite #66

remicollet opened this issue Apr 29, 2019 · 7 comments

Comments

@remicollet
Copy link
Contributor

remicollet commented Apr 29, 2019

With PHP 7.0 to 7.3 and libuv 1.27.0 (or latest 1.28.0)

TEST 25/52 [tests/320-fs-poll.phpt]
========DIFF========
001+ OKOKOKOKOKphp: src/unix/core.c:210: uv__make_close_pending: Assertion `handle->flags & UV_HANDLE_CLOSING' failed.
001- OKOKOKOKOK
002+ 
003+ Termsig=6
========DONE========
FAIL Check for fs poll [tests/320-fs-poll.phpt] 

@remicollet
Copy link
Contributor Author

#0  0x00007ffff72d557f in raise () from /lib64/libc.so.6
#1  0x00007ffff72bf895 in abort () from /lib64/libc.so.6
#2  0x00007ffff72bf769 in __assert_fail_base.cold.0 () from /lib64/libc.so.6
#3  0x00007ffff72cda26 in __assert_fail () from /lib64/libc.so.6
#4  0x00007ffff70d374d in uv.make_close_pending () from /lib64/libuv.so.1
#5  0x00007ffff70cd430 in ?? () from /lib64/libuv.so.1
#6  0x00007ffff70d3b65 in uv_run () from /lib64/libuv.so.1
#7  0x00007ffff7fb1917 in zif_uv_run (execute_data=<optimized out>, return_value=<optimized out>) at /work/GIT/pecl-and-ext/uv/php_uv.c:3494
#8  0x00005555558a9e3d in ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER () at /usr/src/debug/php-7.2.17-1.fc29.remi.x86_64/Zend/zend_vm_execute.h:573
#9  execute_ex (ex=0x2) at /usr/src/debug/php-7.2.17-1.fc29.remi.x86_64/Zend/zend_vm_execute.h:59747
#10 0x00005555558b2a06 in zend_execute (op_array=0x7ffff6e75460, op_array@entry=0x7ffff6e92580, return_value=return_value@entry=0x7ffff6e1d030)
    at /usr/src/debug/php-7.2.17-1.fc29.remi.x86_64/Zend/zend_vm_execute.h:63776
#11 0x000055555580ca5b in zend_execute_scripts (type=type@entry=8, retval=0x7ffff6e1d030, retval@entry=0x0, file_count=file_count@entry=3)
    at /usr/src/debug/php-7.2.17-1.fc29.remi.x86_64/Zend/zend.c:1498
#12 0x00005555557a8190 in php_execute_script (primary_file=<optimized out>) at /usr/src/debug/php-7.2.17-1.fc29.remi.x86_64/main/main.c:2594
#13 0x00005555558b4fe0 in do_cli (argc=64, argv=0x555555a4c0f0) at /usr/src/debug/php-7.2.17-1.fc29.remi.x86_64/sapi/cli/php_cli.c:1011
#14 0x0000555555661c12 in main (argc=64, argv=0x555555a4c0f0) at /usr/src/debug/php-7.2.17-1.fc29.remi.x86_64/sapi/cli/php_cli.c:1403

@remicollet
Copy link
Contributor Author

Another segfault in ZTS mode

========DIFF========
001+ Found blacklisted module: ionCube Loader, disabling conflicting functionality
002+ hellosh : ligne 1 : 20141 Erreur de segmentation  (core dumped)/usr/bin/zts-php /work/GIT/pecl-and-ext/uv/tests/fixtures/proc.php 2>&1
003+ 
001- hello
========DONE========

@remicollet
Copy link
Contributor Author

For the second test, I notice sub-process is not launch with proper arg


--- a/tests/330-poll-pipe.phpt
+++ b/tests/330-poll-pipe.phpt
@@ -2,7 +2,8 @@
 Check poll of a pipe works
 --FILE--
 <?php
-$fd = popen(PHP_BINARY . " ". __DIR__ . "/fixtures/proc.php 2>&1", "w");
+$php = (getenv('TEST_PHP_EXECUTABLE') ? : PHP_BINARY)  . ' ' . (getenv('TEST_PHP_ARGS') ? : '-n');
+$fd = popen($php . " ". __DIR__ . "/fixtures/proc.php 2>&1", "w");
 stream_set_blocking($fd, 0);
 
 $loop = uv_loop_new();

@remicollet
Copy link
Contributor Author

remicollet commented Apr 29, 2019

Works fine with libuv 1.26.0, so may be a regression in recent version

I've notified the Fedora package maintainer, https://bugzilla.redhat.com/1703935

(notice: the second segfault with ionCube Loader is still present)

@remicollet
Copy link
Contributor Author

Also reported as libuv/libuv#2287

@bwoebi
Copy link
Member

bwoebi commented May 3, 2019

@remicollet Thanks a lot for reporting, looks like it indeed is an upstream bug. Let's see whether they have a workaround...

@remicollet
Copy link
Contributor Author

@bwoebi fedora /EPEL packages now includes the fix from libuv/libuv#2288 and the test suite passes without segfault.

@bwoebi bwoebi closed this as completed Jul 13, 2019
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

2 participants