Skip to Content.
Sympa Menu

freetds - RE: [freetds] Crash w/ FreeBSD/PHP/Apache/Sybase

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Marquess, Dustin" <Dustin.Marquess AT allegiancetelecom.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Crash w/ FreeBSD/PHP/Apache/Sybase
  • Date: Thu, 10 Jul 2003 17:16:51 -0500

Ben,

You're lucky. If my web server looks connectivity with the database server,
the FreeTDS errors not only cause Apache to SIGSEGV, but it also causes
httpd to start massively chewing CPU until it's killed.

-Dustin


>
> -----Original Message-----
> From: Ben Vaughn [mailto:bvaughn AT BlackbirdTech.com]
> Sent: Thursday, July 10, 2003 4:09 PM
> To: freetds AT lists.ibiblio.org
>
> Continued testing shows that 0.53 also causes Apache to
> crash. Could it be that TDS_FAIL causes a seg fault in
> Apache (by way of PHP) any time an error is returned and
> noone has noticed it?
>
> -biv
>
> ------
> Ben Vaughn
> Security Analyst
> Blackbird Technologies
> 703-796-1438 W / 703-582-4551 C
> bvaughn AT blackbirdtech.com
> ------
>
>
> -----Original Message-----
> From: Ben Vaughn
> Sent: Thursday, July 10, 2003 01:25
> To: freetds AT lists.ibiblio.org
> Subject: [freetds] Crash w/ FreeBSD/PHP/Apache/Sybase
>
>
> Hi,
>
> Just recently compiled FreeTDS into my Apache/PHP/FreeBSD
> installation so that I could connect to a Sybase server we
> have and run
> some queries. Compilation was successful and so on, but when I try to
> run a simple connect script, Apache/PHP crashes. I would love to be
> able to blame apache, but from GDB it looks like it's a bug in 0.61.
>
> My error_log:
> [Thu Jul 10 12:07:12 2003] [error] PHP Warning: Sybase message: ASA
> Error -102: Database server connection limit exceeded (severity 21) in
> /usr/local/www/data-dist/dorman/picket/functions.db.php on line 5
> [Thu Jul 10 12:07:12 2003] [error] PHP Warning: Sybase message: ASA
> Error -108: Connection not found (severity 16) in
> /usr/local/www/data-dist/dorman/picket/functions.db.php on line 5
> [Thu Jul 10 12:07:13 2003] [notice] child pid 88011 exit signal
> Segmentation fault (11)
>
> (I get the Seg fault regardless of my connection instance.
> When another
> concurrent user stops his session so that I can connect, and try to
> select a DB that does not exist, I get the same crash. It seems as
> though regardless of the action performed on the DB, at the end of the
> session you get a crash.)
>
> My interfaces:
> SERVER3
> query tcp ether xxx.xxx.250.10 10033
> master tcp ether xxx.xxx.250.10 10033
>
>
> My bt:
> root@manage:/usr/local# gdb /usr/local/sbin/httpd
> GNU gdb 4.18 (FreeBSD)
> Copyright 1998 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public
> License, and you
> are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for
> details.
> This GDB was configured as "i386-unknown-freebsd"...(no debugging
> symbols found)...
> (gdb) run -X
> Starting program: /usr/local/sbin/httpd -X
> (no debugging symbols found)...(no debugging symbols found)...(no
> debugging symbols found)...(no debugging symbols found)...
> (no debugging symbols found)...(no debugging symbols found)...(no
> debugging symbols found)...(no debugging symbols found)...
> (no debugging symbols found)...(no debugging symbols found)...(no
> debugging symbols found)...(no debugging symbols found)...
> (no debugging symbols found)...(no debugging symbols found)...(no
> debugging symbols found)...(no debugging symbols found)...
> (no debugging symbols found)...(no debugging symbols found)...(no
> debugging symbols found)...(no debugging symbols found)...
> (no debugging symbols found)...(no debugging symbols found)...(no
> debugging symbols found)...(no debugging symbols found)...
> (no debugging symbols found)...(no debugging symbols found)...(no
> debugging symbols found)...(no debugging symbols found)...
> (no debugging symbols found)...(no debugging symbols found)...(no
> debugging symbols found)...(no debugging symbols found)...
> Deprecated bfd_read called at
> /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/
> dbxread.c
> line 2627 in elfstab_build_ps
> ymtabs
> Deprecated bfd_read called at
> /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/
> dbxread.c
> line 933 in fill_symbuf
> Apache/1.3.27 mod_ssl/2.8.14 (Pass Phrase Dialog)
> Some of your private key files are encrypted for security reasons.
> In order to read them you have to provide us with the pass phrases.
>
> Server xxx.xxx.214.50:443 (RSA)
> Enter pass phrase:
>
> Ok: Pass Phrase Dialog successful.
> (no debugging symbols found)...(no debugging symbols found)...(no
> debugging symbols found)...
> Program received signal SIGSEGV, Segmentation fault.
> 0x284a71ca in tds_set_spid (tds=0x81a2800) at token.c:196
> 196 if (tds->res_info->num_cols != 1) {
> (gdb) bt
> #0 0x284a71ca in tds_set_spid (tds=0x81a2800) at token.c:196
> #1 0x284a74a6 in tds_process_login_tokens (tds=0x81a2800) at
> token.c:299
> #2 0x284ab817 in tds_connect (tds=0x81a2800,
> connect_info=0x81a2900) at
> login.c:347
> #3 0x2849b15c in tdsdbopen (login=0x811fed0, server=0x81a3eac
> "SERVER3") at dblib.c:809
> #4 0x283b9daf in php_sybase_do_connect (ht=5, return_value=0x81b018c,
> this_ptr=0x0, return_value_used=1, persistent=0)
> at /usr/src/php-4.3.1/ext/sybase/php_sybase_db.c:538
> #5 0x283b9f51 in zif_sybase_connect (ht=5, return_value=0x81b018c,
> this_ptr=0x0, return_value_used=1)
> at /usr/src/php-4.3.1/ext/sybase/php_sybase_db.c:585
> #6 0x284166d8 in execute (op_array=0x81a0700) at
> /usr/src/php-4.3.1/Zend/zend_execute.c:1598
> #7 0x28416852 in execute (op_array=0x81a000c) at
> /usr/src/php-4.3.1/Zend/zend_execute.c:1640
> #8 0x28404f2a in zend_execute_scripts (type=8, retval=0x0,
> file_count=3) at /usr/src/php-4.3.1/Zend/zend.c:864
> #9 0x283ddd5e in php_execute_script (primary_file=0xbfbff9b4) at
> /usr/src/php-4.3.1/main/main.c:1573
> #10 0x2841d102 in apache_php_module_main (r=0x8175038,
> display_source_mode=0) at
> /usr/src/php-4.3.1/sapi/apache/sapi_apache.c:55
> #11 0x2841dc02 in send_php (r=0x8175038, display_source_mode=0,
> filename=0x0) at /usr/src/php-4.3.1/sapi/apache/mod_php4.c:556
> #12 0x2841dc62 in send_parsed_php (r=0x8175038) at
> /usr/src/php-4.3.1/sapi/apache/mod_php4.c:571
> #13 0x8053690 in ap_invoke_handler ()
> #14 0x80631b1 in process_request_internal ()
> #15 0x8063210 in ap_process_request ()
> #16 0x805c646 in child_main ()
> #17 0x805c7d8 in make_child ()
> #18 0x805c8f5 in startup_children ()
> #19 0x805cde4 in standalone_main ()
> #20 0x805d4df in main ()
> #21 0x804fadd in _start ()
> (gdb) quit
> The program is running. Exit anyway? (y or n) y
>
>
> ------
> Ben Vaughn
> Security Analyst
> Blackbird Technologies
> 703-796-1438 W / 703-582-4551 C
> bvaughn AT blackbirdtech.com
> ------
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>




Archive powered by MHonArc 2.6.24.

Top of Page