php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70202 Random segfault when using some session function
Submitted: 2015-08-06 12:18 UTC Modified: 2015-10-20 13:05 UTC
From: nicolas dot grekas+php at gmail dot com Assigned:
Status: Closed Package: Session related
PHP Version: 7.0Git-2015-08-06 (snap) OS:
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nicolas dot grekas+php at gmail dot com
New email:
PHP Version: OS:

 

 [2015-08-06 12:18 UTC] nicolas dot grekas+php at gmail dot com
Description:
------------
The Symfony test suite makes PHP7 segfault on Travis (see https://travis-ci.org/symfony/symfony/jobs/74375675#L1189)

On my local laptop, I can reproduce this segfault occasionally:

git clone git@github.com:symfony/symfony.git
cd symfony
composer install

then repeat the following until the segfault occurs:
php7 `which phpunit` --filter LegacyDefaultCsrfProviderTest::testGenerateCsrfToken src/Symfony/Component/Form/

There are other tests that fail from time to time, but it seems they all use the session functions.

I'm sorry to not have a better reproducer.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-08-06 20:34 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2015-08-06 20:34 UTC] ab@php.net
Could you please post a bt?

Thanks.
 [2015-08-07 08:57 UTC] nicolas dot grekas+php at gmail dot com
gdb .../php-src/sapi/cli/php core 
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 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".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from .../php-src/sapi/cli/php...done.
[New LWP 25774]
Core was generated by `.../php-src/sapi/cli/php'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007f07a2875cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56	../nptl/sysdeps/unix/sysv/linux/raise.c: Aucun fichier ou dossier de ce type.
(gdb) where
#0  0x00007f07a2875cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007f07a28790d8 in __GI_abort () at abort.c:89
#2  0x00007f07a286eb86 in __assert_fail_base (fmt=0x7f07a29bf830 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=assertion@entry=0xd41f78 "((zend_refcounted*)(arr))->refcount <= 1", 
    file=file@entry=0xd41f40 ".../php-src/Zend/zend_variables.c", line=line@entry=42, 
    function=function@entry=0xd42070 <__PRETTY_FUNCTION__.8747> "_zval_dtor_func") at assert.c:92
#3  0x00007f07a286ec32 in __GI___assert_fail (assertion=0xd41f78 "((zend_refcounted*)(arr))->refcount <= 1", 
    file=0xd41f40 ".../php-src/Zend/zend_variables.c", line=42, 
    function=0xd42070 <__PRETTY_FUNCTION__.8747> "_zval_dtor_func") at assert.c:101
#4  0x000000000082cbcb in _zval_dtor_func (p=0x7f07a228a070, 
    __zend_filename=0xd3ede8 ".../php-src/Zend/zend_constants.c", __zend_lineno=36)
    at .../php-src/Zend/zend_variables.c:42
#5  0x0000000000814225 in _zval_dtor (zvalue=0x7f07a2283f40, 
    __zend_filename=0xd3ede8 ".../php-src/Zend/zend_constants.c", __zend_lineno=36)
    at .../php-src/Zend/zend_variables.h:43
#6  0x0000000000814336 in free_zend_constant (zv=0x7ffc17b55750) at .../php-src/Zend/zend_constants.c:36
#7  0x0000000000844a99 in _zend_hash_del_el_ex (ht=0x1340c30, idx=832, p=0x141f740, prev=0x0)
    at .../php-src/Zend/zend_hash.c:935
#8  0x0000000000844b7f in _zend_hash_del_el (ht=0x1340c30, idx=832, p=0x141f740)
    at .../php-src/Zend/zend_hash.c:959
#9  0x000000000084639b in zend_hash_reverse_apply (ht=0x1340c30, apply_func=0x8144c6 <clean_non_persistent_constant>)
    at .../php-src/Zend/zend_hash.c:1532
#10 0x000000000081495e in clean_non_persistent_constants () at .../php-src/Zend/zend_constants.c:161
#11 0x0000000000817707 in shutdown_executor () at .../php-src/Zend/zend_execute_API.c:377
#12 0x000000000082f4f7 in zend_deactivate () at .../php-src/Zend/zend.c:969
#13 0x000000000079b2f3 in php_request_shutdown (dummy=0x0) at .../php-src/main/main.c:1814
#14 0x00000000008ef3e5 in do_cli (argc=1, argv=0x13407f0) at .../php-src/sapi/cli/php_cli.c:1139
#15 0x00000000008efc5a in main (argc=1, argv=0x13407f0) at .../php-src/sapi/cli/php_cli.c:1338
 [2015-08-10 09:15 UTC] nicolas dot grekas+php at gmail dot com
-Status: Feedback +Status: Open
 [2015-08-10 09:15 UTC] nicolas dot grekas+php at gmail dot com
See bc above
 [2015-10-20 13:05 UTC] nicolas dot grekas+php at gmail dot com
-Status: Open +Status: Closed
 [2015-10-20 13:05 UTC] nicolas dot grekas+php at gmail dot com
Does not happen anymore
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 22:01:27 2024 UTC