php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73667 Segfault when using phpunit with large test suites
Submitted: 2016-12-06 10:24 UTC Modified: 2017-11-05 04:22 UTC
From: ilya at antipenko dot pp dot ua Assigned:
Status: No Feedback Package: Reflection related
PHP Version: 7.0.13 OS: Ubuntu 14.04.5/12.04
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ilya at antipenko dot pp dot ua
New email:
PHP Version: OS:

 

 [2016-12-06 10:24 UTC] ilya at antipenko dot pp dot ua
Description:
------------
Hello.

I'm getting this segfault on travis-ci (php 7.0.13) when I run unit tests (phpunit 4.8/5.2).
Unfortunately, it's a private repo and I can't reproduce this segfault with synthetic test.

Also, this segfault disappears after using additional phpunit options (like --testdox)

Also, we are using https://github.com/mybuilder/phpunit-accelerator/blob/master/src/TestListener.php#L46 to cleanup test after it finished. Probably, it can cause lots of reflection usages which causes memory corruption.

I know, there is a bit of information, but I hope we can found and fix it together.

$ php --version
PHP 7.0.13 (cli) (built: Nov 22 2016 16:40:26) ( ZTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies

Actual result:
--------------
(gdb) bt
#0  zend_mm_alloc_small (bin_num=<optimized out>, heap=<optimized out>, size=<optimized out>) at /tmp/php-build/source/7.0.13/Zend/zend_alloc.c:1295
#1  _emalloc_56 () at /tmp/php-build/source/7.0.13/Zend/zend_alloc.c:2369
#2  0x00000000009495b2 in ZEND_INIT_ARRAY_SPEC_CV_UNUSED_HANDLER (execute_data=0x7fffee01c1a0) at /tmp/php-build/source/7.0.13/Zend/zend_vm_execute.h:35034
#3  0x00000000009152a0 in execute_ex (ex=<optimized out>) at /tmp/php-build/source/7.0.13/Zend/zend_vm_execute.h:417
#4  0x00000000008c2ea0 in zend_call_function (fci=0x7fffffff9bf0, fci_cache=0x7fffffff9c40) at /tmp/php-build/source/7.0.13/Zend/zend_execute_API.c:858
#5  0x000000000071413b in zim_reflection_method_invokeArgs (execute_data=<optimized out>, return_value=0x7fffee019d20) at /tmp/php-build/source/7.0.13/ext/reflection/php_reflection.c:3346
#6  0x000000000095de47 in ZEND_DO_FCALL_SPEC_HANDLER (execute_data=0x7fffee019b50) at /tmp/php-build/source/7.0.13/Zend/zend_vm_execute.h:842
#7  0x00000000009152a0 in execute_ex (ex=<optimized out>) at /tmp/php-build/source/7.0.13/Zend/zend_vm_execute.h:417
#8  0x000000000096d967 in zend_execute (op_array=<optimized out>, return_value=<optimized out>) at /tmp/php-build/source/7.0.13/Zend/zend_vm_execute.h:458
#9  0x00000000008d27a4 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /tmp/php-build/source/7.0.13/Zend/zend.c:1427
#10 0x0000000000865576 in php_execute_script (primary_file=0x7fffffffc1c0) at /tmp/php-build/source/7.0.13/main/main.c:2494
#11 0x000000000096f6ce in do_cli (argc=7, argv=0x12740d0) at /tmp/php-build/source/7.0.13/sapi/cli/php_cli.c:974
#12 0x00000000004545f5 in main (argc=7, argv=0x12740d0) at /tmp/php-build/source/7.0.13/sapi/cli/php_cli.c:1344
(gdb) 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-07 02:54 UTC] laruence@php.net
any chance you could give me a ssh access to a reproducible box? (via mail)

thanks
 [2017-09-13 17:36 UTC] cmb@php.net
-Status: Open +Status: Feedback
 [2017-09-13 17:36 UTC] cmb@php.net
> I know, there is a bit of information, but I hope we can found
> and fix it together.

Then please consider to accept @laruence's offer (not sure if it's
still valid, though).
 [2017-11-05 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: Thu Mar 28 20:01:28 2024 UTC