php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3228 Odd behaviour (sybase related?)
Submitted: 2000-01-16 23:51 UTC Modified: 2000-07-25 20:17 UTC
From: simon at airdmhor dot gen dot nz Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0 Latest CVS (16/01/2000) OS: Linux RH6, 2.2.5-22 kernel
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: simon at airdmhor dot gen dot nz
New email:
PHP Version: OS:

 

 [2000-01-16 23:51 UTC] simon at airdmhor dot gen dot nz
Long time php4/cvs user, using the same build script as I always do. Very recently without sybase, but with it this time :

./configure --prefix=/home/simonr/www --with-apache=../apache_1.3.9 --enable-track-vars --enable-debugger --with-xml --with-pgsql --with-sybase-ct=/usr/sybase --with-gd --with-config-file-path=/home/simonr/www/conf/php.ini

And I'm getting inconsistant results on the same script. It either :
a) works fine,
b) reports an error on a line that's in the middle of a comment (ie: Fatal error: Cannot redeclare class xxdebug in class.debug.php on line 3), or
c) fails to respond to the HTTP request at all

I'm also getting :

[Mon Jan 17 17:43:45 2000]  Script:  '/home/simonr/www/htdocs/crash.php'
---------------------------------------
php_sybase_ct.c(338) : Block 0x081DFF58 status:
Beginning:      Cached (allocated on php_sybase_ct.c:319, 8 bytes)
      End:      OK
---------------------------------------
[Mon Jan 17 17:43:45 2000] [notice] child pid 629 exit signal Segmentation fault (11)

happening with trivial scripts. I'm still working on narrowing down exactly what code triggers it. 

Mostly the segfault doesn't generate a core file, and when it does, the backtrace only has 1 line -
#0  0x8060bbd in ap_get_server_built ()

More soon.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-01-17 00:19 UTC] simon at airdmhor dot gen dot nz
Hmmm, got the latest snapshot (php4-200001162045) and hitting reload a few times on a trivial source easily generates :

[Mon Jan 17 18:07:40 2000] [notice] child pid 12602 exit signal Segmentation fault (11), possible coredump in /home/simonr/www

The file is :
<?php session_start(); ?>

I guess the session stuff is still broken?

The bt looks a bit more useful :
(gdb) bt
#0  0x8088dc6 in zend_hash_add_or_update ()
#1  0x807e6e1 in do_bind_function_or_class ()
#2  0x807e8d9 in do_early_binding ()
#3  0x80db7a6 in zendparse ()
#4  0x808d5a5 in require_file ()
#5  0x808d366 in require_filename ()
#6  0x808020c in do_require ()
#7  0x80dbaf2 in zendparse ()
#8  0x808cf4b in v_compile_files ()
#9  0x808ce74 in compile_files ()
#10 0x80772b9 in php_execute_script ()
#11 0x8090c13 in apache_php_module_main ()
#12 0x8075694 in send_php ()
#13 0x80756de in send_parsed_php ()
#14 0x80eaf09 in ap_invoke_handler ()
#15 0x80fef6f in ap_some_auth_required ()
#16 0x80fefd6 in ap_process_request ()
#17 0x80f62f6 in ap_child_terminate ()
#18 0x80f6578 in ap_child_terminate ()
#19 0x80f6908 in ap_child_terminate ()
#20 0x80f6e7c in ap_child_terminate ()
#21 0x80f74ac in main ()
#22 0x401dfcb3 in __libc_start_main (main=0x80f7124 <main>, argc=1, argv=0xbffffa44, init=0x805ea0c <_init>, fini=0x812bd8c <_fini>, 
    rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffffa3c) at ../sysdeps/generic/libc-start.c:78
(gdb) 

But there's another unrelated problem! See next message.


 [2000-01-17 00:33 UTC] simon at airdmhor dot gen dot nz
