php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10939 Segmentation Fault in trigger_error()
Submitted: 2001-05-17 14:56 UTC Modified: 2001-05-27 19:27 UTC
From: dzoll at nyscul dot org Assigned:
Status: Closed Package: PostgreSQL related
PHP Version: 4.0.5 OS: Linux
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dzoll at nyscul dot org
New email:
PHP Version: OS:

 

 [2001-05-17 14:56 UTC] dzoll at nyscul dot org
PHP 4.0.5 running as an apache module (Apache startup
string: "Apache/1.3.19 (Unix) mod_auth_pam/1.0a PHP/4.0.5
mod_ssl/2.8.1 OpenSSL/0.9.6 configured -- resuming normal
operations").  This is a Debian 2.2 box, with manually
compiled Apache and PHP.

Usually, when I call trigger_error(), PHP segmentation
faults during the trigger_error command.  This occurs
regardless of whether I'm using E_USER_ERROR or
E_USER_NOTICE (haven't tested E_USER_WARNING).

Here is a backtrace from one such crash (E_USER_ERROR in
this case):
# gdb /opt/apache-1.3.19/sbin/httpd   
GNU gdb 19990928
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 "i686-pc-linux-gnu"...
(gdb) run -X
Starting program: /opt/apache-1.3.19/sbin/httpd -X

Program received signal SIGSEGV, Segmentation fault.
0x401ee144 in SSL_write () from
/opt/apache-1.3.19/libexec/libssl.so
(gdb) bt
#0  0x401ee144 in SSL_write () from
/opt/apache-1.3.19/libexec/libssl.so
#1  0x40813f78 in __DTOR_END__ () from
/opt/postgresql/lib/libpq.so.2
#2  0x40786ef9 in PQsetnonblocking (conn=0x81dc7c8, arg=0)
at fe-exec.c:2192
#3  0x40785dab in PQexec (conn=0x81dc7c8, query=0x4042fcdd
"BEGIN;ROLLBACK;") at fe-exec.c:1197
#4  0x40367d71 in _rollback_transactions (rsrc=0x81de278) at
pgsql.c:168
#5  0x402e4e77 in zend_hash_apply (ht=0x404825c0,
apply_func=0x40367d34 <_rollback_transactions>) at
zend_hash.c:692
#6  0x40368059 in php_rshutdown_pgsql (type=1,
module_number=13) at pgsql.c:246
#7  0x402e2033 in module_registry_cleanup (module=0x817c238)
at zend_API.c:785
#8  0x402e4e77 in zend_hash_apply (ht=0x40482780,
apply_func=0x402e1fe8 <module_registry_cleanup>) at
zend_hash.c:692
#9  0x402df3d5 in zend_deactivate_modules () at zend.c:522
#10 0x402f6eac in php_request_shutdown (dummy=0x0) at main.c:670
#11 0x402f3b47 in php_apache_request_shutdown (dummy=0x0) at
mod_php4.c:290
#12 0x8051e59 in run_cleanups (c=0x81b0294) at alloc.c:1947
#13 0x80504f5 in ap_clear_pool (a=0x80eaa3c) at alloc.c:690
#14 0x8050577 in ap_destroy_pool (a=0x80eaa3c) at alloc.c:720
#15 0x80610be in child_main (child_num_arg=0) at
http_main.c:4306
#16 0x8061241 in make_child (s=0x80b32a4, slot=0,
now=990124608) at http_main.c:4411
#17 0x80613bc in startup_children (number_to_start=5) at
http_main.c:4493
#18 0x8061a2c in standalone_main (argc=2, argv=0xbffffd1c)
at http_main.c:4781
#19 0x806227c in main (argc=2, argv=0xbffffd1c) at
http_main.c:5123
(gdb) 

Odd note: the backtrace shows it dying in SSL_write, but the
site is not using SSL.

Bug is intermittent, but common enough so I can readily
reproduce it.

PHP Configure line:
./configure  --prefix=/opt/php-4.0.5
--with-apxs=/opt/apache/sbin/apxs
--with-openssl=/opt/openssl/ --with-bcmath --enable-calendar
--enable-ctype --with-curl --with-db --with-db2 --with-dbm
--with-dom --enable-ftp --with-gd --with-gmp --with-imap
--with-ldap --with-mcap --with-mcrypt --with-mysql=/usr
--with-unixODBC=/opt/unixodbc --with-pgsql=/opt/postgresql
--with-readline --with-recode --with-sablot --with-mm
--enable-shmop --with-snmp --enable-sockets --enable-wddx
--with-zlib --enable-inline-optimization --enable-debug


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-27 19:27 UTC] sniper@php.net
Should be fixed in CVS now. Fix will be in PHP 4.0.6.
If this happens with it too, reopen this bug report.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 06 14:01:33 2024 UTC