Edit report at https://bugs.php.net/bug.php?id=71709&edit=1

 ID:                 71709
 Comment by:         klaus dot keppler at gmail dot com
 Reported by:        kspen72 at gmail dot com
 Summary:            make test ext/curl/tests/curl_setopt_basic003.phpt
                     never completes
 Status:             Feedback
 Type:               Bug
 Package:            Testing related
 Operating System:   Debian 3.2.73-2+deb7u2 x86_64
 PHP Version:        7.0.4
 Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

Ok, bug is 100% reproducible on Debian 7.11 with curl 7.26.0-1+wheezy13 and PHP 
7.0.8
Running the test script within the build tree triggers the segmentation fault.

We have two independent problems:
1.) if a single test crashes, the "make test" environment shouldn't stop. I 
don't know the details of the test system, but it looks like a SIGCHLD is not 
catched properly, leading to a zombie child.

2.) there's a bug/problem in the CURL module. I've pasted the detailed GDB 
output and backtrace below.

Best regards

   -Klaus


kk@debian7-amd64-build:/usr/src/php/php-7.0.8$ gdb sapi/cli/php
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 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-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/src/php/php-7.0.8/sapi/cli/php...done.
(gdb) run ext/curl/tests/curl_setopt_basic003.phpt
Starting program: /usr/src/php/php-7.0.8/sapi/cli/php 
ext/curl/tests/curl_setopt_basic003.phpt
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
--TEST--
curl_setopt() call with CURLOPT_HTTPHEADER
--CREDITS--
Paul Sohier
#phptestfest utrecht
--SKIPIF--
--FILE--
*** curl_setopt() call with CURLOPT_HTTPHEADER
bool(false)

Program received signal SIGSEGV, Segmentation fault.
_zval_ptr_dtor (zval_ptr=0x4) at 
/usr/src/php/php-7.0.8/Zend/zend_execute_API.c:533
533             i_zval_ptr_dtor(zval_ptr ZEND_FILE_LINE_RELAY_CC);
(gdb) bt
#0  _zval_ptr_dtor (zval_ptr=0x4) at 
/usr/src/php/php-7.0.8/Zend/zend_execute_API.c:533
#1  0x00007ffff3d9e305 in _php_curl_setopt (ch=0x7ffff485c8c0, 
option=<optimized out>,
    zvalue=0x7ffff48132c0) at /usr/src/php/php-7.0.8/ext/curl/interface.c:2822
#2  0x00007ffff3d9f084 in zif_curl_setopt (execute_data=<optimized out>, 
return_value=0x7ffff48131d0)
    at /usr/src/php/php-7.0.8/ext/curl/interface.c:2984
#3  0x00000000006ef062 in ZEND_DO_ICALL_SPEC_HANDLER 
(execute_data=0x7ffff4813030)
    at /usr/src/php/php-7.0.8/Zend/zend_vm_execute.h:586
#4  0x00000000006dfb20 in execute_ex (ex=<optimized out>)
    at /usr/src/php/php-7.0.8/Zend/zend_vm_execute.h:417
#5  0x0000000000730517 in zend_execute (op_array=op_array@entry=0x7ffff487c000,
    return_value=return_value@entry=0x0) at 
/usr/src/php/php-7.0.8/Zend/zend_vm_execute.h:458
#6  0x00000000006a1ea4 in zend_execute_scripts (type=type@entry=8, 
retval=retval@entry=0x0,
    file_count=file_count@entry=3) at /usr/src/php/php-7.0.8/Zend/zend.c:1427
#7  0x0000000000643ab0 in php_execute_script 
(primary_file=primary_file@entry=0x7fffffffd8a0)
    at /usr/src/php/php-7.0.8/main/main.c:2494
#8  0x0000000000732000 in do_cli (argc=2, argv=0xf5f3a0)
    at /usr/src/php/php-7.0.8/sapi/cli/php_cli.c:974
#9  0x000000000043a66c in main (argc=2, argv=0xf5f3a0) at 
/usr/src/php/php-7.0.8/sapi/cli/php_cli.c:1344
(gdb)


Previous Comments:
------------------------------------------------------------------------
[2016-06-24 12:05:47] c...@php.net

Please try the attached 71709.patch.

------------------------------------------------------------------------
[2016-06-24 12:05:00] c...@php.net

The following patch has been added/updated:

Patch Name: 71709.patch
Revision:   1466769900
URL:        
https://bugs.php.net/patch-display.php?bug=71709&patch=71709.patch&revision=1466769900

------------------------------------------------------------------------
[2016-06-24 11:43:41] klaus dot keppler at gmail dot com

Can confirm this, too.
Only happens when building PHP 7.x on Debian 7.
Same build parameters work fine on Debian 8.
(XEN domU, 64bit)

When this test is hit, a segmentation fault is written to syslog:

[11039555.163908] php[15573]: segfault at d ip 00000000006929e0 sp 
00007fff9cfe1638 error 4 in php[400000+89e000]

The shell instance around the test script remains as a zombie in the process 
list. This effectively "stops" all further tests.

However, this bug isn't always triggered; sometimes the tests run ok.
(I guess in about 50% the "make test" hangs)

So I assume that there's a timing problem...?

------------------------------------------------------------------------
[2016-04-21 13:34:17] j dot starke at meeva dot de

+1 for PHP 7.0.5 and Debian 7.10

Stays on TEST 3053/13186 [ext/curl/tests/curl_setopt_basic003.phpt]
for 12+ Hours.

Configure: ./configure --prefix=/opt/php7 --with-openssl --with-zlib 
--enable-bcmath --with-bz2 --with-curl --enable-exif --enable-ftp --with-gd 
--with-gettext --with-imap --with-imap-ssl --enable-intl --enable-mbstring 
--with-mcrypt --with-mysqli --with-pdo-mysql --with-pspell --with-readline 
--enable-soap --enable-sockets --enable-zip --with-pear --with-kerberos
OS: Debian 3.2.68-1+deb7u6 x86_64

------------------------------------------------------------------------
[2016-04-20 14:51:28] kspen72 at gmail dot com

Just FYI, didn't have this problem on same server with 7.0.5.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=71709


--
Edit this bug report at https://bugs.php.net/bug.php?id=71709&edit=1

-- 
PHP Quality Assurance Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to