Another crash happened. Hmm, maybe it's a broken build system? I think the sysadmin upgraded some stuff a couple of weeks ago. How would I tell?



[Mon Jan 17 18:31:50 2000]  Script:  '/home/simonr/www/htdocs/class.crash.php'
---------------------------------------
zend_execute_API.c(216) : Block 0x081DAEB8 status:
zend_variables.c(63) : Actual location (location was relayed)
Beginning:      Overrun (magic=0x2A8FCC84, expected=0x7312F8DC)
      End:      Unknown
---------------------------------------
[Mon Jan 17 18:31:51 2000] [notice] child pid 12754 exit signal Segmentation fault (11), possible coredump in /home/simonr/www


(gdb) bt
#0  0x8082615 in destroy_zend_class ()
#1  0x808a2e3 in zend_hash_clean ()
#2  0x808a451 in zend_hash_apply ()
#3  0x807cbbb in shutdown_compiler ()
#4  0x8086af3 in zend_deactivate ()
#5  0x8076762 in php_request_shutdown ()
#6  0x80e7a79 in ap_run_cleanup ()
#7  0x80e6123 in ap_clear_pool ()
#8  0x80e61a3 in ap_destroy_pool ()
#9  0x80f6353 in ap_child_terminate ()
#10 0x80f6578 in ap_child_terminate ()
#11 0x80f6908 in ap_child_terminate ()
#12 0x80f6e7c in ap_child_terminate ()
#13 0x80f74ac in main ()
#14 0x401dfcb3 in __libc_start_main (main=0x80f7124 <main>, argc=1, argv=0xbffffa44, init=0x805ea0c <_init>, 
    fini=0x812bd8c <_fini>, rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffffa3c) at ../sysdeps/generic/libc-start.c:78
(gdb) 


 [2000-01-17 00:53 UTC] simon at airdmhor dot gen dot nz
Oh, BTW, a script as trivial as 

  <?php class Database { }; ?>

has been causing apache to segfault as described in the first note above. Another example below. It looks like a rogue pointer is trashing whatever...  Maybe the one that's in php_sybase_ct.c:338 as described in apache's error_log, or something trashing it. 

That function reads :

PHP_RSHUTDOWN_FUNCTION(sybase)
{
    efree(sybase_globals.appname);           // line 338
    if (sybase_globals.server_message) {
        efree(sybase_globals.server_message);
    }
    return SUCCESS;
}

Does it need to check for a NULL pointer too?




I haven't got time to run purify on it tonight - maybe tomorrow.

(gdb) bt
#0  0x8088dc6 in zend_hash_add_or_update ()
#1  0x807f4fc in do_begin_class_declaration ()
#2  0x80dbc51 in zendparse ()
#3  0x808cf4b in v_compile_files ()
#4  0x808ce74 in compile_files ()
#5  0x80772b9 in php_execute_script ()
#6  0x8090c13 in apache_php_module_main ()
#7  0x8075694 in send_php ()
#8  0x80756de in send_parsed_php ()
#9  0x80eaf09 in ap_invoke_handler ()
#10 0x80fef6f in ap_some_auth_required ()
#11 0x80fefd6 in ap_process_request ()
#12 0x80f62f6 in ap_child_terminate ()
#13 0x80f6578 in ap_child_terminate ()
#14 0x80f6908 in ap_child_terminate ()
#15 0x80f6e7c in ap_child_terminate ()
#16 0x80f74ac in main ()
#17 0x401dfcb3 in __libc_start_main (main=0x80f7124 <main>, argc=1, argv=0xbffffa44, init=0x805ea0c <_init>, 
    fini=0x812bd8c <_fini>, rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffffa3c) at ../sysdeps/generic/libc-start.c:78
(gdb) 


 [2000-07-25 20:17 UTC] zak@php.net
Please upgrade to the latest version of PHP.
If the error still occurs, please open a new bug report.

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Oct 11 15:00:01 2026 UTC