php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57482 apc make apache segment fault (fcntl64)
Submitted: 2007-01-17 23:40 UTC Modified: 2007-03-01 01:18 UTC
From: catoc at 163 dot com Assigned:
Status: Closed Package: APC (PECL)
PHP Version: 5.2.0 RC4 OS: Centos 4.4
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:
Package:
Bug Type:
Summary:
From: catoc at 163 dot com
New email:
PHP Version: OS:

 

 [2007-01-17 23:40 UTC] catoc at 163 dot com
Description:
------------
APC verion: cvs
Apache/2.0.52
Linux version 2.6.9-11.ELsmp
CPU: Intel(R) Xeon(TM) CPU 2.40GHz
use APC 3.0.12p2 is ok.



Reproduce code:
---------------
<?
phpinfo();
?>
12
21212
121
212


Expected result:
----------------
first: index.php code
<?
phpinfo();
?>

then change it to, and reload it use firefox:
<?
phpinfo();
?>
12
21212
121
212


Actual result:
--------------
sh# strace httpd -X

stat64("/data/xxxxx.com/www/page/uploadprogress-example/index.php", {st_mode=S_IFREG|0644, st_size=34, ...}) = 0
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={60, 0}}, NULL) = 0
rt_sigaction(SIGPROF, {0x127600c, [PROF], SA_RESTORER|SA_RESTART, 0x279898}, {0x127600c, [PROF], SA_RESTORER|SA_RESTART, 0x279898}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [PROF], NULL, 8) = 0
getcwd("/data/xxxxx.com/soft/pecl/apc", 4095) = 35
chdir("/data/xxxxx.com/www/page/uploadprogress-example") = 0
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={30, 0}}, NULL) = 0
rt_sigaction(SIGPROF, {0x127600c, [PROF], SA_RESTORER|SA_RESTART, 0x279898}, {0x127600c, [PROF], SA_RESTORER|SA_RESTART, 0x279898}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [PROF], NULL, 8) = 0
time(NULL)                              = 1169094892
fcntl64(10, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
fcntl64(9, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
fcntl64(9, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
fcntl64(9, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
fcntl64(9, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
fcntl64(9, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
fcntl64(9, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
fcntl64(9, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
fcntl64(9, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
fcntl64(9, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
fcntl64(9, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
fcntl64(9, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
fcntl64(9, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
fcntl64(9, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
fcntl64(9, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
fcntl64(9, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
fcntl64(9, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
fcntl64(9, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
fcntl64(9, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
fcntl64(9, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
fcntl64(9, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-17 23:48 UTC] catoc at 163 dot com
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208027456 (LWP 7634)]
sma_allocate (shmaddr=0xafd95000, size=Variable "size" is not available.
) at /data/xxxxxx.com/soft/pecl/apc/apc_sma.c:144
144             if (cur->size == realsize || (cur->size > (sizeof(block_t) + realsize))) {
(gdb) bt
#0  sma_allocate (shmaddr=0xafd95000, size=Variable "size" is not available.
) at /data/xxxxxx.com/soft/pecl/apc/apc_sma.c:144
#1  0x0053d6ff in apc_sma_malloc (n=217) at /data/xxxxxx.com/soft/pecl/apc/apc_sma.c:356
#2  0x005354a6 in apc_xmemcpy (p=0xafd0b384, n=217, f=0x53d6a8 <apc_sma_malloc>)
    at /data/xxxxxx.com/soft/pecl/apc/apc.c:95
#3  0x0053941a in my_copy_zval (dst=0xafd977cc, src=0xafd08090, allocate=0x53d6a8 <apc_sma_malloc>, 
    deallocate=0x53d8d0 <apc_sma_free>) at /data/xxxxxx.com/soft/pecl/apc/apc_compile.c:308
#4  0x00539517 in my_copy_znode (dst=0xafd977dc, src=0xafd080a0, allocate=0x53d6a8 <apc_sma_malloc>, 
    deallocate=0x53d8d0 <apc_sma_free>) at /data/xxxxxx.com/soft/pecl/apc/apc_compile.c:386
#5  0x00539574 in my_copy_zend_op (dst=0xafd977b0, src=0xafd08074, allocate=0x53d6a8 <apc_sma_malloc>, 
    deallocate=0x53d8d0 <apc_sma_free>) at /data/xxxxxx.com/soft/pecl/apc/apc_compile.c:403
#6  0x0053ac63 in apc_copy_op_array (dst=0xafd976c0, src=0xafd07d40, allocate=0x53d6a8 <apc_sma_malloc>, 
    deallocate=0x53d8d0 <apc_sma_free>) at /data/xxxxxx.com/soft/pecl/apc/apc_compile.c:1243
#7  0x0053c5d6 in my_compile_file (h=0xbfff4aa0, type=8) at /data/xxxxxx.com/soft/pecl/apc/apc_main.c:408
#8  0x01299034 in zend_execute_scripts () from /usr/lib/httpd/modules/libphp5.so
#9  0x0126344d in php_execute_script () from /usr/lib/httpd/modules/libphp5.so
#10 0x01311274 in zend_get_zval_ptr_ptr () from /usr/lib/httpd/modules/libphp5.so
#11 0x0030e9d7 in ap_run_handler () from /usr/sbin/httpd
#12 0x0030ee43 in ap_invoke_handler () from /usr/sbin/httpd
#13 0x0030b8c5 in ap_process_request () from /usr/sbin/httpd
#14 0x0030663f in _start () from /usr/sbin/httpd
#15 0x08a01590 in ?? ()
#16 0x00000004 in ?? ()
#17 0x08a01590 in ?? ()
#18 0x089f92f0 in ?? ()
#19 0x089f9304 in ?? ()
#20 0x089f9218 in ?? ()
#21 0x00000001 in ?? ()
#22 0x00336394 in ?? () from /usr/sbin/httpd
#23 0x08869148 in ?? ()
#24 0x00000000 in ?? ()
 [2007-02-06 19:24 UTC] gopalv82 at yahoo dot com
One memory corruption issue has just been fixed in CVS.

This should be fixed now, please mail me directly if it recurrs, to get instructions on how to setup a debug env.
 [2007-03-01 01:18 UTC] catoc at 163 dot com
I try in 3.0.13, it is ok. Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 22:01:33 2024 UTC