|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-05-24 11:35 UTC] thom at planetarytramp dot net
(Occurs with both HEAD and 4.2.1). Only tested with worker mpm. (This only occurs when the php module is loaded)
to reproduce:
attempt to restart (gracefully or otherwise) a running apache2 server.
Make a page request while apache is still starting the child processes.
backtrace:
(gdb) bt
#0 0x40305445 in sapi_initialize_empty_request (tsrm_ls=0x8126330)
at SAPI.c:366
#1 0x4030136d in php_module_startup (sf=0x403debc0) at main.c:881
#2 0x402ff03a in php_apache_server_startup (pconf=0x8094e80, plog=0x80bef28,
ptemp=0x80f6150, s=0x8096bd0) at sapi_apache2.c:459
#3 0x08064441 in ap_run_post_config (pconf=0x8094e80, plog=0x80bef28,
ptemp=0x80f6150, s=0x8096bd0) at config.c:129
#4 0x080689fc in main (argc=1, argv=0xbffff9c4) at main.c:635
(gdb) frame 0
#0 0x40305445 in sapi_initialize_empty_request (tsrm_ls=0x8126330)
at SAPI.c:366
366 SG(server_context) = NULL;
(gdb) frame 1
#1 0x4030136d in php_module_startup (sf=0x403debc0) at main.c:881
881 sapi_initialize_empty_request(TSRMLS_C);
(gdb) frame 2
#2 0x402ff03a in php_apache_server_startup (pconf=0x8094e80, plog=0x80bef28,
ptemp=0x80f6150, s=0x8096bd0) at sapi_apache2.c:459
459 apache2_sapi_module.startup(&apache2_sapi_module);
(gdb) frame 3
#3 0x08064441 in ap_run_post_config (pconf=0x8094e80, plog=0x80bef28,
ptemp=0x80f6150, s=0x8096bd0) at config.c:129
129 apr_pool_t *ptemp, server_rec *s),
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 03:00:01 2025 UTC |
Yes. Here's the backtrace: #0 0x4015e973 in free () from /lib/libc.so.6 #1 0x4015f081 in realloc () from /lib/libc.so.6 #2 0x4015ebe4 in realloc () from /lib/libc.so.6 #3 0x402fcf77 in ts_allocate_id (rsrc_id=0x403c372c, size=88, ctor=0x4030fae0 <php_output_init_globals>, dtor=0) at /home/thom/php4/TSRM/TSRM.c:206 #4 0x4030fb69 in php_output_startup () at /home/thom/php4/main/output.c:73 #5 0x40300698 in php_module_startup (sf=0x403b0b00, additional_modules=0x403b0cc0, num_additional_modules=1) at /home/thom/php4/main/main.c:1017 #6 0x4034eafe in php_apache2_startup (sapi_module=0x403b0b00) at /home/thom/php4/sapi/apache2filter/sapi_apache2.c:267 #7 0x4034f25d in php_apache_server_startup (pconf=0x80b5cb0, plog=0x80edd90, ptemp=0x80b7cb8, s=0x80f4648) at /home/thom/php4/sapi/apache2filter/sapi_apache2.c:543 #8 0x0807c371 in ap_run_post_config (pconf=0x80b5cb0, plog=0x80edd90, ptemp=0x80b7cb8, s=0x80f4648) at config.c:130 #9 0x08080afc in main (argc=3, argv=0xbffff914) at main.c:640 (gdb) frame 0 #0 0x4015e973 in free () from /lib/libc.so.6 (gdb) frame 1 #1 0x4015f081 in realloc () from /lib/libc.so.6 (gdb) frame 2 #2 0x4015ebe4 in realloc () from /lib/libc.so.6 (gdb) frame 3 #3 0x402fcf77 in ts_allocate_id (rsrc_id=0x403c372c, size=88, ctor=0x4030fae0 <php_output_init_globals>, dtor=0) at /home/thom/php4/TSRM/TSRM.c:206 206 resource_types_table = (tsrm_resource_type *) realloc(resource_types_table, sizeof(tsrm_resource_type)*id_count); (gdb) frame 4 #4 0x4030fb69 in php_output_startup () at /home/thom/php4/main/output.c:73 73 ts_allocate_id(&output_globals_id, sizeof(php_output_globals), (ts_allocate_ctor) php_output_init_globals, NULL);FWIW, I can reproduce this every time on MPM-prefork Apache 2.0.43 and PHP 4.3.0. No threads involved. This occurs after an 'apache2ctl graceful' with gdb attached to the parent process (gdb stops on the SIGUSR1, is continued, segv ensues). The server was started with StartServers=1 and MinSpareServers=1, then the restart immediately attempted, though it happens regardless of these. This is linux 2.4.19 (Debian Woody/Sid hybrid), glibc 2.3. Program received signal SIGSEGV, Segmentation fault. 0x40585181 in sapi_initialize_empty_request (tsrm_ls=0x8108740) at /usr/src/apache/php/php-4.3.0/main/SAPI.c:399 399 SG(server_context) = NULL; (gdb) bt #0 0x40585181 in sapi_initialize_empty_request (tsrm_ls=0x8108740) at /usr/src/apache/php/php-4.3.0/main/SAPI.c:399 #1 0x4057f8ec in php_module_startup (sf=0x40605360, additional_modules=0x40605540, num_additional_modules=1) at /usr/src/apache/php/php-4.3.0/main/main.c:1035 #2 0x405c820e in php_apache2_startup (sapi_module=0x40605360) at /usr/src/apache/php/php-4.3.0/sapi/apache2filter/sapi_apache2.c:269 #3 0x405c89cd in php_apache_server_startup (pconf=0x80c3c30, plog=0x80fbd10, ptemp=0x8101d28, s=0x80c6298) at /usr/src/apache/php/php-4.3.0/sapi/apache2filter/sapi_apache2.c:556 #4 0x0807fe59 in ap_run_post_config () #5 0x08085e11 in main () #6 0x402409f1 in __libc_start_main () from /lib/libc.so.6Nope, that makes precisely zero difference. Reviewing the commits on apache2filter recently I'm not quite sure which commit you expected to fix this? Reproducible with 2.1-dev and 2.0-dev (what will be 2.0.46). Same old backtrace: (gdb) bt #0 0x403a678d in sapi_initialize_empty_request (tsrm_ls=0x80f98f0) at /home/thom/php4-STABLE-200305190930/main/SAPI.c:434 #1 0x403a1000 in php_module_startup (sf=0x4041cf00, additional_modules=0x4041d0e0, num_additional_modules=1) at /home/thom/php4-STABLE-200305190930/main/main.c:1094 #2 0x403defbb in php_apache2_startup (sapi_module=0x4041cf00) at /home/thom/php4-STABLE-200305190930/sapi/apache2filter/sapi_apache2.c:287 #3 0x403df797 in php_apache_server_startup (pconf=0x80b90c8, plog=0x80f11a8, ptemp=0x80bb0d0, s=0x4041cf00) at /home/thom/php4-STABLE-200305190930/sapi/apache2filter/sapi_apache2.c:577 #4 0x0807e651 in ap_run_post_config (pconf=0x80b90c8, plog=0x80f11a8, ptemp=0x80bb0d0, s=0x80f5af0) at config.c:130 #5 0x08082e9c in main (argc=3, argv=0xbffff864) at main.c:640 (gdb) frame 0 #0 0x403a678d in sapi_initialize_empty_request (tsrm_ls=0x80f98f0) at /home/thom/php4-STABLE-200305190930/main/SAPI.c:434 434 SG(server_context) = NULL; it still looks like a pool lifetime problemOnly difference in the backtrace when trying with apache2handler is the different SAPI directory: #0 0x403a6941 in sapi_initialize_empty_request (tsrm_ls=0x80f98f0) at /home/thom/php4-STABLE-200305190930/main/SAPI.c:434 434 SG(server_context) = NULL; (gdb) bt #0 0x403a6941 in sapi_initialize_empty_request (tsrm_ls=0x80f98f0) at /home/thom/php4-STABLE-200305190930/main/SAPI.c:434 #1 0x403a11b4 in php_module_startup (sf=0x4041cba0, additional_modules=0x4041ce80, num_additional_modules=1) at /home/thom/php4-STABLE-200305190930/main/main.c:1094 #2 0x403df187 in php_apache2_startup (sapi_module=0x4041cba0) at /home/thom/php4-STABLE-200305190930/sapi/apache2handler/sapi_apache2.c:290 #3 0x403df2b3 in php_apache_server_startup (pconf=0x80b90c8, plog=0x80f11a8, ptemp=0x80bb0d0, s=0x4041cba0) at /home/thom/php4-STABLE-200305190930/sapi/apache2handler/sapi_apache2.c:389 #4 0x0807e651 in ap_run_post_config (pconf=0x80b90c8, plog=0x80f11a8, ptemp=0x80bb0d0, s=0x80f5af0) at config.c:130 #5 0x08082e9c in main (argc=3, argv=0xbffff874) at main.c:640 (gdb)