php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73286 APCu: 8545 Segmentation fault
Submitted: 2016-10-10 16:01 UTC Modified: 2016-11-18 20:56 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: daniel at handbuilt dot co Assigned:
Status: Re-Opened Package: APC (PECL)
PHP Version: 7.0.11 OS: Ubuntu 12.04.5 LTS
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2016-10-10 16:01 UTC] daniel at handbuilt dot co
Description:
------------
I'm seeing a segmentation fault when using APCu 5.1.6 with PHP 7.0.11, The segmentation fault doesn't occur with APCu 5.1.5.

The specific result I see is:

/home/travis/build.sh: line 48:  8454 Segmentation fault      (core dumped) phpunit

Here's the failed job: https://travis-ci.org/lcache/wp-lcache/jobs/165796240#L564

Here's the corresponding discussion with Travis CI: https://github.com/travis-ci/travis-ci/issues/6687


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-10-10 16:12 UTC] kalle@php.net
-Status: Open +Status: Wont fix
 [2016-10-10 16:12 UTC] kalle@php.net
I'm sorry but APC is no longer in active development in favor of opcache that comes with PHP, if you want the usercache, then APCu is the way to go, sorry!
 [2016-10-11 09:09 UTC] ab@php.net
-Status: Wont fix +Status: Re-Opened
 [2016-10-11 09:09 UTC] ab@php.net
This report is about APCu, actually :)

Thanks.
 [2016-10-12 09:25 UTC] contact at raymondbakker dot com
Got similar results on a developer environment with PHP 7.0.11 and APCu 5.1.6.

Downgraded to PHP 7.0.10 and the problem was gone because it uses APCu 5.1.5.

For me the segmentation fault was caused by the usage of apcu_inc() in a script, though when I tested the function seperately it worked fine.
 [2016-10-12 15:02 UTC] kalle@php.net
@ab ahh my bad then, I think we need a separate category for APCu then
 [2016-10-13 12:40 UTC] marc at mabe dot berlin
zend-cache has the same segmentation fault on Travis with apcu-5.1.6
and I can reproduce it locally with PHP 7.0.8-0ubuntu0.16.04.3 (cli) ( NTS )

This is my core dump and how I got it:
$ /usr/bin/php ./vendor/bin/phpunit test/Storage/Adapter/ApcuTest.php
PHPUnit 4.8.26 by Sebastian Bergmann and contributors.

................................................................. 65 / 78 ( 83%)
.S......SSS..

Time: 26.85 seconds, Memory: 6.00MB

OK, but incomplete, skipped, or risky tests!
Tests: 78, Assertions: 479, Skipped: 4.
Speicherzugriffsfehler (Speicherabzug geschrieben)

$ gdb /usr/bin/php ./core 
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
Copyright (C) 2016 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 /usr/bin/php...Reading symbols from /usr/lib/debug/.build-id/9c/9b8727026717197c38b043c96ebd72eada098f.debug...done.
done.

warning: core file may not match specified executable file.
[New LWP 20613]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/php ./vendor/bin/phpunit test/Storage/Adapter/ApcuTest.php'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  ____longjmp_chk () at ../sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S:130
130	../sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0  ____longjmp_chk () at ../sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S:130
#1  0x5737af1aee7acc88 in ?? ()
Backtrace stopped: Cannot access memory at address 0x8012af1afbbf0401
 [2016-10-26 19:35 UTC] marc at mabe dot berlin
this one has been fixed here : https://github.com/krakjoe/apcu/issues/203
 [2016-11-18 20:56 UTC] kalle@php.net
-Summary: 8545 Segmentation fault +Summary: APCu: 8545 Segmentation fault
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC