Bug #70973 [NEW]: Segmentation fault when no huge pages available

From: Date: Wed, 25 Nov 2015 21:31:54 +0000
Subject: Bug #70973 [NEW]: Segmentation fault when no huge pages available
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197424@lists.php.net to get a copy of this message
From: cv at jet9 dot ru Operating system: CentOS 6 PHP version: 7.0.0RC7 Package: opcache Bug Type: Bug Bug description:Segmentation fault when no huge pages available Description: ------------ When opcache.huge_code_pages=1 and no huge pages available, php gots segfault: jet9.ru$ strace /own/bin/php ... mmap(0x400000, 2097152, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS|0x40000, -1, 0) = -1 ENOMEM (Cannot allocate memory) munmap(0x7fa18485f000, 2097152) = 0 close(3) = 0 munmap(0x7fa1a0800000, 4096) = 0 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x5d72c0} --- +++ killed by SIGSEGV +++ Segmentation fault jet9.ru$ gdb /own/bin/php ... Program received signal SIGSEGV, Segmentation fault. zend_llist_del_element (l=0x9dc8e0, element=0x0, compare=0x7fffedf40590 <accelerator_remove_cb>) at /usr/src/debug/php-7.0.0RC8/Zend/zend_llist.c:91 I guess somewhere's lost mmap() returning value check when dealing with huge pages. -- Edit bug report at https://bugs.php.net/bug.php?id=70973&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70973&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70973&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70973&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=70973&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=70973&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=70973&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=70973&r=needscript Try newer version: https://bugs.php.net/fix.php?id=70973&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=70973&r=support Expected behavior: https://bugs.php.net/fix.php?id=70973&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=70973&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=70973&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=70973&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70973&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=70973&r=dst IIS Stability: https://bugs.php.net/fix.php?id=70973&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=70973&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=70973&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=70973&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=70973&r=mysqlcfg

« previous php.bugs (#197424) next »