|  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: 2018-02-11 20:33 UTC
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: nikic (profile)
Status: Closed Package: APC (PECL)
PHP Version: 7.0.11 OS: Ubuntu 12.04.5 LTS
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: daniel at handbuilt dot co
New email:
PHP Version: OS:


 [2016-10-10 16:01 UTC] daniel at handbuilt dot co
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/ line 48:  8454 Segmentation fault      (core dumped) phpunit

Here's the failed job:

Here's the corresponding discussion with Travis CI:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-10-10 16:12 UTC]
-Status: Open +Status: Wont fix
 [2016-10-10 16:12 UTC]
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]
-Status: Wont fix +Status: Re-Opened
 [2016-10-11 09:09 UTC]
This report is about APCu, actually :)

 [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]
@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%)

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 <>
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:
Find the GDB manual and other documentation resources online at:
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.

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/".
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 :
 [2016-11-18 20:56 UTC]
-Summary: 8545 Segmentation fault +Summary: APCu: 8545 Segmentation fault
 [2018-02-11 20:33 UTC]
-Status: Re-Opened +Status: Closed -Assigned To: +Assigned To: nikic
 [2018-02-11 20:33 UTC]
Closing this per the previous comment.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue May 24 00:03:50 2022 UTC