ID:               14365
 Comment by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Feedback
 Bug Type:         iPlanet related
 Operating System: RedHat Linux 7.3
 PHP Version:      4.3.0-dev
 New Comment:

I would love to but I don't have a clue how I should do that :D I'm
using Apache 1.3.26 and PHP 4.3.0 (but that one segfaults too often)
and PHP 4.2.3 (segfaults too but less often, especially when we use a
debug build and limit the MaxRequestsPerChild to 10.

Nested evals()? Hmm, we shouldn't, I'll go and see if that can be the
case.

BTW how did Sean create that backtrace? It even shows in what PHP file
and on what line Apache/PHP went down...


Previous Comments:
------------------------------------------------------------------------

[2003-01-02 11:54:51] [EMAIL PROTECTED]

Can you try increasing your stack size as was suggested in one of the
earlier responses?

The latest backtrace looks *very* deep - are you using a lot of nested
eval() calls ?

------------------------------------------------------------------------

[2003-01-01 14:55:40] [EMAIL PROTECTED]

Oh, sorry. Forgot to mention what the site is running on.

We're using Apache 1.3.26 with PHP as a module. Info page is over
here:
http://www.bokt.nl/klad/info.php

It's a Redhat 7.3 box with:
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-112)

It's an Athlon 1800 XP with 1GB ram and phpBB is using MySQL (MyISAM
tables) extensively. Some stats can be seen on:

http://www.bokt.nl/stats/

------------------------------------------------------------------------

[2003-01-01 14:51:48] [EMAIL PROTECTED]

Grr. These damn segfaults are really driving me nuts. I've been having
segfaults with other versions of PHP (up to 4.2.3). I'm using PHP 4.3.0
at the moment and the number of segfaults has only increased.

Sometimes there are almost no segfaults (one every 5 minutes?) but
sometimes I get stuff like this in the errorlog:
[Wed Jan  1 21:34:02 2003] [notice] child pid 13840 exit signal
Segmentation fault (11)
[Wed Jan  1 21:34:03 2003] [notice] child pid 13833 exit signal
Segmentation fault (11)
[Wed Jan  1 21:34:11 2003] [notice] child pid 13831 exit signal
Segmentation fault (11)
[Wed Jan  1 21:34:11 2003] [notice] child pid 13816 exit signal
Segmentation fault (11)
[Wed Jan  1 21:34:11 2003] [notice] child pid 13810 exit signal
Segmentation fault (11)
[Wed Jan  1 21:34:20 2003] [notice] child pid 13837 exit signal
Segmentation fault (11)
[Wed Jan  1 21:34:45 2003] [notice] child pid 13883 exit signal
Segmentation fault (11)
[Wed Jan  1 21:34:50 2003] [notice] child pid 13878 exit signal
Segmentation fault (11)
[Wed Jan  1 21:34:51 2003] [notice] child pid 13887 exit signal
Segmentation fault (11)
[Wed Jan  1 21:34:51 2003] [notice] child pid 13859 exit signal
Segmentation fault (11)
[Wed Jan  1 21:34:52 2003] [notice] child pid 13882 exit signal
Segmentation fault (11)
[Wed Jan  1 21:35:24 2003] [notice] child pid 13904 exit signal
Segmentation fault (11)
[Wed Jan  1 21:35:31 2003] [notice] child pid 13898 exit signal
Segmentation fault (11)
[Wed Jan  1 21:35:31 2003] [notice] child pid 13892 exit signal
Segmentation fault (11)
[Wed Jan  1 21:35:36 2003] [notice] child pid 13909 exit signal
Segmentation fault (11)
[Wed Jan  1 21:35:39 2003] [notice] child pid 14006 exit signal
Segmentation fault (11)
[Wed Jan  1 21:35:40 2003] [notice] child pid 13908 exit signal
Segmentation fault (11)
[Wed Jan  1 21:35:44 2003] [notice] child pid 14009 exit signal
Segmentation fault (11)
[Wed Jan  1 21:35:46 2003] [notice] child pid 13903 exit signal
Segmentation fault (11)
[Wed Jan  1 21:35:52 2003] [notice] child pid 14017 exit signal
Segmentation fault (11)
[Wed Jan  1 21:36:11 2003] [notice] child pid 14015 exit signal
Segmentation fault (11)
[Wed Jan  1 21:36:17 2003] [notice] child pid 14023 exit signal
Segmentation fault (11)
[Wed Jan  1 21:36:33 2003] [notice] child pid 14016 exit signal
Segmentation fault (11)
[Wed Jan  1 21:36:42 2003] [notice] child pid 14019 exit signal
Segmentation fault (11)
[Wed Jan  1 21:36:45 2003] [notice] child pid 14043 exit signal
Segmentation fault (11)


This is making me and my users _very_ unhappy :\

With 4.2.3 I got:

(gdb) bt
#0  0x42082a0c in memcpy () from /lib/i686/libc.so.6
#1  0x08134f7d in _estrndup ()
#2  0x0810deb0 in php_var_unserialize ()
#3  0x0810e796 in php_var_unserialize ()
#4  0x0810dd7a in php_var_unserialize ()
#5  0x08106dbc in zif_unserialize ()
#6  0x08169483 in execute ()
#7  0x08145b8e in zend_execute_scripts ()
#8  0x0808a06a in php_execute_script ()
#9  0x081511ca in apache_php_module_main ()
#10 0x0808638c in php_restore_umask ()
#11 0x080863e5 in php_restore_umask ()
#12 0x08173363 in ap_invoke_handler ()
#13 0x08187e9b in ap_some_auth_required ()
#14 0x08187efc in ap_process_request ()
#15 0x0817ef05 in ap_child_terminate ()
#16 0x0817f173 in ap_child_terminate ()
#17 0x0817f4f0 in ap_child_terminate ()
#18 0x0817fac5 in ap_child_terminate ()
#19 0x081800ff in main ()
#20 0x42017589 in __libc_start_main () from /lib/i686/libc.so.6


But with 4.3.0 I get:
(gdb) bt
#0  0x4204a646 in canonicalize () from /lib/i686/libc.so.6
#1  0x08182ced in virtual_file_ex ()
#2  0x08093ba0 in expand_filepath ()
#3  0x08092d30 in php_check_specific_open_basedir ()
#4  0x08092f12 in php_check_open_basedir ()
#5  0x0809c303 in _php_stream_fopen_with_path ()
#6  0x0809d243 in php_unregister_url_stream_wrapper ()
#7  0x0809d94d in _php_stream_open_wrapper_ex ()
#8  0x0809dc3b in _php_stream_open_wrapper_as_file ()
#9  0x0809010e in zif_set_time_limit ()
#10 0x080a2573 in open_file_for_scanning ()
#11 0x080a26f7 in compile_file ()
#12 0x080a2898 in compile_filename ()
#13 0x080cc601 in execute ()
#14 0x080ca99a in execute ()
#15 0x080cc76f in execute ()
#16 0x080ca99a in execute ()
#17 0x080cc76f in execute ()
#18 0x080ca99a in execute ()
(execute continues)
#1319 0x080cc76f in execute ()
#1320 0x080ca99a in execute ()
#1321 0x080cc76f in execute ()
#1322 0x080bac4e in zend_execute_scripts ()
#1323 0x08091b71 in php_execute_script ()
#1324 0x080cf14a in apache_php_module_main ()
#1325 0x08088a44 in ap_get_server_built ()
#1326 0x08088a9d in ap_get_server_built ()
#1327 0x081a1453 in ap_invoke_handler ()
#1328 0x081b5f8b in ap_some_auth_required ()
#1329 0x081b5fec in ap_process_request ()
#1330 0x081acff5 in ap_child_terminate ()
#1331 0x081ad263 in ap_child_terminate ()
#1332 0x081ad5e0 in ap_child_terminate ()
#1333 0x081adbb5 in ap_child_terminate ()
#1334 0x081ae1ef in main ()
#1335 0x42017589 in __libc_start_main () from /lib/i686/libc.so.6

I've made the last backtrace by attaching to a running httpd and then
waiting until it segfaults (which doesn't take that long on average
:\).

The weird thing is that some users seem to be affected a lot more than
others. I almost never get the messages, another user also rarely sees
them but is getting them almost continuously when she's at her
parents.

The site is almost only running phpBB 2.0.3 with on average 100 people
online with peaks to 170 users.

I've reduced the MaxRequestsPerChild setting to a low number, this
seems to reduce the amount of segfaults. Furthermore the segfaults
increase quite a bit when I disable debug in PHP (remove the
--enable-debug flag), at least that was the behaviour with PHP 4.2.3,
haven't dared to try with PHP 4.3.0

BTW as far as I could see we're not using require_once() anywhere in
the code.

Please tell me what to do, or tell me what information you need to get
rid of these errors :\ I can also arrange for an account on my server.
The annoying thing is that I have no means to consistently reproduce
this error, I don't even know where it occurs, it's not on one specific
page or for a specific user or OS/Browser combo. And I've only seen it
on the production server when it's under load, not on my test server.

Any ideas, info, hints or tips are very welcome!

------------------------------------------------------------------------

[2002-10-16 22:25:14] [EMAIL PROTECTED]

Try modifying your ns/threads section to include a larger
stacksize...the default one is 128*1024    I ran into a stacksize
problem on the recent redhat update (related to glibc) that was
segfaulting on a dns lookup.  I didn't associate it with the segfault I
was getting for PHP (Including squirrelmail), but the segfault for SM
is gone now for me after this fix and SM works perfectly.

Try this sample:

ns_section "ns/threads"
        ns_param   stacksize [expr 256*1024]

------------------------------------------------------------------------

[2002-10-14 19:26:48] [EMAIL PROTECTED]

No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/14365

-- 
Edit this bug report at http://bugs.php.net/?id=14365&edit=1

Reply via email to